PDA

View Full Version : Web Service Problems, Couldn't Find Method


LostInRecursion
08-12-2006, 12:59 PM
Hi all,

I am using Web Services to load some data into my Flex 2 app, but no matter which method I try (Pure Actionscript 3 was preferred, although I did try MXML as well), I can connect to the service, but when I try to call a method, the runtime error is:

"Couldn't find [methodBeingCalled] in service."

Applicable code is as follows:

AS 3.0 Version
-----


import mx.rpc.soap.WebService;

var ws:WebService = new WebService();
ws.addEventListener ("fault", webServiceFault);
ws.myMethod.addEventListener("result", webServiceResult);
ws.loadWSDL("http://www.myDomain.com/myCFCs/WebServiceCF.cfc?wsdl");
ws.myMethod.send();


I know that the CFC exists and that the method is present, but I cannot get it to work.

I even went so far as to do the whole call in MXML via <mx:WebService /> with operations tags and THAT didn't work either, same message.

MXML Version

<mx:WebService wsdl="http://www.myDomain.com/myCFCs/WebServiceCF.cfc?wsdl" result="webServiceResult" fault="webServiceFault" id="ws">
<mx:operation name="myMethod" />
</mx:WebService>



What am I missing??