Blu,
thanks for your help, and your vote of confidence in the wellconsidered classes.
I don't want you to have to open my FLA, so I'll explain as briefly as possible the operations, and what I'm finding difficult:
In my present setup, I connect to the web service, which when successful calls a function:
myWebService.addEventListe
myWebService.loadWSDL("htt
2 main things happen on this function. The CheckUser method is called on the service, and the barcode number is sent using the send method.
function checkUser(evt:LoadEvent) {
myOperation=Operation(myWe
myOperation.addEventListen
myOperation.addEventListen
myOperation.send(barcode);
}
Finally the result is returned through a last function, in which the value of the var userid is gotten from the object:
function cuResult(evt:ResultEvent) {
var cu=evt.result;
trace(cu.userId)
}
I can't quite get the syntax to work on this. Any help would be much appreciated.
Thanks
Main Topics
Browse All Topics





by: blue-geniePosted on 2009-08-21 at 03:21:34ID: 25150345
i use the wellconsidered class no problem.
ionEvent.C OMPLETE, onResult); ionEvent.F AILED, onFault);
:void
i didn't download your file but here's a basic example of what you need to do.
1. import the classes
2. create a new instance and give it the address to wsdl
var ws = new WebService(serverIP + "/Main.asmx?wsdl");
3. give listeners
var op:Operation = new Operation(ws);
op.addEventListener(Operat
op.addEventListener(Operat
I use a doOperation function with a switch statement as I execute a number of different methods wth the one service.
so for example I call it somewhere .
doOperation("checkDate");
function doOperation(what:String") {
switch (what) {
case "checkDate":
op.checkDate(param1, param2); //etc
break;
}
}
then in the onResult, again use a switch to handle the returned variables.
functon onResult(e:OperationEvent)
{
switch (action) {
case "doLogonResult":
//do whatever based on your service
break;
}
}
and the same with fault handling.
blu