Skip to main content

Dynamically Invoking a Web Service

3 replies [Last post]
vaugirard
Offline
Joined: 2008-03-17
Points: 0

I know this question must have been asked a thousand times, but I didn't find anything while browsing the other posts. So here goes :

I'm trying to build a completely dynamic web services client. For now I'll assume we provide the wsdl locations, so we only have the problem of generating a proxy class from them.

I'm using axis, but if there are better frameworks for that kind of operation I'll certainly look into switching.

After some research I found an old sample that explicitely parses the wsdl to extract the various info needed to make an "org.apache.axis.client.Call" to the service. The sample can't really work with recent wsdl, but we can always modify it to suit our needs (we're actually currently doing it)

Still, I was wondering if I wasn't missing some obvious way of generating runtime proxy classes. For example in dotnet there's the "ServiceDescriptionImporter" that does all the parsing and allows easy generation of the proxy.

I'm not necessarily looking for a java.webservices.ServiceDescriptionImporter :) But I'm just checking if there's some kind of way to generate our classes without manually parsing all the wsdl.

Thanks in advance!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
powerhouse_b
Offline
Joined: 2008-03-02
Points: 0

Hi.

I think you can invoke a JAX-WS endpoint dinamicly using javax.xml.ws.Dispatch. Not sure exactly how, I am also planning to research on this.
Hope this helps.

abhi12
Offline
Joined: 2008-03-18
Points: 0

a

vaugirard
Offline
Joined: 2008-03-17
Points: 0

Thank you kind sir, for your insightful reply !