1 Reply Latest reply on Sep 11, 2007 9:57 PM by Rahul Mainkar

    Webservice Attribute Passing

    Rahul Mainkar Level 1
      Hi All,
      I am trying to use some standard Webservices offered by SAP and build a flex application.
      The webservice accepts the following parameters
      1. MaterialBasicDataSelectionByID
      2. MaterialInternalID

      Code below is the SOAP body which is passed to the server. I got this from the webservice navigator of SAP WAS server which we use to test webservice

      <SOAP-ENV:Body>
      <ns1:MaterialBasicDataByIDQuery_sync xmlns:ns1=' http://sap.com/xi/SAPGlobal20/Global'>
      <MaterialBasicDataSelectionByID>
      <MaterialInternalID schemeAgencyID='' schemeID='' xmlns:pns=' http://sap.com/xi/SCMBasis/Foundation/Global' > DIESEL</MaterialInternalID>
      </MaterialBasicDataSelectionByID>
      </ns1:MaterialBasicDataByIDQuery_sync>
      </SOAP-ENV:Body>

      Interestingly, some attributes are passed to the server(in bold) which are schemeAgencyID and schemeID. These attributes are passed inside the MaterialInternalID parameter tag.

      Now the questions is how to pass these values to the server using flex? I tried the following code in Flex builder 2 but it gave an error stating that attribute passing is not allowed.

      <mx:WebService id="wsGetList"
      showBusyCursor="true"
      makeObjectsBindable="true"
      service="/SCMB/PDM_PRD001QRService"
      port="_-SCMB_-PDM_PRD001QRSoapBinding"
      fault="f_fn(event)"
      wsdl=" http://something.com:8080/ap-client=100&amp;wsdl=1.1">
      <mx:operation name="MaterialBasicDataByIDQueryResponse_In"
      resultFormat="e4x"
      result="seeMe(event)">
      <mx:request>
      <parameters>
      <MaterialBasicDataSelectionByID>
      <MaterialInternalID schemeAgencyID='' schemeID=''>DIESEL</MaterialInternalID>
      </MaterialBasicDataSelectionByID>
      </parameters>
      </mx:request>
      </mx:operation>
      </mx:WebService>


      I tried the same code in Flex builder 3 and it worked without any errors. But still somehow the data is not getting passed to the server correctly. The standard SAP webservice needs the attribute data i.e. schemeAgencyID='' schemeID='' without which it gives incorrect results.

      Is this kind of a webservice cannot be handled in flex?
      Also,is this kind of attribute passing supported by Flex or is this a bug in it. Please let me know if there is any work around for passing attributes inside the parameters tag.
      I would greatly appreciate your thoughts on this issue.

      Thanks in advance.