6 Replies Latest reply: Nov 19, 2012 3:25 AM by Jiri.Machotka-Oracle RSS

    Can a custom IDC service take complex type as an input parameter?

    AshwinAlmeida
      I want to create a custom Idc service which takes complex type as an input parameter and process on this.I am finding it difficult to do because when creating custom idc Service,I need to provide input as comma-separated value.This input takes only string I suppose.Does anyone know whether complex type input is feasible or not?

      Also,when creating a WSDL in the admin console,I can see that I can create a complex type and use this as an input to a request parameter for the service in the same WSDL.There should be a way of how this complex type can be used in the custom IDC service.

      Any help will be appreciated.

      Thanks in advance,
        • 1. Re: Can a custom IDC service take complex type as an input parameter?
          Jiri.Machotka-Oracle
          Well, if I remember the code I have seen so far, it is possible, but most likely not the way you expected.

          (Just out of my head) Complex types are passes in:
          - the service binder
          - SharedObjects
          - result sets

          Alternatively, you could create an XML file and pass its path.
          • 2. Re: Can a custom IDC service take complex type as an input parameter?
            AshwinAlmeida
            Thanks for the reply jiri.Do you have any code samples or any documentation of how complex types can be passed in the service binder/XML files?
            • 3. Re: Can a custom IDC service take complex type as an input parameter?
              Jiri.Machotka-Oracle
              I do not, but I will post you API of the DataBinder class:
              oracle.stellent.ridc.model.DataObject getLocalData() { }
              java.lang.String getFieldType(java.lang.String p1) { }
              void setFieldType(java.lang.String p1, java.lang.String p2) { }
              java.util.Collection<java.lang.String> getFieldTypeNames() { }
              void removeFieldType(java.lang.String p1) { }
              java.util.Collection<java.lang.String> getFileNames() { }
              oracle.stellent.ridc.model.TransferFile getFile(java.lang.String p1) { }
              void addFile(java.lang.String p1, java.io.File p2) { }
              void addFile(java.lang.String p1, oracle.stellent.ridc.model.TransferFile p2) { }
              void removeFile(java.lang.String p1) { }
              boolean containsFiles() { }
              java.lang.String getLocal(java.lang.String p1) { }
              void putLocal(java.lang.String p1, java.lang.String p2) { }
              oracle.stellent.ridc.model.DataResultSet getResultSet(java.lang.String p1) { }
              java.util.Map<java.lang.String, oracle.stellent.ridc.model.DataResultSet> getResultSets() { }
              java.util.Collection<java.lang.String> getResultSetNames() { }
              void addResultSet(java.lang.String p1, oracle.stellent.ridc.model.DataResultSet p2) { }
              void removeResultSet(java.lang.String p1) { }
              java.util.List<java.lang.String> getOptionList(java.lang.String p1) { }
              java.util.Collection<java.lang.String> getOptionListNames() { }
              void addOptionList(java.lang.String p1, java.util.List p2) { }
              void removeOptionList(java.lang.String p1) { }
              void merge(oracle.stellent.ridc.model.DataBinder p1) { } 
              out of these, addFile could be used for the XML, addResultSet, addOptionList for storing the respective objects (if you are looking for a complex type like record in Pascal, then ResultSet is the closest you can get), or just use putLocal to store individual attributes one by one.
              • 4. Re: Can a custom IDC service take complex type as an input parameter?
                AshwinAlmeida
                Thank you for the API jiri.I am trying to addResultSet() method to add the resultset as a binder object.But how to populate this resultset?Where can I populate this resultset?Looking for your favourable reply jiri.
                • 5. Re: Can a custom IDC service take complex type as an input parameter?
                  970471
                  I have a code example of how to add rows to a ResultSet at the bottom of this blog post: http://jonathanhult.com/blog/2012/11/resultset-versus-dataresultset/

                  Jonathan
                  http://jonathanhult.com
                  • 6. Re: Can a custom IDC service take complex type as an input parameter?
                    Jiri.Machotka-Oracle
                    There's not much to add to Jonathan's answer. Perhaps, one little detail - as ResultSets originally come from idocScript, it might be worth to take a look at what they are capable of there:

                    http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c02_application.htm#i1033585
                    http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c04_master_usage.htm#i1065074