You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mike Krell <mk...@gmail.com> on 2007/07/18 20:05:54 UTC

JMS

Does anyone know how to configure JMS to be used with Axis?  I've read the
docs and samples and I'm still struggling.  Thanks

Re: JMS

Posted by Mike Krell <mk...@gmail.com>.
Thanks for the reply Anthony.  I'm using axis 1.4 so I'm not sure if your
suggestions will help - I will compare this with what I have to see if
anything jumps out.  I've got 6 different web services using Axis 1.4 so I'm
hesitant to upgrade to Axis 2.

I have a an EJB which I use Apache Axis to create a web service.  I
use Axis' java2wsdl to create the wsdl and then wsdl2java to create
the client code.
I have everything working using HTTP however I would like to change
the transport to use JMS with persistent queues.  I've set up JBossMQ.
I've modified the my server-config.wsdd and client-config.wsdd files
for Axis to use JMS.  When running a simple test, I get the following
error message...
"The AXIS engine could not find a target service to invoke!
targetService is null"


At this point I'm not even sure that I have everything configured correctly
but there doesn't appear to be any documentation to confirm with.  My set up
is a little more advanced than the stock quote samples that come with the
Axis distribution however the sample did get me to where I am now.  I think
that it's a simple configuration issue and I was hoping for a cook book
example that I could follow.

I'm not sure if this helps you at all or not.  Thanks again for the info -
I'll see if it helps.

Mikek

On 7/18/07, Anthony Bull <an...@bcsoft.co.nz> wrote:
>
> I set my Axis 2 instance to use Apache Active MQ using the examples on
> the Axis 2 documentation.  What are your specific problems?
>
> The steps I followed were:
> 1. Setup Active MQ as standard.
> 2. Change the axis2.xml file under the axis2 webapp context on Tomcat so
> that the JMS transport receiver and sender elements were active (as
> follows):
>
>     <transportReceiver name="jms"
> class="org.apache.axis2.transport.jms.JMSListener">
>         <parameter name="myTopicConnectionFactory"
> locked="false">
>             <parameter name="java.naming.factory.initial"
> locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory
> </parameter>
>             <parameter name="java.naming.provider.url"
> locked="false">tcp://localhost:61616</parameter>
>             <parameter name="transport.jms.ConnectionFactoryJNDIName"
> locked="false">TopicConnectionFactory</parameter>
>         </parameter>
>
>         <parameter name="myQueueConnectionFactory"
> locked="false">
>             <parameter name="java.naming.factory.initial"
> locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory
> </parameter>
>             <parameter name="java.naming.provider.url"
> locked="false">tcp://localhost:61616</parameter>
>             <parameter name="transport.jms.ConnectionFactoryJNDIName"
> locked="false">QueueConnectionFactory</parameter>
>         </parameter>
>
>         <parameter name="default" locked="false">
>             <parameter name="java.naming.factory.initial"
> locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory
> </parameter>
>             <parameter name="java.naming.provider.url"
> locked="false">tcp://localhost:61616</parameter>
>             <parameter name="transport.jms.ConnectionFactoryJNDIName"
> locked="false">QueueConnectionFactory</parameter>
>         </parameter>
>     </transportReceiver>
>
>     <transportSender name="jms"
>                      class="org.apache.axis2.transport.jms.JMSSender"/>
>
> 3. And finally installed the basic EchoXMLService I found on the Axis2
> documentation example. Its a simple one class web service, where the
> only different is that it specifies a JMS transport in its services.xml
> file as follows:
>
> <service name="EchoXMLService">
>     <description>
>         This is a sample Web Service for JMS tests.
>     </description>
>     <parameter name="ServiceClass"
> locked="false">org.apache.axis2.jms.Echo</parameter>
>     <operation name="echoOMElementNoResponse">
>         <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
>         <actionMapping>urn:echoOMElementNoResponse</actionMapping>
>     </operation>
>     <operation name="echoOMElement">
>         <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>         <actionMapping>urn:echoOMElement</actionMapping>
>     </operation>
>
>     <transports>
>       <transport>jms</transport>
>     </transports>
>     <parameter name="transport.jms.ConnectionFactory"
> locked="true">myQueueConnectionFactory</parameter>
>     <parameter name="transport.jms.Destination"
> locked="true">dynamicQueues/TestQueue</parameter>
> </service>
>
> 4. I'm moving over to WebSphere MQ as the MOM provider, but haven't got
> that far yet - but I assume its only a change to the JNDI properties in
> axis2.xml as is the case with other JMS stuff.
>
> cheers,
> Ants.
>
> Mike Krell wrote:
> > Does anyone know how to configure JMS to be used with Axis?  I've read
> > the docs and samples and I'm still struggling.  Thanks
>
>
> --
> Anthony
> -------------------------------------
> Anthony Bull
> Senior Developer
> Black Coffee Software Ltd
> PO Box 10-192 The Terrace
> Wellington, New Zealand
>
> anthony.bull@bcsoft.co.nz
> Ph  +64 4 472 8818
> Fax +64 4 472 8811
> Mobile 021 303 692
> -------------------------------------
> www.bcsoft.co.nz
> ---------------------------------------------------------------
> This email may contain confidential or privileged information,
> and is intended for use only by the addressee, or addressees.
> If you are not the intended recipient please advise the sender
> immediately and do not copy, use or disclose the contents to
> any other person or organisation.
> Black Coffee Software Ltd accepts no responsibility for viruses
> received with this email, or to any changes made to the original
> content. Any views or opinions expressed in this email may be
> personal to the sender and are not necessarily those of Black
> Coffee Software Ltd.
> ---------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: JMS

Posted by Anthony Bull <an...@bcsoft.co.nz>.
I set my Axis 2 instance to use Apache Active MQ using the examples on 
the Axis 2 documentation.  What are your specific problems?

The steps I followed were:
1. Setup Active MQ as standard.
2. Change the axis2.xml file under the axis2 webapp context on Tomcat so 
that the JMS transport receiver and sender elements were active (as 
follows):

    <transportReceiver name="jms" 
class="org.apache.axis2.transport.jms.JMSListener">
        <parameter name="myTopicConnectionFactory" 
locked="false">                       
            <parameter name="java.naming.factory.initial" 
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url" 
locked="false">tcp://localhost:61616</parameter>           
            <parameter name="transport.jms.ConnectionFactoryJNDIName" 
locked="false">TopicConnectionFactory</parameter>
        </parameter>

        <parameter name="myQueueConnectionFactory" 
locked="false">                       
            <parameter name="java.naming.factory.initial" 
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url" 
locked="false">tcp://localhost:61616</parameter>           
            <parameter name="transport.jms.ConnectionFactoryJNDIName" 
locked="false">QueueConnectionFactory</parameter>
        </parameter>

        <parameter name="default" locked="false">                       
            <parameter name="java.naming.factory.initial" 
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url" 
locked="false">tcp://localhost:61616</parameter>           
            <parameter name="transport.jms.ConnectionFactoryJNDIName" 
locked="false">QueueConnectionFactory</parameter>
        </parameter>
    </transportReceiver>

    <transportSender name="jms"
                     class="org.apache.axis2.transport.jms.JMSSender"/>

3. And finally installed the basic EchoXMLService I found on the Axis2 
documentation example. Its a simple one class web service, where the 
only different is that it specifies a JMS transport in its services.xml 
file as follows:

<service name="EchoXMLService">
    <description>
        This is a sample Web Service for JMS tests.
    </description>
    <parameter name="ServiceClass" 
locked="false">org.apache.axis2.jms.Echo</parameter>
    <operation name="echoOMElementNoResponse">
        <messageReceiver 
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
        <actionMapping>urn:echoOMElementNoResponse</actionMapping>
    </operation>
    <operation name="echoOMElement">
        <messageReceiver 
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
        <actionMapping>urn:echoOMElement</actionMapping>
    </operation>

    <transports>
      <transport>jms</transport>
    </transports>
    <parameter name="transport.jms.ConnectionFactory" 
locked="true">myQueueConnectionFactory</parameter>
    <parameter name="transport.jms.Destination" 
locked="true">dynamicQueues/TestQueue</parameter>
</service>

4. I'm moving over to WebSphere MQ as the MOM provider, but haven't got 
that far yet - but I assume its only a change to the JNDI properties in 
axis2.xml as is the case with other JMS stuff.

cheers,
Ants.

Mike Krell wrote:
> Does anyone know how to configure JMS to be used with Axis?  I've read 
> the docs and samples and I'm still struggling.  Thanks


-- 
Anthony
-------------------------------------
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand

anthony.bull@bcsoft.co.nz
Ph  +64 4 472 8818
Fax +64 4 472 8811
Mobile 021 303 692
-------------------------------------
www.bcsoft.co.nz
---------------------------------------------------------------
This email may contain confidential or privileged information,
and is intended for use only by the addressee, or addressees.
If you are not the intended recipient please advise the sender
immediately and do not copy, use or disclose the contents to
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses
received with this email, or to any changes made to the original
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black
Coffee Software Ltd.
---------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org