Hi Franck, Ben and Kaleb, First a little back story: the current web service stack in Flex shares many similarities with Axis 1.X (some of the same folks authored both). Back when these stacks were originally developed RPC services using SOAP encoding were the rule. So the legacy RPC/Encoded support is solid.
There were a variety of general inter-op and validation issues with RPC/Encoded web services and that led to WS-I and the document literal wrapped style. Support for this style is not quite as solid which is unfortunate. This is an area that is being actively worked on now. If you are running into specific problems with document literal wrapped, let us know via Adobe support, the FDS forum (http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60&catid=583) or here, and if it's an option, try out the RPC/Encoded style for the service you're having trouble with. Regarding Kaleb's issue: I'm able to repro the problem of empty args being sent in the call. It's a bug. However, if I adjust the xsd to use a nested complex type for the string arrays like so: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://server.webservices.tutorials.wakaleo.com/" targetNamespace="http://server.webservices.tutorials.wakaleo.com/" version="1.0"> <xs:element xmlns:ns1="http://server.webservices.tutorials.wakaleo.com/" type="ns1:sendStrings" name="sendStrings"></xs:element> <xs:complexType name="sendStrings"> <xs:sequence> <xs:element type="tns:ArrayOfString" minOccurs="0" maxOccurs="1" name="strings"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfString"> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:element xmlns:ns2="http://server.webservices.tutorials.wakaleo.com/" type="ns2:sendStringsResponse" name="sendStringsResponse"></xs:element> <xs:complexType name="sendStringsResponse"> <xs:sequence> <xs:element type="tns:ArrayOfString" minOccurs="0" maxOccurs="1" name="strings"></xs:element> </xs:sequence> </xs:complexType> </xs:schema> And then make the call: ws.sendStrings(["foo", "bar"]); The outbound SOAP body contains the serialized array of strings: <?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:sendStrings xmlns:ns1="http://server.webservices.tutorials.wakaleo.com/"><strings><string>foo</string><string>bar</string></strings></ns1:sendStrings></SOAP-ENV:Body></SOAP-ENV:Envelope> I don't know if you can regenerate your service based on the updated schema but it may be worth a try. Best, Seth -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Franck de Bruijn Sent: Friday, August 18, 2006 9:49 PM To: [email protected] Subject: RE: [flexcoders] Re: WebService - What's wrong with this code? And today this one came in: http://groups.yahoo.com/group/flexcoders/message/47827 What I sense is that most of the problems are somehow related to DOC/Literal versus RPC/Encoded, but of course I cannot be sure. I'm exposing my webservices both via DOC/Literal and RPC/Encoded. These webservices take a variety of arguments and also return a variety of results. With variety I mean from simple primitive types, to complex objects nested within complex objects containing arrays of Strings. Via RPC/Encoded everything works as a charm (I'm using the Apache AXIS engine), but via DOC/Literal issues arise. Cheers, Franck -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Friday, August 18, 2006 5:16 PM To: [email protected] Subject: RE: [flexcoders] Re: WebService - What's wrong with this code? And my personal favorite: http://groups.yahoo.com/group/flexcoders/message/47493 -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Friday, August 18, 2006 10:50 AM To: [email protected] Subject: [flexcoders] Re: WebService - What's wrong with this code? Here are a couple. http://groups.yahoo.com/group/flexcoders/messages/47267?threaded=1&m=e&var=1 &tidx=1 http://groups.yahoo.com/group/flexcoders/messages/46548?threaded=1&m=e&var=1 &tidx=1 I can confirm that I am working with an Adobe engineer to try and resolve both issues (our company has a support contract with Adobe), so they are listening and interested in fixing issues people are having. I think thats a good sign. Ben --- In [email protected], "Samuel D. Colak" <[EMAIL PROTECTED]> wrote: > > Umm Franck what issues with webservices? > > > On 15/8/06 20:00, "Franck de Bruijn" <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > That¹s exactly what Ben is hammering at. > > > > It¹s too hard to get webservices up and running in a production-like > > application easy. It¹s true that Adobe is focussing more on FDS than on the > > support for webservices, which is truely a pity. Let¹s hope it¹ll change in > > the (near) future. I already saw a good sign of an Adobe engineer trying to > > look into our problems. > > > > Cheers, > > Franck > > > > > > > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > > Of Samuel D. Colak > > Sent: Tuesday, August 15, 2006 10:22 AM > > To: [email protected] > > Subject: Re: [flexcoders] Re: WebService - What's wrong with this code? > > > > > > > > Hold on VS buggy ?? My god, that¹s amazing news there was I thinking for a > > moment that M$oft had got it right at least once - Œfraid to say im most > > disappointed my world has surely shattered frankly I would advise everyone > > that can to use the Eclipse plugin rather than the IDE under Windows. I have > > experienced far fewer issues with Eclipse ;) But I have experienced SOME ! > > > > Im working with both VS.Net 2005 and Eclipse/Flex cant say that there have > > been any issues with WebServices AT-ALL categorically using actionscript. I > > must admit it wasn¹t easy but its a tad different getting use to asyncronous > > webservice calling though Flex¹s event model but I finally managed to make > > something very elegant and scalable. Obviously this isnt for the fainthearted > > and you might have to unlearn somethings from the VS world (as I did) to deal > > with the Flex logic. > > > > If anyone is stuck, give me a shout.. > > Samuel > > > > > > On 15/8/06 10:02, "sinatosk" <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >> > >> > >> ah white spaces. convert that URL using urlencode.... can't remember the > >> function/method name but it's around > >> > >> thats might do the trick :p > >> > >> On 14/08/06, Tom Lee <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >> > >> Thanks, Ben - > >> > >> Your code works fine. My code, even after I manually edited to make it > >> identical to yours, does not. I can only conclude that Flex Builder is on > >> crack. Seriously, I went over it line by line... No differences except > >> whitespace. I hope this is not going to become a behavioral pattern in > >> Builder... I work with Visual Studio, and there's no room for more than one > >> buggy IDE in my life. > >> > >> Thanks again, > >> > >> -tom > >> > >> > >> > >> -----Original Message----- > >> From: [email protected] <mailto:flexcoders%40yahoogroups.com> > >> [mailto: [email protected] <mailto:flexcoders%40yahoogroups.com> ] > >> On > >> Behalf Of ben.clinkinbeard > >> Sent: Friday, August 11, 2006 10:01 PM > >> To: [email protected] <mailto:flexcoders%40yahoogroups.com> > >> Subject: [flexcoders] Re: WebService - What's wrong with this code? > >> > >>> > Does it compile for you without errors? > >> > >> Yep, this exact code works for me. > >> > >> <?xml version="1.0" encoding="utf-8"?> > >> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > >> layout="absolute" creationComplete="init()"> > >> <mx:Script> > >> <![CDATA[ > >> import mx.rpc.soap.LoadEvent; > >> import mx.rpc.soap.WebService; > >> > >> private function init():void > >> { > >> var myWebService:WebService; > >> myWebService = new WebService(); > >> > >> > >> myWebService.loadWSDL("http://webservices.amazon.com/AWSECommerceService/AWS > >> ECommerceService.wsdl"); > >> myWebService.addEventListener("load", > >> loadComplete); > >> } > >> > >> private function loadComplete(event:LoadEvent):void > >> { > >> trace("ALL GOOD"); > >> } > >> ]]> > >> </mx:Script> > >> </mx:Application> > >> > >>> > > >>> > -----Original Message----- > >>> > From: [email protected] <mailto:flexcoders%40yahoogroups.com> > >>> [mailto: [email protected] <mailto:flexcoders%40yahoogroups.com> ] > >>> On > >>> > Behalf Of ben.clinkinbeard > >>> > Sent: Friday, August 11, 2006 12:42 PM > >>> > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > >>> > Subject: [flexcoders] Re: WebService - What's wrong with this code? > >>> > > >>> > For your second example, if you wrap the lines other than the import > >>> > inside of a function it should work. > >>> > > >>> > HTH, > >>> > Ben > >>> > > >>> > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , > >>> "Tom Lee" <design@> wrote: > >>>> > > > >>>> > > I can't figure this out for the life of me - I'm following other > >>> > people's > >>>> > > examples, but still getting errors. This must be something obvious. > >>> > Here's > >>>> > > my code (I've removed the actual WSDL url): > >>>> > > > >>>> > > > >>>> > > > >>>> > > <?xml version="1.0" encoding="utf-8"?> > >>>> > > > >>>> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > >>> > layout="absolute"> > >>>> > > > >>>> > > <mx:Script> > >>>> > > > >>>> > > <![CDATA[ > >>>> > > > >>>> > > import mx.rpc.soap.WebService; > >>>> > > > >>>> > > var myWebService:WebService; > >>>> > > > >>>> > > function initWS(){ > >>>> > > > >>>> > > myWebService = new > >>>> > > WebService(); > >>>> > > > >>>> > > > >>>> > > myWebService.loadWSDL("**********************"); > >>>> > > > >>>> > > } > >>>> > > > >>>> > > ]]> > >>>> > > > >>>> > > </mx:Script> > >>>> > > > >>>> > > </mx:Application> > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > And here's my error: > >>>> > > > >>>> > > > >>>> > > > >>>> > > 1061: Call to a possibly undefined method loadWSDL through a > >>> > reference with > >>>> > > static type WebService. (Line 9) > >>>> > > > >>>> > > > >>>> > > > >>>> > > I've tried a bunch of different stuff - here's another variation, > >> which > >>>> > > throws different errors: > >>>> > > > >>>> > > > >>>> > > > >>>> > > <?xml version="1.0" encoding="utf-8"?> > >>>> > > > >>>> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > >>> > layout="absolute"> > >>>> > > > >>>> > > <mx:Script> > >>>> > > > >>>> > > <![CDATA[ > >>>> > > > >>>> > > import mx.rpc.soap.WebService; > >>>> > > > >>>> > > var myWebService:WebService; > >>>> > > > >>>> > > > >>>> > > > >>>> > > myWebService = new WebService(); > >>>> > > > >>>> > > > >>>> > > myWebService.loadWSDL("******************************"); > >>>> > > > >>>> > > > >>>> > > > >>>> > > ]]> > >>>> > > > >>>> > > </mx:Script> > >>>> > > > >>>> > > </mx:Application> > >>>> > > > >>>> > > > >>>> > > > >>>> > > And the errors: > >>>> > > > >>>> > > > >>>> > > > >>>> > > 1120: Access of undefined property myWebService. (Lines 8 & 9) > >>>> > > > >>>> > > > >>>> > > > >>>> > > Thanks! > >>>> > > > >>>> > > > >>>> > > > >>>> > > - tom > >>>> > > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > -- > >>> > Flexcoders Mailing List > >>> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > >>> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> > >>> > Search Archives: > >> http://www.mail-archive.com/flexcoders%40yahoogroups.com > >>> > Yahoo! Groups Links > >>> > > >> > >> -- > >> Flexcoders Mailing List > >> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > >> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > >> Yahoo! Groups Links > >> > >> > >> > >> > >> > >> > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

