Skip to Content
0
Former Member
Nov 19, 2008 at 10:56 AM

How to call a SAP service from adobe flex

39 Views

Hi experts,

I need to call a webservice create from SAP BAPI my URL is: http://xxxxxxxxx:8000/sap/bc/srt/wsdl/bndg_DD90E166ACE1B1F18AD8001B789FF0AD/wsdl11/allinone/ws_policy/document?sap-client=200, with this URL I can test the webservice from WsNavigator.

The operation is ZimrfcVerifOtUbica and the input structure is:

ZimrfcVerifOtUbica

-


> PiNumeroAlmacen (input parameter)

-


> PiOTransporte (input parameter)

The output structure is:

ZimrfcVerifOtUbicaResponse

-


>PoMessage (output parameter)

I've created a view with two inputfield (one to PiNumeroAlmacen, one to PiOTransporte), one button and one label (to put the result value).

but I don't know how to call the WS, I tried with this code:

<mx:WebService id="ZCCONVERTERService"

wsdl="http://xxxxxxxxx:8000/sap/bc/srt/wsdl/bndg_DD90E166ACE1B1F18AD8001B789FF0AD/wsdl11/allinone/ws_policy/document?sap-client=200;" useProxy="false" >

<mx:operation name="ZimrfcVerifOtUbica" resultFormat="e4x">

<mx:request >

<PiNumeroAlmacen>AGR</PiNumeroAlmacen>

<PiOTransporte>01000</PiOTransporte>

</mx:request>

</mx:operation >

</mx:WebService>

and I get this error: [RPC Fault faultString="Could not load WSDL" faultCode="Server.NoServicesInWSDL" faultDetail="No <wsdl:service> elements found in WSDL at ."].

I tried with actionscript and runtime library but I get this error: java.lang.Exception: Unsupported element in WSDL file: UnknownExtensibilityElement

I tried put in Data--> Import Web Service and I put the URL and I get Unable to load the WSDL. Specify another URI.

Other thing is for this webservice I've created a logic destination, and this webservice is used in a webdynpro aplication and works correctly. But now I need to use the same webservice in flex.

Could you help me to call to this webservice?

Thanks in advance.

Jose