views:

110

answers:

2

Hello. I'm working on a project that involves the creation of numerous web services. Top-down/contract-first and model-driven design strategies are utilized (WSDL -> codegen). NetBeans (6.7) + JAX-WS + GlassFish comprise the chosen tooling stack. The web services will be EJBs deployed as Composite Applications in the Glassfish JBI container.

We have a need to implement systemic qualities to the web service implementtation classes, such as overriding toString implementations, adding logging, even applying a Template method pattern to the implementation classes.

Since the NetBeans/JAX-WS does not provide the means to inject our customizations into its code generation process, I do not see a way to accomplish what I want to do short of modifying the generated classes manually. Top-down, yes; model-driven, not anymore. And doing so would have significant maintenance implications for the project, as the web services may be periodically revised.

Does anyone have any other ideas on how I can accomplish what I need given the tools I have to work with? Perhaps a plugin that integrates AOP with JAX-WS codegen? A magic @DoNotClobber annotation supported by another codegen to preserve developer-user code?

And, if I had the opportunity to use an Eclipse-based tool set, would the grass be greener?

Thank you in advance.

A: 

Did some research. It looks like JAX-WS/JAXB allows for augmenting its code generation, but not to the extend that I need.

The Eclipse Modeling Framework recognizes the value of merging regeneration, though. And apparently EMF is usable in non-Eclipse development environments.

Noel Ang
A: 

I do not know if the Templates for JAX-WS are customizable. You should be able to find them in the Template Manager; use the Templates item of the Tools menu to open this manager.

Many of the managed templates can be customized by the using the 'Open in Editor' button.

This tutorial covers a lot of information about templates in NetBeans. It may be a bit too much for your immediate need, but it does have some useful screen shots and the like.

vkraemer