axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <>
Subject Re: Axis2 SOAP-over-JMS
Date Wed, 21 Mar 2007 12:44:42 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Hi Badrys<br>
Firstly, you define the JMS connection factories that the JMS transport
should be listening for messages to Axis2 as follows, on your
axis2.xml. Here you specify the JNDI properties (url, class, and JNDI
name of the actual connection factory) and define a logical 'name' for
this to refer back when you are using axis2 later. e.g. from your
<pre>    &lt;transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"&gt;
      &lt;parameter name="default" locked="false"&gt;                
        &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
        &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
        &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;QueueConnectionFactory&lt;/parameter&gt;
So the above will map the connection factory with the JNDI name
"QueueConnectionFactory" on the above JNDI context, to the logical
connection factory name "default". You may call this "myConnFac" or
anything else you like - but the "default" has special meaning, and if
you have not specified a connection factory in your services.xml those
services will try to use the "default". So its possible for you to
define one or more factories as above to the JMS listener.<br>
In your services.xml if you define more than one connection factory,
your services.xml could specify which one should be used through the
following parameter<br>
<pre>&lt;parameter name="transport.jms.ConnectionFactory" locked="true"&gt;myTopicConnectionFactory&lt;/parameter&gt;</pre>
Now, by default the JMS transport would look for a Queue with the same
name as the service to listen for messages for that service. If you are
using ActiveMQ for example, this would create the JMS destination as
well!. However, if you already have created the JMS Destination or if
its not a Queue but a topic etc, you could specify the following
parameters on your services.xml to indicate the JMS destination<br>
<pre>&lt;parameter name="transport.jms.Destination" locked="true"&gt;dynamicTopics/something.TestTopic&lt;/parameter&gt;</pre>
Hope this clarifies your question<br>
badrys wrote:
<blockquote cite="" type="cite">
  <pre wrap="">Hi Asankha !

I couldn't patch the war file but I successfully run the SOAP over JMS
sample under the standalone distribution. 
So thanks a lot ! :-)
If you don't mind, I'd like to ask you a question about JMS: actually my
real aim is to create a publisher/subscriber web service allowing a process
(publisher) to send a message to a topic which will be then distributed to
processes that have already subscribed to that topic (subscribers). My
problem: I just can't see the link between the "TopicConnectionFactory" and
the "Topic" defined in my axis2.xml  (and services.xml) for the JMS
transport and the ones needed in the java code to create the publisher and
subscriber processes (within the JMS library). I logically tend to think
they should be the same but I don't know how to do the connection between
can you help me with that ?

thanks again.

asankha wrote:
  <blockquote type="cite">
    <pre wrap="">


Hi Badrys 

  First thank you for answering. I almost became hopeless :)

There is always hope and support :-)! 

  Concerning your question : yes I'm using Axis2 on Tomcat and for JMS I'm
using Apache ActiveMQ, but I don't know how to check wether the JMS
transport start or not. Actually I'm quite sure it doesn't since there
any reference to a "JMS port" in the generated wsdl file. 

As I guessed.. thats why I made it my first question.. there is a
defect for this <a class="moz-txt-link-freetext" href=""></a>
is marked fixed, but doesn't specify the version.. so I would expect
that the issue is still out there.. and if you cannot change your code
(i.e. recompile) or use the standalone dist I cannot offer you another
solution right now :-( 


  I think the
problem is due to the "axis2.xml" configuration: I just uncommented the
dealing with JMS and I didn't modify any attribute or any value since it
already uses ActiveMQ as example. Plus I'm not sure I put the right
attributes concerning JMS in my  "services.xml".
Have you already dealt with those xml files ? 
Thanks again for helping me.

asankha wrote:

Are you using Axis2 on Tomcat? Do you see the JMS transport starting?


badrys wrote:
      Hello ! 
Has anybody succeded to run a simple SOAP-over-JMS web service sample
as the "echo" one mentioned in the Apache documentation
?( <a class="moz-txt-link-freetext" href=""></a>
I followed the all the instructions given in the documentation (axis2.xml
and service.xml modifications) but Axis2 seems to be generating a wrong
file since there is no reference to JMS in it and the wsdl2java tool
recongnize it as a valid wsdl. 
Here are the web service archive and the generated wsdl. 

Can you help me with that ? 
thanks in advance. 

P.S. the sample works perfectly with "http" (instead of JMS) which is the
default transport used by Axis. <a class="moz-txt-link-freetext" href=""></a>

Echo2.aar  <a class="moz-txt-link-freetext" href=""></a>
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>

For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>


To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>

  <pre wrap=""><!---->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message