Incorrect runtime WSDL generation for a service deployed with jms transport
---------------------------------------------------------------------------

                 Key: AXIS2-2552
                 URL: https://issues.apache.org/jira/browse/AXIS2-2552
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
    Affects Versions: nightly
         Environment: Windows XP SP2, Axis2 deployed as a WAR on JBoss 4.0.5
            Reporter: Shantanu Sen


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://10.206.133.149: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://10.206.133.149: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://10.206.133.149:8080/axis2/services/AddressBookService"; /> 
  </wsdl:port>
  </wsdl:service>
-----

It should contain a single JMS binding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to