• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

set the webservice location dynamically

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,


I want to generate my client classes using a wsdl file.
I have 3 environments (dev, hom, and prod) for my client linked to a 3 server environments and each server with a webservice wsdl in which only the location change.
I use the Wscompile (jaxrpc-ri.jar) ant task to generate my classes.


I want to externalize the wsdl location (ex : put a variable in wsdl location that I can set dynamically to use the desired webservice (dev, hom, prod).

the constructor generated is :

public TestNameServiceSoap_Stub(HandlerChain handlerChain) {
super(handlerChain); _setProperty(ENDPOINT_ADDRESS_PROPERTY,"http://SERVER-IP-ADDRESS/TestName.asmx");
}

what I want if possibe is something like :

public TestNameServiceSoap_Stub(HandlerChain handlerChain) {
super(handlerChain); _setProperty(ENDPOINT_ADDRESS_PROPERTY,VARIABLE_TO_BE_SET);
}
VARIABLE_TO_BE_SET can be read from a property file


Thank you in advance
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic