Axis2
  1. Axis2
  2. AXIS2-2552

Incorrect runtime WSDL generation for a service deployed with jms transport

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: nightly
    • Fix Version/s: None
    • Component/s: wsdl
    • Labels:
      None
    • Environment:
      Windows XP SP2, Axis2 deployed as a WAR on JBoss 4.0.5

      Description

      Use the pojo sample and modify the services.xml to use JMS transport:

      <service name="AddressBookService" scope="application">
      <description>
      POJO: AddressBook Service
      </description>
      <transport>jms</transport>
      <messageReceivers>
      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
      class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
      class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
      </messageReceivers>
      <parameter name="ServiceClass" locked="false">sample.addressbook.service.AddressBookService</parameter>
      <parameter name="transport.jms.Destination" locked="true">queue/pojoQ</parameter>
      <parameter name="transport.jms.ConnectionFactory" locked="true">ConnectionFactory</parameter>
      </service>

      Modify axis2.xml to contain the JBossMQ specific properties:
      — axis2.xml----
      <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
      <parameter name="ConnectionFactory" locked="false">
      <parameter name="java.naming.factory.initial" locked="false">org.jnp.interfaces.NamingContextFactory</parameter>
      <parameter name="java.naming.provider.url" locked="false">jnp://localhost:1099</parameter>
      <parameter name="java.naming.factory.url.pkgs" locked="false">org.jnp.interfaces:org.jboss.naming</parameter>
      <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
      </parameter>
      <parameter name="default" locked="false">
      <parameter name="java.naming.factory.initial" locked="false">org.jnp.interfaces.NamingContextFactory</parameter>
      <parameter name="java.naming.provider.url" locked="false">jnp://localhost:1099</parameter>
      <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
      </parameter>
      </transportReceiver>


      Deploy the AddressBookService.aar and obtain the generated WSDL using the following URL
      http://localhost:8080/axis2/services/AddressBookService?wsdl

      The generated WSDL does not have a jmd binding section and still refers to http bindings even though the services.xml speciifies a single jms transport.

      — wsdl generated —
      ...
      ....

      • <wsdl:binding name="AddressBookServiceSOAP11Binding" type="axis2:AddressBookServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
      • <wsdl:operation name="addEntry">
        <soap:operation soapAction="urn:addEntry" style="document" />
      • <wsdl:input>
        <soap:body use="literal" />
        </wsdl:input>
        </wsdl:operation>
      • <wsdl:operation name="findEntry">
        <soap:operation soapAction="urn:findEntry" style="document" />
      • <wsdl:input>
        <soap:body use="literal" />
        </wsdl:input>
      • <wsdl:output>
        <soap:body use="literal" />
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
      • <wsdl:binding name="AddressBookServiceSOAP12Binding" type="axis2:AddressBookServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
      • <wsdl:operation name="addEntry">
        <soap12:operation soapAction="urn:addEntry" style="document" />
      • <wsdl:input>
        <soap12:body use="literal" />
        </wsdl:input>
        </wsdl:operation>
      • <wsdl:operation name="findEntry">
        <soap12:operation soapAction="urn:findEntry" style="document" />
      • <wsdl:input>
        <soap12:body use="literal" />
        </wsdl:input>
      • <wsdl:output>
        <soap12:body use="literal" />
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
      • <wsdl:binding name="AddressBookServiceHttpBinding" type="axis2:AddressBookServicePortType">
        <http:binding verb="POST" />
      • <wsdl:operation name="addEntry">
        <http:operation location="addEntry" />
      • <wsdl:input>
        <mime:content type="text/xml" />
        </wsdl:input>
        </wsdl:operation>
      • <wsdl:operation name="findEntry">
        <http:operation location="findEntry" />
      • <wsdl:input>
        <mime:content type="text/xml" />
        </wsdl:input>
      • <wsdl:output>
        <mime:content type="text/xml" />
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
      • <wsdl:service name="AddressBookService">
      • <wsdl:port name="AddressBookServiceSOAP11port_http" binding="axis2:AddressBookServiceSOAP11Binding">
        <soap:address location="http://localhost:8080/axis2/services/AddressBookService" />
        </wsdl:port>
      • <wsdl:port name="AddressBookServiceSOAP11port_jms1" binding="axis2:AddressBookServiceSOAP11Binding">
        <soap:address location="jms:/queue/pojoQ?transport.jms.ConnectionFactoryJNDIName=ConnectionFactory&java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory&java.naming.provider.url=jnp://localhost:1099" />
        </wsdl:port>
      • <wsdl:port name="AddressBookServiceSOAP12port_http" binding="axis2:AddressBookServiceSOAP12Binding">
        <soap12:address location="http://localhost:8080/axis2/services/AddressBookService" />
        </wsdl:port>
      • <wsdl:port name="AddressBookServiceSOAP12port_jms1" binding="axis2:AddressBookServiceSOAP12Binding">
        <soap12:address location="jms:/queue/pojoQ?transport.jms.ConnectionFactoryJNDIName=ConnectionFactory&java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory&java.naming.provider.url=jnp://localhost:1099" />
        </wsdl:port>
      • <wsdl:port name="AddressBookServiceHttpport" binding="axis2:AddressBookServiceHttpBinding">
        <http:address location="http://localhost:8080/axis2/services/AddressBookService" />
        </wsdl:port>
        </wsdl:service>

      It should contain a single JMS binding

        Issue Links

          Activity

          Hide
          Deepal Jayasinghe added a comment -

          To fix this issue , we need to do a major change in the way we implement the wsdl generation logic. To have transport dependent binding generating mechanisms we need to pass a binding object to transport and asked it to fill that. Then we have to construct the WSDL taking those binding objects into consideration. Now we only ask the EPR from the transport , so in addition to that we need to ask the binding object from the Transport Listener.

          So that going to have API change in the Transport Listener API and I do not think we should not do that at this moment.

          Show
          Deepal Jayasinghe added a comment - To fix this issue , we need to do a major change in the way we implement the wsdl generation logic. To have transport dependent binding generating mechanisms we need to pass a binding object to transport and asked it to fill that. Then we have to construct the WSDL taking those binding objects into consideration. Now we only ask the EPR from the transport , so in addition to that we need to ask the binding object from the Transport Listener. So that going to have API change in the Transport Listener API and I do not think we should not do that at this moment.
          Hide
          Glen Daniels added a comment -

          If we're not handling transport metadata right, let's fix for 1.3

          Show
          Glen Daniels added a comment - If we're not handling transport metadata right, let's fix for 1.3

            People

            • Assignee:
              Deepal Jayasinghe
              Reporter:
              Shantanu Sen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development