Auto generating AS3 VO classes from WSDL

Currently I use Eclipse to generate VO classes from the WSDL.

The problem with that is that I can't override the classes and add more properties and functions as I need.

A possible solution is to use a custom code generator that will generate the classes on my conditions. Then I can define a class to extend my classes and not the model's classes, or set all base classes to extend EventDispatcher, etc.

Moreover - then I won't be influenced by the changes done in Flex builder during the versions (the Flex builder generates completely different code than the Flash builder 4).

1. Is there any other way to add my own functions and properties to the VOs?

2. What code generation software do you recommend?

Comments

You should check out Farata systems DTO2FX.

It does exactly what you need.

It is an eclipse plugin, that generates the AS VO counterpart of a server object while utilizing the generation gap design pattern.

Basically, it means that given a Employee server DTO, it will generate 2 AS classes: _Employee and Employees that extends _Employee.

Everytime you generate after that, only the _Employee class is re-generated. the Employee class remains untouched - which allows you to add functionality to it and count on it being there forever after.

 

HTH,

Sefi

I've tried that, and it's really cool.

One problem though - it menas changing the Java code. The Java code is also auto-generated from the WSDL - the same as the AS.

So if there's sometihng like that for WSDL - that would be great.

Liked the "Generation Gap" pattern - it's exactly what I need.

Thanks!