tags:

views:

233

answers:

2

Flex Builder 3 provides support to generate actionscipt from WSDL via the GUI ( Data->Import Web Service (WSDL) ) - but this sort of method requires that you check in the generated source. This is not desirable to us (we understand both sides of the 'should generated source be checked in' and we have decided that they should not) so we would like a method to generate the actionscript classes from an ant task. In this case, the WSDL would live in the file system.

Any ideas?

A: 

You could spent some time digging through Flex Builder's JARs to find the libraries they're using to do this, then invoke them from a very thin custom Ant Task you write yourself. The likelihood of this succeeding is small but might be worth investigating to save yourself a ton of work, just in case.

Short of that, I'd start with WSDL2Java to generate Java classes that represent your WSDL entities. The results won't necessarily be beautiful but you should get classes that adhere to the JavaBean spec. Then you could use one of the open source Java-to-ActionScript generators which include:

  • Granite Data Services' Gas3
  • Spicefactory's Pimento, which has Java->AS3 generation

I'm almost positive that Gas3 has an Ant Task you can use; not sure about Pimento.

cliff.meyers
This may be technically feasible but is certainly not something I would consider even remotely desirable.
Malcolm Featonby
We did something similar to this at my old job where the customer was using some .NET web services. It did take several days of tweaking an in-house Java->AS3 generation solution I'd written but it did work and saved us having to maintain everything by hand.
cliff.meyers
A: 

From the comments in the generated code Flex Builder uses Apache Axis2

/** * BaseBlaBlahService.as * This file was auto-generated from WSDL by the Apache Axis2 generator modified by Adobe * Any change made to this file will be overwritten when the code is re-generated. */

I've also found this on the Adobe Forum http://forums.adobe.com/thread/96006.

I'm also trying to solve this issue. I guess we need to create a feature request on the adobe flex website. Let me see if i can find my adobe.com user id....

Decado