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

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

      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"
      wsdl=" http://something.com:8080/ap-client=100&amp;wsdl=1.1">
      <mx:operation name="MaterialBasicDataByIDQueryResponse_In"
      <MaterialInternalID schemeAgencyID='' schemeID=''>DIESEL</MaterialInternalID>

      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.