axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <>
Subject Custom WSDL generation
Date Mon, 09 Jul 2007 16:42:03 GMT
Hi folks!

So I've got a custom deployer which wants to be able to generate its own
WSDL (via "?wsdl") for the artifacts it deploys.  Unfortunately there's
no really good way that I've found in the Axis2 architecture to do that. :(

In Axis1, WSDL generation was the responsibility of the "Provider", so
if you had a different backend (script, etc), you'd have a different
Provider which would know to generate WSDL in a different way.  In
Axis2, WSDL generation seems to happen via AxisService.printWSDL().
This either ends up expecting a Definition object (from WSDL4J) to be
sitting in the "wsdl4jDefinition" parameter of the AxisService (if 
useOriginalWSDL is set), or it calls out to the WSDLDataLocator to 
generate the WSDL with the AxisService2WSDL* classes.

Neither of these cases was right for what I need to do, since I can't 
pre-create the WSDL and leave it in the parameter, and there's no way to 
plug in a new WSDL generator so that I could customize the output of 

So I've introduced a small interface called WSDLSupplier:

public interface WSDLSupplier {
     Definition getWSDL(AxisService service) throws AxisFault;

I added a check in printWSDL() to see if there was a WSDLSupplier
sitting in the "WSDLSupplier" parameter of the AxisService.  If so, it
attempts to call the WSDLSupplier to obtain the Definition object from 
there dynamically.  It then runs that WSDL through the usual 
printDefinitionObject() API.  This allows my custom service to plug in 
and generate its own WSDL.

I just wanted to give y'all a heads-up before I checked this into the
tree, as it's a slight API change (but only an addition) for 1.3.

Is there a better way to do this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message