Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error while ws./xxxx/xxxx.send(); while accessing a webservice from Flex

jayakumarkb_81
Participant
0 Kudos

Dear All.

i am having a webservice. an error is occurring while i try to compile the same from flex.

<mx:WebService id="ws" useProxy="false" showBusyCursor="true" wsdl="http://xxx.xx.xxx.xxxx:8000/sap/bc/soap/wsdl11?services=/PACK/XXX_INTEGRATION&amp;style=rpc_enc">

and i rote the code to call the function from a Button click.

public function click():void

{

ws./PACK/XXX_INTEGRATION.send();

}

but one error is showing while i try to compile the flex file.

Error: Syntax error: expecting identifier before div.

and the error is due to the '/' symbol in the webservice. since the webservice is in a package i cannot change the '/' symbol

how can i solve this issue.

Please Help.

2 REPLIES 2

athavanraja
Active Contributor
0 Kudos

you have to encode the wsdl url or alternatively instead of setting the url of the wsdl in mx:WebService tag set it at

public function click():void

{

ws.wsdl = "http://xxx.xx.xxx.xxxx:8000/sap/bc/soap/wsdl11?services=/PACK/XXX_INTEGRATION&amp;style=rpc_enc" ;

ws./PACK/XXX_INTEGRATION.send();

}

Former Member
0 Kudos

Hi Jay,

A Quick solution for this can be expose your RFC as web service which will be having simple operation name ( not containing / ).

for this you can open your RFc thru SE37 t code then follow web service creation wizard at Menu Bar - >Utilities -> More Utilities -> Create Web service.

Then you can use this web service path in ur wsdl.

For your reference you can refer Generating Web Service Using WS Wizard part in below pdf link.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20010e0b-b985-2c10-84a6-c4cea74a0...

Hope this will help you.

Regards,

Vivek