ryan_m
08-02-2006, 07:44 PM
Folks,
I am struggling here, hopefully somebody can get me going in the right direction. I'm an experienced AS2 developer who's recently learnt AS3 and Flex. I'm trying to create a flex2 app that acts as a client to a web service. I've found that very simple scenarios work, for example: If I use the WebService object (either through MXML or the AS3) I can point it to my WSDL file and then make a call to a webservice operation that doesn't accept any parameters and returns a simple string. So I know the basic connectivity is working. But I am struggling when working with operations that requires parameters. I've tried to pass the parameters via the mx:request object and also in code and I generally get the following error:
faultCode:Server.Error.Request
faultString:'HTTP request error'
faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://devzonedemo.businessobjects.com:8080/dswsbobje/services/session"]. URL: http://devzonedemo.businessobjects.com:8080/dswsbobje/services/session'
So I have two specific questions:
1) When the WSDL for a web service operation defines an argument that is a complexType, what is the syntax for passing these parameters either through raw AS3 code or via the MXML WebService component?
2) I've read in the livedocs that anytime the Flash player makes an HTTP request (like when it calls a web service) and the status code is anything other than 200 (OK) then the Flash Player doesn't get the content of the response and thus can't provide proper handling of soap faults. It says to use a proxy (i.e. the useProxy="true" property) but I dont really know what this means or how to use it. If I just keep my code the same and set useProxy to true then I get this:
faultCode:InvokeFailed
faultString:'[MessagingError message='Unknown destination 'DefaultHTTP'.']'
faultDetail:'Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (../session.wsdl)'
So how do I get Flash to properly give me soap faults back? As you can see, this is closely related to my first question because if I got a good error message back I'd most likely know what I'm doign wrong with the parameters.
Any help or ideas would be much appreciated. Thank you in advance..
Ryan
I am struggling here, hopefully somebody can get me going in the right direction. I'm an experienced AS2 developer who's recently learnt AS3 and Flex. I'm trying to create a flex2 app that acts as a client to a web service. I've found that very simple scenarios work, for example: If I use the WebService object (either through MXML or the AS3) I can point it to my WSDL file and then make a call to a webservice operation that doesn't accept any parameters and returns a simple string. So I know the basic connectivity is working. But I am struggling when working with operations that requires parameters. I've tried to pass the parameters via the mx:request object and also in code and I generally get the following error:
faultCode:Server.Error.Request
faultString:'HTTP request error'
faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://devzonedemo.businessobjects.com:8080/dswsbobje/services/session"]. URL: http://devzonedemo.businessobjects.com:8080/dswsbobje/services/session'
So I have two specific questions:
1) When the WSDL for a web service operation defines an argument that is a complexType, what is the syntax for passing these parameters either through raw AS3 code or via the MXML WebService component?
2) I've read in the livedocs that anytime the Flash player makes an HTTP request (like when it calls a web service) and the status code is anything other than 200 (OK) then the Flash Player doesn't get the content of the response and thus can't provide proper handling of soap faults. It says to use a proxy (i.e. the useProxy="true" property) but I dont really know what this means or how to use it. If I just keep my code the same and set useProxy to true then I get this:
faultCode:InvokeFailed
faultString:'[MessagingError message='Unknown destination 'DefaultHTTP'.']'
faultDetail:'Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (../session.wsdl)'
So how do I get Flash to properly give me soap faults back? As you can see, this is closely related to my first question because if I got a good error message back I'd most likely know what I'm doign wrong with the parameters.
Any help or ideas would be much appreciated. Thank you in advance..
Ryan