users@wadl.java.net

dynamically changed uri during runtime

From: Pham Duc Tri <phamductri_at_gmail.com>
Date: Wed, 12 May 2010 17:46:47 -0700

I have read the discussion in this thread :
https://wadl.dev.java.net/servlets/ReadMsg?list=users&msgNo=35 ( Must a "Web
Application" be bound to a particular
URI?<https://wadl.dev.java.net/servlets/ReadMsg?list=users&msgNo=36>
).
Marc mentioned about this possibility "An alternative would be for wadl2java
to generate an additional constructor that would let a client application
set the base URIdynamically. " Is this supported in the latest wadl2java ?
At present, from my experimentation, wadl2java uses base URI as the master
class names, and for each resource it uses resource path as class name, then
set base URI inside the constructor (I don't see base URI being passed in as
a parameter in constructor), there's no generated constructor for setting
base URI dynamically. My question: if I want to set base URI during run
time, not during compiled time (basically, base URI is not a fixed thing,
it's something that will be read from a config file, for example), then
what's the best way to accomplish this with current wadl2java ?


Thanks,

Tri