Generate webservice client when WSDL uses SOAP 1.2

13,110

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

Share:
13,110
Oscar
Author by

Oscar

Updated on June 04, 2022

Comments

  • Oscar
    Oscar almost 2 years

    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?

  • Oscar
    Oscar over 12 years
    Metro was really nice to use, though I had tons of other problems because of 1.2 afterwards. Took a while to get through them all, but it worked out pretty well in the end. Thanks.