How to pass complex data type structure to WebService under mx:request?

From my Flex client, I need to pass data to a web service whose operation expects a complex data type with multiple layers of nesting structure. How can I populate the <mx:request> for the <mx:WebServices>? Any examples?
A couple of approaches come to my mind:
(1) construct ActionScript object to mimic the datatype expected by web service, and pass an instance of the AS object to mx:request; or
(2) construct an entire SOAP request body in XML and pass it into mx:request.
Does any of these (or both) work? If both work, which is the better way?
Thanks in advance for your input!
-William

Thanks a lot for the rapid response, Marcel.
For further details on the maping between WS complexType structure and AS object, is there any specific requirement? such as naming, binding, structure of nesting, etc.
William

Similar Messages

  • How to access complex data type objects in webdynpro

    Hi
    Need help on the detailed procedure to access the complex data type objects.
    I am importing an external wsdl file, its request and response have complex data type objects , how do i access the same as the values are nested in them.
    The structure of request and response at my end is as below:
    request(I level)
    --complextypeobject(II level)
    requestheader(III level)
    field1
    field2
    request
    --response
    messages
    resp1
    resp2
    Any help would be highly appreciated.
    Thanks and Regards,
    Amar Bhagat Challa.

    here you go
    WS Structure
    Request_MI_PortWellOB_MI_PortWellOB
    |-- MT_PortWellOut
       |--agency ( attr)
       |--user (attr)
       |-- well ( node)
         |-- borehole
         |-- downhole
         |-- interval
         |-- surface
    // code to set complex type
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(new Request_MI_PortWellOB_MI_PortWellOB());
              //        port well object
              Request_MI_PortWellOB_MI_PortWellOB oPWRequest = new Request_MI_PortWellOB_MI_PortWellOB();
              ComplexType_DT_PortWell oPWParameters = new ComplexType_DT_PortWell();
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              DT_PortWell oPWInputbean =
                   this.wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().nodeMT_PortWellOut().currentMT_PortWellOutElement().modelObject().getOriginalBean();
              //       oPWInputbean.setTEST("test");
              //          well object
              DT_CWR_Well oWParameters = new DT_CWR_Well();
              //          all object
              //        surface
              DT_CWR_Surface oSParameters = new DT_CWR_Surface();
              ComplexType_DT_CWR_Surface s = new ComplexType_DT_CWR_Surface();
              //          Borehole
              DT_CWR_BoreHole[] oBParameters = new DT_CWR_BoreHole[wdContext.nodeBoreholedetail().size()];
              //          Downhole
              DT_CWR_DownHole[] oDParameters = new DT_CWR_DownHole[wdContext.nodeDownholedetail().size()];
              //          Interval
              DT_CWR_Interval[] oIParameters = new DT_CWR_Interval[wdContext.nodeIntervaldetail().size()];
              //        add all into well object       
              oWParameters.setSURFACE(oSParameters);
              oWParameters.setBOREHOLE(oBParameters);
              oWParameters.setDOWNHOLE(oDParameters);
              oWParameters.setINTERVAL(oIParameters);
              //       oPWParameters.setWELL(oWParameters );      
              oPWInputbean.setWELL(oWParameters);
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              wdContext.currentMT_PortWellOutElement().setUSERID("user");
              wdContext.currentMT_PortWellOutElement().setAGENCY("agency");
    Rahul

  • How to reference complex data type when consuming web services in WAS 620?

    In WAS 620, I tried to consume a web service in ABAP. I was successful when the web service returned one or more simple data type. But when the web service is changed to return a complex data type (eg. a structure with 3 elements), the call to the web service did not return anything.
    Do any of you know how to reference the individual element in the structure of an output parameter in a web service? I use the add_parameter method of the CSoapDocument class to identify the output parameters.
    Here is part of the WSDL file:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <types>
    - <xsd:schema targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <xsd:element name="Z_SRM_SOAP_TEST_COMPLEX">
    - <xsd:complexType>
    - <xsd:all>
    - <xsd:element name="INTEXT">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
      </xsd:all>
      </xsd:complexType>
      </xsd:element>
    - <xsd:element name="Z_SRM_SOAP_TEST_COMPLEX.Response">
    - <xsd:complexType>
    - <xsd:all>
      <xsd:element name="OUTTEXT" type="s0:ZSRM_TEST_STRUCT" />
      </xsd:all>
      </xsd:complexType>
      </xsd:element>
    - <xsd:complexType name="ZSRM_TEST_STRUCT">
    - <xsd:sequence>
    - <xsd:element name="ELEMENT1" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    - <xsd:element name="ELEMENT2" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    - <xsd:element name="ELEMENT3" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      </types>

    Hi,
      [email protected] is my id and one more thing u by looking at the wsdl file u can know what al the parameters we have to give to the webservice so try it out also.
    Regards,
    Sirisha.

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • How to get  values of complex data type  specified in webservice wsdl file

    I'm trying to retreive cid from a complex data type[b] course which I'm getting as response from the webservice, it throwing that cid is not valid .
    <course>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    <syncbpelResponse xmlns="http://acm.org/samples">
    <course>
    <startDate xmlns="urn:cms_soa">2005-12-11T18:30:00.000Z</startDate>
    <materialid xmlns="urn:cms_soa">234</materialid>
    <cdescription xmlns="urn:cms_soa">learn spoken english</cdescription>
    <instructorid xmlns="urn:cms_soa">145</instructorid>
    <regEndDate xmlns="urn:cms_soa">2005-11-30T18:30:00.000Z</regEndDate>
    <cid xmlns="urn:cms_soa">12222</cid>
    <cfee xmlns="urn:cms_soa">1000.0</cfee>
    <strength xmlns="urn:cms_soa">20</strength>
    <currentStrength xmlns="urn:cms_soa">2</currentStrength>
    <endDate xmlns="urn:cms_soa">2005-12-30T18:30:00.000Z</endDate>
    <cvenue xmlns="urn:cms_soa">ELNET</cvenue>
    <cname xmlns="urn:cms_soa">english</cname>
    </course>
    </syncbpelResponse>
    </part>
    </course>
    I tried using
    <from variable="course" part="payload" query="/tns:syncbpelRespons/tns:course/@cid"/>
    but not at all accepting....
    I 'll be thankfull if u send me a response

    Hi
    This can not be done Vc only "sees" the returned data in the webservice, it can not access the meta data from the webservice.
    Jarrod

  • How to Call complex data type in ALBPM

    Hi,
    I want to call webservice. I took wsdl from other system(example MessageBroker or OSB).Now that wsdl file is referring to internal xsd.
    The input format of wsdl(webservice) is just like:-
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <m:POCInput xmlns:m="http://www.pocforvineet.com/donebysudarshanhebbar/s3/techodc">
    <m:PDMID>String</m:PDMID>
    <m:CompanyNumber>String</m:CompanyNumber>
    </m:POCInput>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    now when i call that webservice in OBPM after following the steps(catalog->new Module->webservice-> browse wsdl file and import it) & drag & drop method to call
    <b>getSuccess(POCMessageSetService, pocInput : null, out pocOutput : pocOutput) //method to call
    pocMessageSetService = CallingComponent.CallingSud.POC_WSDLService.POCMessageSetService(endPoint : "http://localhost:7001/WebPOC/CallALSB") </b>
    It is expecting xmlObject or java object in <b>pocInput</b>
    now how to call this complex type in OBPM.
    Please help me out in this case.
    Thanx in advance
    Regards,
    Vinny

    1. Have you created an XSD for the XML? (there is a free conversion utility on http://www.hitsw.com/xml_utilites/ that does this)
    2. Have you tried cataloging the XML's XSD into the catalog? (create a new module in the catalog -> right mouse click the module -> in "Catalog Component" -> "XML Schema")
    3. Have your right moused clicked the newly created XML that you just cataloged -> clicked "Create Heir" to create a new object that has the "load()" method?
    Dan

  • Using Complex Data Types in Import JavaBean Model

    Hi,
    I have searched and read forums and weblogs related to import javabean model.
    But I am not clear about how to use complex data types like ArrayList, Collection etc in my java bean.
    If I use these complex datatypes in my bean, when creating model in WDF it displays the Complex data elements in Model Relation. I dont know how to use this model relation in my WD project.
    Anyone please explain the<b> step by step solution</b> about using complex data type(used in Bean) in WD Project.
    Thanks,
    Krishna Kumar

    Hi Krishna,
    Valery`s blog contains sample code ( http://www.jroller.com/resources/s/silaev/Employees.zip )
    Another blogs from this area:
    /people/anilkumar.vippagunta2/blog/2005/09/02/java-bean-model-importer-in-web-dynpro
    /people/valery.silaev/blog/2005/08/30/javabean-model-import-when-it-really-works
    And forum topics:
    Import JavaBean Model
    Problem Importing JavaBean Model in NetWeaver Developer Studio
    Issue on "Import JavaBean Model"
    import  JavaBean Model: no executable Methods?
    JavaBeans Model Import
    POLL : JavaBean Model Importer
    JavaBean-Model
    Invalid Class - Javabean not available for import
    WebDynpro Using JavaBean Model ->Please Help
    Best regards, Maksim Rashchynski.

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • Consuming an ASP web service which responds with complex data types...

    Here's my problem - I'm trying to consume a web service from a provider that uses complex data types.
    The starting part of the WSDL looks like this (I've not included the whole thing) - named have been changed to protect the innocent:
    <wsdl:definitions targetNamespace="http://domain_name">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://domain_name">
    <s:element name="Authentication">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Token"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="AuthenticateResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="AuthOK" type="s:int"/>
    <s:element minOccurs="0" maxOccurs="1" name="Token"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    Since it's a complexType return, with a sequence, I'd expect an array or structure returned, but instead I just get the "AuthOK" value, and no way to get anything else.
    Here are the ways I've tried calling it:
    <cfscript>
        WS = createObject("webservice", "https://WSDL_URL");
        WS_ret = WS.Authentication(Username = "username", Password = "password", Token = "");
    </cfscript>
    <cfdump var="#WS_ret#" />
    <cfinvoke webservice="WSDL_URL" method="Authentication" returnVariable="WS_ret">
        <cfinvokeargument name="userID" value="7253320" />
        <cfinvokeargument name="password" value="ctpjxs3" />
        <cfinvokeargument name="SecurityToken" value="" />
    </cfinvoke>
    <cfdump var="#WS_ret#" />
    Any ideas how I can get the other variables in the sequence? I have other calls after this that have a much larger amount of variables, and as such I can't use it without being about to get more of the

    Thanks for the reply.
    If I CFDUMP the variable it returns just "1", no XML tags, nothing at all around the data - according to the web service providers they say that they are supplying the Token part as long as the first variable is "1" (a logical true if the authentication passed). If it is "0" then no Token is returned, that is why it's optional.
    As for the CFdocs issue, look here:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservices_25.html
    The paragraph before it (about 2/3 down the page) states:
    In this example, the operation updateEmployeeInfo takes a complex type as input and returns a complex type as output. To handle the input parameter, you create a structure. To handle the returned value, you write it to a ColdFusion variable, as the following example shows:
    It even states that you call "updateEmployeeInfo", and nowhere mentions "echoStruct" as a method - it's seemingly been put in as a random method name, or a function call for something else. The WSDL above the example only mentions "updateEmployeeInfo" and "updateEmployeeInfoSoapOut", again not mentioning "echoStruct".
    I see this as an error in the docs as it's calling a non-existant entity in the WSDL, which should cause a run-time error.

  • How to pass table data to brf plus application through abap program

    Dear All,
    i have a question related to BRF Plus management through abap program.
    In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
                                           Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
    in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
    And my question is
    1) How to pass fields to BRF Plus application from abap program.
    2)How to pass Table data to BRF Plus application from abap program.
    3)How to pass Structure data to BRF Plus application from abap program.
    4)How to get the result data from BRF Plus application to my abap program.
    And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
    How do i get the code automatically when calling the function in brf plus application.
    Regards
    venkata.

    Hi Prabhu,
    Since it is a Custom Fm i cant see it in my system.
    Look if u want to bring data in internal table then there could be two ways::
    1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
    2) read values one by one and append to internal table.
    Thanks
    Rohit G

  • Complex data type to application service create method(CRUD)(Urgent)

    Hi Experts,
    I have created an entity service with remote persistency(Web service).i am mapping the entity service CRUD methodes to web service methodes and i am calling these CRUD methodes form the corresponding applicaion service CRUD methodes.With out complex data types both sevices are working  fine.I have tested them in the service browser.
    Later I have created a complex data type in the entity service and mapped it to web service.But when i am creating the application service create(CRUD) method for this entity service the complex data type which i have created in the entity service is not being shown as possible input attributes of the application service create method.Due to this i am not able to pass this complex attribute form the application service create method to the entity service create method.
    Plz tell me how can i resilve this issue.(Urgent)
    Thanks
    Sampath.G

    Hi Sampath,
    Please check SAP note 1004108. I think the issue you describe is one of the limitations described in this note.
    Regards,
       Jan

  • Working with complex data types in web services ...

    Hi All,
    I have created a webservice and created an interface for that in ADF. Now as my web service returns a complex data type, i followed the steps given in this article "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" and it works fine, my results also get displayed. But only issue is i get a warning "JBO-25009: Cannot create an object of type:java.util.calendar with value:2008-09-23T23:51:30.000+05:30" and if i replace all the java.util.Date with oracle.jbo.domain.Date then i get a warning "JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:2008-09-23T23:51:30.000+05:30". Now i am unable to understand this although i believe it is a data type mapping issue, but not sure how to rectify it.
    Anybody knows the wayout?
    Regards
    Lokesh

    Andre,
    Thanks for youe response. I also tried makeing data type as string in place of date in data control.xml and it worked fine. So it confirms that i am facing with exactly similar issue as yours.
    I tried solution 2 mentioned in Frank's mail but its not helping[in fact i am already using web proxy as i am delaing with complex data types]. I created a web proxy and in java bean i placed break points to check the control flow[in order to check the root cause] but control never reaches the java bean!! I am not sure about the cause for it...control should pass through java bean isn't it??
    I am quite new to SOA...so can somebody just elaborate on how to rectify this using web proxy. I have been using this rl "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" to work with web proxies" to work with proxies.
    Regards
    Lokesh

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

  • Can "SPML Web Service Complex Data Type field" take multiple values ?

    In Generic Technology Connector's -SPML design parameters section, Can we give multiple values in SPML Web Service Complex Data Type field?
    If not, how can i call methods directly instead of calling them through a values of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type?
    I need 'SPML Web Service Complex Data Type' to hold multiple values.And based on the request it has to initiate appropriate method of action.
    Presently i have three methods add,modify and delete which i am calling through a single value of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type.
    I want to replace this single value with multiple menthods , so that a direct interaction between the method,OIM and target can be established.
    Edited by: 821054 on 16/02/2011 04:23

    Thanks Robert.
    You'll need to create your own interface to the webapp database for those kind of data operations
    by this, are you speaking of the internal BC database which stores web app schema data? That would be great if it were possible to update that programmatically because I need to use the List (Checkbox List) field type (for the search functionality), but I need to supply the checkbox options from a web app rather than by manually updating the list entered in the Fields view of the web app settings (shown below).
    I'm curious if anyone else has tried this?
    Again, my reason for needing to use the List (Checkbox List) field type is that the page which processes searches knows to expect a comma separated list for this field type and then appears to be parsing out the individual values for searching out web app items with 1 or more matching values. You're right that text fields (string and multiline) just check for 'string contains' matches, and this would be ok if I was only ever needing to search just one value at a time. Here's an example of what I might do:
    Web App item field value (as recorded against the List (Checkbox List) field type:
    8294877,8294878
    Web App Search value (for this same field):
    8294879,8294877,8294885
    The search would return this web app item because the field contains 2 (1 or more) individual values even though they were entered into the search field in a different order. If this web app item were just a Text (string or multiline) field, the searched value is not a substring of the web app item's stored value, so it would not find a match. Hence the need to use Checkbox List field type.
    The web app will have thousands if not 10s of thousands of records, so dumping them all into one big array or object and searching on the front-end won't be practical (though it works great on smaller datasets).

Maybe you are looking for