Re: [flexcoders] WSDL objects -> Flex value objects
OK, super stuff... So I can use the automated Web Service -> VO builder that Peeyush mentioned and then a one liner to convert the SOAP object to a typed VO Class... Nice and thanks for persevering with me! :) On 4 February 2010 20:41, claudiu ursica wrote: > > > Yes you are correct. You need to define the VO's. > C > >
Re: [flexcoders] WSDL objects -> Flex value objects
y have a utc date here > returnDate = parseUtcDate(parseInt(dateString)); > } > else > { > // we didn't get a utc date so let's try to parse it... > returnDate = parseUtcDate(Date.parse(dateString)); > } > > return returnDate; > } > > public static function getBooleanValue(bValue:Object):Boolean > > { > var returnBoolean:Boolean = false; > var stringBoolean:String = bValue.toString().toLowerCase(); > if (stringBoolean == "true" || stringBoolean == "yes" || > stringBoolean == "1" || stringBoolean == "-1") > { > returnBoolean = true; > } > return returnBoolean; > } > > public static function clone(source:Object):* > { > var myBA:ByteArray = new ByteArray(); > myBA.writeObject(source); > myBA.position = 0; > return(myBA.readObject()); > } > > } > } > > > iside the result function (My proxy class implements IResponder) > > public function result(event:Object):void { > //translating the response into typed objects using the > //ObjectTranslator utility class > var response:LoginResponse = > ObjectTranslator.translateObject(event.result, new LoginResponse()); > > //handiling the response. > switch (response.errorCode) > { > case LoginErrorEnum.OK: > { > //populate the data object with the username, apssword > and > loginVO.authToken = (response.header as > GlobalAPIResponseHeader).sessionToken; > //user autenticated successfully send the session token > > //further > sendNotification(LOGIN_SUCCESS, authToken); > break; > } > etc... > > you could use here also the generated code, it is a matter of choice in the > end I guess. > > C > > -- > *From:* Nick Middleweek > *To:* flexcoders@yahoogroups.com > *Sent:* Thu, February 4, 2010 10:21:59 AM > > *Subject:* Re: [flexcoders] WSDL objects -> Flex value objects > > > > Hi, > > > Is there any article on how to use your method and does it work with > nth-level nested data structures? It could be that your way is easier and > saves recoding/ recreating classes?... > > Is there a benefit though to using Typed objects rather than untyped? Does > your way use untyped? > > Or perhaps I'm confused? :) > > > Cheers, > Nick > > > > On 4 February 2010 09:12, claudiu ursica yahoo.com > > wrote: > >> >> >> >> As Peeyush Tuli menstioned, you can go with the automatic conversion also. >> I just don't like the bunch of generated classes it is one abstract and one >> implementation for almost everything in there. However there's no room for >> error in there. >> It is a matter of choice in the end :). >> >> C >> > > >
Re: [flexcoders] WSDL objects -> Flex value objects
Hi, Is there any article on how to use your method and does it work with nth-level nested data structures? It could be that your way is easier and saves recoding/ recreating classes?... Is there a benefit though to using Typed objects rather than untyped? Does your way use untyped? Or perhaps I'm confused? :) Cheers, Nick On 4 February 2010 09:12, claudiu ursica wrote: > > > > As Peeyush Tuli menstioned, you can go with the automatic conversion also. > I just don't like the bunch of generated classes it is one abstract and one > implementation for almost everything in there. However there's no room for > error in there. > It is a matter of choice in the end :). > > C >
Re: [flexcoders] WSDL objects -> Flex value objects
As Peeyush Tuli menstioned, you can go with the automatic conversion also. I just don't like the bunch of generated classes it is one abstract and one implementation for almost everything in there. However there's no room for error in there. It is a matter of choice in the end :). C From: Nick Middleweek To: flexcoders@yahoogroups.com Sent: Thu, February 4, 2010 9:52:03 AM Subject: Re: [flexcoders] WSDL objects -> Flex value objects This is super, I'll try this out today and seems it could save me some leg-work... Claudiu, I'll check out the translator class as well. Cheers, Nick On 3 February 2010 15:40, Peeyush Tuli wrote: > > > > > > > > > > > > > > > > >> > >> > >Why dont you use this? > >http://shardulbartw al.wordpress. com/2008/ 03/20/import- web-servicewsdl- >wizard-in- flex-30/ > >its the easiest way to convert a wsdl to AS3 client stubs. > > >
Re: [flexcoders] WSDL objects -> Flex value objects
This is super, I'll try this out today and seems it could save me some leg-work... Claudiu, I'll check out the translator class as well. Cheers, Nick On 3 February 2010 15:40, Peeyush Tuli wrote: > > > Why dont you use this? > > > http://shardulbartwal.wordpress.com/2008/03/20/import-web-servicewsdl-wizard-in-flex-30/ > > its the easiest way to convert a wsdl to AS3 client stubs. > > >
Re: [flexcoders] WSDL objects -> Flex value objects
Why dont you use this? http://shardulbartwal.wordpress.com/2008/03/20/import-web-servicewsdl-wizard-in-flex-30/ its the easiest way to convert a wsdl to AS3 client stubs. On Tue, Feb 2, 2010 at 8:57 PM, Nick Middleweek wrote: > > > Hello, > > Does anyone know of a way to convert a WSDL document into a bunch of Flex > Classes? > > I'm working on a project where the WDSL data structures are changing and > it's a real pain to have to re-check what has changed and then re-code the > classes and Interfaces... > > > Thanks, > Nick > > >
Re: [flexcoders] WSDL objects -> Flex value objects
There are 2 version of the utility, I'm sucessfully using one of them. I can send it to you though if you need it. The idea is that you want to translate object from the response into custom objects. And that does exactly that thing. C From: Nick Middleweek To: flexcoders@yahoogroups.com Sent: Wed, February 3, 2010 12:46:21 PM Subject: Re: [flexcoders] WSDL objects -> Flex value objects Hey, thanks for the reply... I'm not sure how that helps though? Thanks On 2 February 2010 16:56, claudiu ursica wrote: > > > > > > > > > > > > > > > > >> > >> > >Google for Object Translator custom class. >C > >
Re: [flexcoders] WSDL objects -> Flex value objects
Hey, thanks for the reply... I'm not sure how that helps though? Thanks On 2 February 2010 16:56, claudiu ursica wrote: > > > Google for Object Translator custom class. > C > >
Re: [flexcoders] WSDL objects -> Flex value objects
Google for Object Translator custom class. C From: Nick Middleweek To: flexcoders@yahoogroups.com Sent: Tue, February 2, 2010 5:27:34 PM Subject: [flexcoders] WSDL objects -> Flex value objects Hello, Does anyone know of a way to convert a WSDL document into a bunch of Flex Classes? I'm working on a project where the WDSL data structures are changing and it's a real pain to have to re-check what has changed and then re-code the classes and Interfaces.. . Thanks, Nick
[flexcoders] WSDL objects -> Flex value objects
Hello, Does anyone know of a way to convert a WSDL document into a bunch of Flex Classes? I'm working on a project where the WDSL data structures are changing and it's a real pain to have to re-check what has changed and then re-code the classes and Interfaces... Thanks, Nick