Forum Discussion

gmccone's avatar
gmccone
New Contributor
12 years ago

Import Error with JMS Binding and SOAP 1.2

When I import a WSDL that is using a JMS Binding
http://www.w3.org/2008/07/soap/bindings/JMS/


using SOAP 1.1, all the operations are imported as expected.

when I change the same WSDL over to using the SOAP 1.2 specification, the WSDL import fails with
13:22:16,369 INFO  [WsdlImporter] Missing importer for {http://new.webservice.namespace}NewBinding


Taking the SOAP 1.2 WSDL and changing the transport back to the HTTP transport
http://schemas.xmlsoap.org/soap/http
and it imports correctly, so it seems to be specifically SOAP 1.2 with the JMS transport.

Below are the working and non working WSDLs.

SOAP 1.1 JMS Binding (Works)
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="NewPortType">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewMessageRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:NewPortType">
<soap:binding style="document" transport="http://www.w3.org/2008/07/soap/bindings/JMS/"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="urn:#NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NewService">
<wsdl:port name="NewPort" binding="tns:NewBinding">
<soap:address location="No Target Adress"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>



SOAP 1.2 JMS Binding (Does not work)
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2010 rel. 2 (http://www.altova.com) by RAYTHEON COMPANY (RAYTHEON COMPANY) -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="NewPortType">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewMessageRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:NewPortType">
<soap12:binding style="document" transport="http://www.w3.org/2008/07/soap/bindings/JMS/"/>
<wsdl:operation name="NewOperation">
<soap12:operation soapAction="urn:#NewOperation" soapActionRequired="true"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NewService">
<wsdl:port name="NewPort" binding="tns:NewBinding">
<soap12:address location="No Target Adress"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    If you have a working wsdl for http, you may simply right click on the service and say Add JMS endpoint and see this is works for you.
  • gmccone's avatar
    gmccone
    New Contributor
    I have been using your suggested method to work around the issue (change the binding to http and then manually adding the JMS endpoints needed) and it does work.

    With that said, since I am working with multiple WSDLs that are being constantly changed, it is a bit tedious to have to modify the WSDL each time the development team updates the files.

    I believe this is still a bug, and hoping it can be accepted for a future release.
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    What I believe is that the purpose of providing a concrete wsdl file to the clients / users to start their work independent of server side work. And once client have the wsdl, they can use different tools to generate the stubs and client code of their choice.

    Some tools may need specific wsdl either meant for http or jms. However, in soapui, one can use http wsdl and jms endpoint.
    All both differs would be the transport mechanism, and inline schema remains the same.
  • gmccone's avatar
    gmccone
    New Contributor
    Roa,

    I'm confused, are you implying that there is not a bug in SoapUI when importing a WSDL that is using SOAP 1.2 and JMS bindings? It clearly doesn't import any operations.

    These same operations show up if importing a WSDL using SOAP 1.1 and JMS binding, it also correctly imports if using SOAP 1.2 and HTTP bindings. Why don't they import when using SOAP 1.2 and JMS?

    The only insight on what has gone wrong is seeing,
    INFO  [WsdlImporter] Missing importer for...
    in the log. Not real informative on the cause. If the log mentioned,
    SOAP 1.2 is not importable with JMS binding, change to HTTP binding
    at least I would have a clue on the cause and an approach to "fixing" the issue.

    Yes there is a workaround, but it took me hours to figure out the cause. Ideally SoapUI would just work since the WSDL is compliant.

    Is this not the proper place to report bugs?
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    Never tried importing a jms specific wsdl in soapui. However used jms as endpoint by right Add JMS Endpoint.

    You may check with wsdl provider if you have more questions. I do not know either it is a problem with soapui. And do not know how do you confirm if the jms wsdl is correct before saying bug in soapui?