FYI - I've finally gotten to testing this.
It works fine with one problem I've got to overcome.
They use self-signed "dev" certificates on the servers. I have to have a
way to get the file via HTTP instead of HTTPS (unless I can get them to
fix the certificates).
Matt
>
> On 19 Jun 2012, at 06:18, Matt Soffen (Java) wrote:
>
>>>
>>> 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
>>
>> Maybe ? However I'm using the CLI and my code uses ant to generate the
>> code so I either need to figure out how to do this in Ant, or have one
>> singular maven task.
>
>
> I have merged in a speculative fix so that the Ant task can support the
> uri->classname mapping:
>
> http://java.net/projects/wadl/sources/svn/revision/334
>
> Unfortunately the <> are not escaped properly in the commit comment; but
> this is what it might look like
>
> <wjc description="file.wadl" package="com.yahoo.search"
> autoSchemaPackage="true|false" target="gen-src">
> <customizations dir="." includes="binding.xjc"/>
> <produces dir="gen-src/com/yahoo/search" includes="*.java"/>
> <depends dir="." includes="schema.xsd"/>
> <customClassName uri="http://yahoo.com/rest" classname="YahooRest" >
> </wjc>
>
> It is unfortunately un-tested at the moment; but you might like to check
> out the tip and give it a whirl.
>
>
>>
>>>
>>>>
>>>> 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?
>>
>> I'll try it and see what I can manage.
>
>
> Let me know how you get on,
>
> Gerard
>
>>
>> Matt
>>
>>
>> -----------------------------------------
>> This email was sent using SquirrelMail.
>> "Webmail for nuts!"
>> http://squirrelmail.org/
>>
>
>
-----------------------------------------
This email was sent using SquirrelMail.
"Webmail for nuts!"
http://squirrelmail.org/