my dog learned polymorphism
The moose likes Web Services and the fly likes Externalizing Endpoints in Webservice Clients Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Externalizing Endpoints in Webservice Clients" Watch "Externalizing Endpoints in Webservice Clients" New topic
Author

Externalizing Endpoints in Webservice Clients

Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
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


"Know where to find the solution and how to use it - that's the secret of success."
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
Hi guys

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

Thanks
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 542

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.


Cheers,
Naren (SCJP, SCDJWS and SCWCD)
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
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!


My free books and tutorials: http://www.slideshare.net/krizsan
Howie Guarini
Greenhorn

Joined: Oct 29, 2008
Posts: 1
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Externalizing Endpoints in Webservice Clients
 
Similar Threads
Webservice
problem invoking webservice when 'localhost' in endpoint replaced by machinenm/ipaddr
WebService using Local Interface
Need to block GET requests for a WebService
webservice in Myclispe