This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Externalizing Endpoints in Webservice Clients  RSS feed

 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to write a generic wrapper that can inject endpoints of a webservice in its client from external repository(xml). I am new to webservices. Can any one please give me any idea

Thanks
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

Any one please guide me on this or give me any expert opinion

Thanks
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amirr,
Your question's vague for me!
As far as I understand you are trying to ask how to create stubs of a web service from WSDL. If so, you can use one of the many existing web services APIs like Axis2, JAX-WS, XFire, IBM Web services, Weblogic web services, etc.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
One approach is to create stubs, yes, but this will require the client program to be recompiled each time a new service is added.
If you want to create a truly dynamic program then you will have to interpret WSDL (if you want to create clients of SOAP web services) and create request messages and interpret response messages.
You may want to take a look at soapUI, which is an open-source project that does at least dynamic generation of request messages given a WSDL.
Be warned, however, that WSDL is an interface description language and while this tells you about the operations of the service and the data going in and out of the service, it does not tell you anything about how to interpret or use the data.
Best wishes!
 
Howie Guarini
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amirr Rafique wrote:Hi

I want to write a generic wrapper that can inject endpoints of a webservice in its client from external repository(xml). I am new to webservices. Can any one please give me any idea

Thanks


You can externalize your endpoints in a properties file and read them into your code programmatically at run time.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!