tags:

views:

373

answers:

1

I have created a POX client (generated from jaxb2 from XSD) using spring-ws, but am confused as to how to create a SOAP client (generated from a WSDL). I am using wsimport to generate stubs, but it seems like this goes 1 step too far for use with spring-ws. The stub actually handles the transport, where as with the POX client, spring handles the transport. So, my question is: is it possible to generate just the transport objects through wsimport, or jaxb2 (like the POX client), or what do I call/send in the WebServiceTemplate?

A: 

You need to use either the wsimport-generated client-side artifacts, or WebServiceTemplate in combination with the XSD-derived JAXB2 object model. The two are not compatible.

wsimport generates JAX-WS-compliant artifacts, but Sring-WS is not a JAX-WS layer, it operates directly on your object model (JAXB2 object, in this case).

skaffman