In short, what I’m looking to achieve is the ability to run wsdl2java and generate extra code. Has anyone done this and can offer hints/tips/advice, has anyone done anything similar with a different approach the one outline further down the question (a lot further down)?
In the long form:
Background:
We have a third party piece of software that is used extensively in many projects but it has no ability to integrate directly with web services. With this in mind we take the wsdl, generate the client and then have a lot of boilerplate code that sits on top to allow integration. I’ve spent some time stream lining this but I want to go the whole hog.
Current standing:
I’ve written a simple first generation code generator which handles the creation of 95% of the code however this is reads in a hand written xml config, outputs the code using FileWriter(eugh), but I still need to hand write the code to tie it pass info to/from the actual webservice client code. This was just a quick and dirty solution as I needed it fast, and also to act as a POC.
Approach to solving this:
I’m picking this up in my own time purely because I think its a interesting problem but as such I don’t want to waste lots of it on a dead end approach.
I believe the way to achieve my goal is to write an extension to the code generation module as described here http://wso2.org/library/35, I belive by writing this extension I will get access to the axis model of the wsdl and can apply my own xslt to it.
If you agree and have done similar, is there any advice you care to share, or useful resources you can point me to.
If you disagree with my approach I’d appreciate a brief outline( don’t want to waste your time) of why and suggestion for a new approch.
Further research revealed that the way to go was to create a new CodeEmitter based on AxisServiceBasedMultiLanguageEmitter.
Unfortunately this project was canned as there stopped being a requirement to create the web service clients. The third party piece of software released a new version allowing it to directly consume web services.