Resolution: Won't Fix
Affects Version/s: 1.2.4
Fix Version/s: None
Environment:java 1.5.0, maven 2.0.4, xfire 1.2.4, ant 1.6.5
Number of attachments :
The generated code from wsgen hard codes the URL of the webservice into the client.java file.
This means it is not possible to easily switch between separate instances of the same service, for example, a DEV, UAT and PRODUCTION server.
I have got around this limitation by writing an ANT task which does a text based search and replace on the generated client.java...
<target name="parameterise-services" if="service">
"' value="url" />
This has the effect of moving the url into a parameter of the client.java contructor instead of it being hard-coded. This allows me to have one set of generated code for many servers.
However, I consider my fix a hack and think it would be much better if wsgen supported this natively!