Java – Generate webservice client when WSDL uses SOAP 1.2

jakarta-eejavasoapwsdl

I have a WSDL file which I want to generate a webservice client from. The problem is that the WSDL I've gotten uses SOAP 1.2:

<wsdl:definitions xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" [...]>

And

<wsoap12:operation soapAction="[...]" />

When I try to generate a client from this I only get the request/response Java beans.

If I on the other hand edit the WSDL to use SOAP 1.1 (and nothing else), everything generates beautifully, except that it will send SOAP 1.1 request instead of SOAP 1.2, and the server will yell at me to use 1.2 instead…

I generate the code using Spring Tool Suite on Windows 7 by right clicking the WSDLs and selecting "Web services > Generate client". All this have worked like a charm before, when we were using SOAP 1.1.

I've also tried to generate it with wsimport of the maven plugin jaxws-maven-plugin to no avail; it too generates only the beans, not the proxy.

Is there a way to get this to work? Or is there some way I can modify the generated *ServiceProxy.java classes for them to use SOAP 1.2 instead of 1.1?

Best Answer

You might want to look at Metro. That should support Soap 1.2.

Someone posted a reference to client gen using Metro here: Generating Metro Client Using Local WSDL File

Metro wsimport options: http://metro.java.net/1.2/docs/wsimport.html

Related Topic