This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Spring-ws client with Jax-ws web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring-ws client with Jax-ws web service" Watch "Spring-ws client with Jax-ws web service" New topic
Author

Spring-ws client with Jax-ws web service

Turian Vlad
Greenhorn

Joined: Oct 17, 2009
Posts: 12
Recently i needed to work with webservices. I've studied them (contract first vs. contract last) and i've:

- implemented a Spring-WS web service
- implemented a JAX-WS web service
- consumed the first one using a Spring-ws client and a normal JAX-WS client
- consumed the second one using a normal jax-ws client

I wan't now to be able to consume a JAX-WS web service from a Spring-WS client.

I assume that this is something that can be done. but i don't know how.

Do you have experience with such a thing or do you saw tutorials on it, because I didn't find any!

Thank you,
Vlad


Freedom cannot be bought! You say the price is small?!... do not fool yourselves... It will get bigger and bigger until one day when the price of freedom will be freedom itself! (Vlad The Impailer)
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Turian,
I wan't now to be able to consume a JAX-WS web service from a Spring-WS client.

Isn't this similar to what you did earlier? All you have to do is to provide provide JAX-WS web service WSDL to Spring WS client code. What problems are you getting?


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Turian Vlad
Greenhorn

Joined: Oct 17, 2009
Posts: 12
Well this is what i have done so far:

Using the xsd generated by the jax-ws web service i've generated the required classes using the xjc command.

in the client:



my applicationContext.xml file looks like



i written also a main class to test:



The problem is that when i run the main class an error occures. i hate this error. a couple of hours have passed and i still don't know how to solve it

the stacktrace:

Turian Vlad
Greenhorn

Joined: Oct 17, 2009
Posts: 12
Also when the add method fires the following soap is transmitted through the wire



it appears to me that the soap message is well formed. is the xmlns="" a problem?

Thank you for your answers

Vlad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring-ws client with Jax-ws web service
 
Similar Threads
webservice which one is more used ?
generate web service client
JAXWS Stubs
Web services overall picture and Jax-RPC
JAX WS Web Service