I've not dealt with authentication but here is how to call an operation.
// getOperation() returns generic AbstractOperation by default
// you want mx.rpc.Operation, not mx.rpc.mxml.Operation
var op:Operation = ws.getOperation("doCoolStuff") as Operation;
op.arguments.arrayArg = new Array("foo", "bar");
op.arguments.objectArg = {propA: "tweedle", propB: "dee"};
op.send();
You can optionally capture the token created by the call and assign a
responder as well:
var call:ASyncToken = op.send();
call.addResponder(IResponder);
The IResponder interface defines a result and fault method that are
called when the operation returns.
HTH,
Ben
--- In [email protected], "phipzkillah" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to create a web service in pure action script. I need to
> authenticate and then call the proper method from the web service.
>
> I have not seen any good tutorials explaining how to do this...
>
> This is my current snippet:
>
> private function init():void{
>
> var ws:WebService = new WebService;
>
> ws.wsdl =
> "http://sc-vmx-03/clarusipc/services/InventoryService?wsdl";
> ws.useProxy = false;
>
>
>
ws.loadWSDL("http://sc-vmx-03/clarusipc/services/InventoryService?wsdl");
>
> }
>
> What is the format to add in an operations object that will include
> the method and parameters that I'm going to call?
>
> How would I go about editing the http request to include a username
> and password to authenticate against?
>
> Any help would be greatly appreciated!!! It's driving me nuts!
>