axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Afkham Azeez" <afk...@gmail.com>
Subject Re: [axis2] Custom WSDL generation
Date Mon, 09 Jul 2007 17:23:00 GMT
Sounds good. +1.

-- Azeez

On 7/9/07, Glen Daniels <glen@thoughtcraft.com> wrote:
>
> [Resending with correct prefix. Please reply on THIS thread]
>
> 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
> WSDLDataLocator.
>
> 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?
>
> --Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Mime
View raw message