0 Replies Latest reply on Jul 14, 2009 3:28 AM by pbirkoff

    Casting webservice Objects


      I've got a question about Webservices in Flex. When using the 'Import Web Service'-command, Flex automatically creates the appropiates Classes and Connection scripts. When using these scripts, Flex automatically casts Objects received by a Webservice to a Strong-typed Class, and not a ObjectProxy. This is very handy. The only downside of this features is that you'd have to recreate all the files when you change a property in your webservice. Because I had to make manual changes in the generated files, everytime I make a change in my Webservice, I have to update all these files again. Therefor I would like to make my own connectionscripts, so when my webservice changes, I only have to make this change in my Flex-classes. Problem is I couldn't find any scripts that correctly connects to a Webservice, AND casts my objects to a Strong-typed class. Everytime I try to cast a received ObjectProxy to a certain Class, I get null returned. I've tried several things, including the SoapDecoder, and the SchemaRegister, but I somehow can't get it to work.


      Does anybody has an example of a script that does this job or know how to get this done?