users@wadl.java.net

Re: Question about Resource Base

From: Gerard Davison <gerard.davison_at_oracle.com>
Date: Mon, 11 Jun 2012 10:49:39 +0100

On 5 Jun 2012, at 18:00, sirgeek-java_at_mrsucko.org wrote:

> I have this in my line for a WADL I'm dealing with
> <resources base="https://webservices.iso-ne.com/api/v1.0/">
>
> Is there any way to have the code generated NOT reference this specific
> resource base ?


Do you mean something like this to externalise the location of the resource:

http://kingsfleet.blogspot.co.uk/2012/03/catalog-support-for-wadl-client.html

>
> I'm using the following command line to generate my code:
> wadl2java -p com.isone.testing.www.webservices.v1_0 -o
> ../../../workspace/webservices/src v1.0.wadl.xml
>
> It generates the "base class" using the resource base as part of the
> name:
> WebsvcsdaIsoNeCom_ApiV10
>
> Is there ANY way to pass in a name to override this default behaviour ?


Yes; but currently only for the maven task where you can do something like this:

<customClassNames>
  <property>
   <name>https://.…..</name>
   <value>CustomClassName</value>
  </property>
</customClassNames>

Does this solve the problem for you?

Gerard