actionscript 3 - How to consume nusoap webservice from Flash -


I am trying to open a webservice written in NewsP from an AS3 Flash app; I have read that, starting with AS3, webservice support has been removed in Flash (why not really understand why ...); I have tried to resolve the party (maybe, thought, Carlo Eldestant), but they do not work with WSDL, which produces nuts. I am really worried and I should use flash and do not want flex, can anyone help me?

Thanks in advance c.

It's not lightweight (it adds something like 130 KB in your SBF), but you have a The ActionScript project can use Flex's WebService API, to manually add essential SCC manually without any required black magic. / P>

I did this myself and I have no problem. I've added flex.swc, frameworks.svc, rpc.swc and utilities.swc (plus in all the swc locale folder). I did not do much for this, in fact, all the SCCs were added to the SDK until it was compiled. Since the compiler will only add the referenced squares, so it should not make much difference and it was fast and easy.

I'm pasting some code, probably it has helped (most example Mxlm used by me):

  Personal function setup WebService (): Nil {_ws = New WebService (); _ws.addEventListener (LoadEvent.LOAD, handleWsdlLoad); _ws.getFeeds.addEventListener (InvokeEvent.INVOKE, handleGetFeedsInvoke); _ws.getFeeds.addEventListener (ResultEvent.RESULT, handleGetFeedsResult); _ws.getFeeds.addEventListener (FaultEvent.FAULT, handleGetFeedsFault); _ws.loadWSDL (_wsdlUrl); } // At some point, call this method; Not sure that you have to wait until the wsdl is loaded / I think it is not necessary; If I miss the right, all calls are pressed on the private function testGetFeeds (): zero {_ws.getFeeds ("some_param"); }  

Hope it helps.

PS This is the WebService class that I am referring to in the code:

  import mx.rpc.soap.WebService;  

Comments