Hi,

You can simply use an object like :

public class MyAuth {
  public var username:String = '';
  public var password:String = '';
}

and call your Webservice like :

var auth:MyAuth = new MyAuth;
auth.username = 'mika';
authenticationService.startSession(auth);

I think you can egally use Object like this :

authenticationService.startSession( {username: "mika", password: 'pass'} );

Hope this help...
Mickael



Hi,
I'm new to Flex and hoping you all might be able to answer a question
I have had for a while. In ActionScript, I'm trying to pass a
parameter to a web service. I'm using the WebService class in the
following way:
...
authenticationServi
ce = new WebService();
authenticationService.loadWSDL("http://localhost:8080/alfresco/wsdl/authentication-service.wsdl
 
<http://localhost:8080/alfresco/wsdl/authentication-service.wsdl>");
authenticationService.startSession("parameter"); // startSession being
the name of the operation.
...

Now, the parameter is a complextype:

<element name="startSession">
<complexType>
<sequence>
<element name="username" type="xsd:string"/>
<element name="password" type="xsd:string"/>
</sequence>
</complexType>
</element>

How do I represent this type in ActionScript? As an object? I hope
this makes sense?! Thank you in advance for any help!
Keith

Reply via email to