Skip to main content

Java web service client

2 replies [Last post]
Joined: 2005-01-09

Hi guys, I'm new here.
I'm developing a web service client that needs to execute operation exposed on tomcat. The client has all the wsdl files that are needed. I can't import them statically with netbeans or eclipse because the client needs to discover the wsdl at runtime (this has been already done)... so i need to implement a dynamic invocation... What should I do? My program is able to get those wsdl files but I don't know what to do... What should I use: jax-ws? jax-rpc?? Can you give me a link to a guide or something else??

Thank you in advance,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-04-21


when u've got your wsdl, you need to generate classes to consome it on client side.

Use wsimport to generate those classes. Programmaticly i don't know exactly what to do, but to my mind you could find it rapidly.

Joined: 2009-07-24


When you generate these client side classes from your wsdl in your dev environment .. say "http://localhost:8080/MyService?wsdl" (either through an IDE or wsimport tool) - this is a compile time operation. The generated classes seem to reference the URI supplied at development time. But, how do you develop a client that will capture a production location of the wsdl at runtime, and then direct requests to that endpoint. The tutorials only show how to create a client that refers to a local wsdl. Any pointers would be really appreciated.

Many thanks,