JMS SU and Http SU binding

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JMS SU and Http SU binding

manish_goyal
Hi All,

 I am developing project which JMS Service unit and Http service unit . In this scenario, Http SU is producer and JMS SU is acting as consumer.
Http SU will accept JAVA Object and route it to JMS SU.
Please Help me on this issue.
I want to know How to bind the Http service Unit & JMS service unit ? How to write the JMS client for above mention scenario?

Thanks,
Manish
Reply | Threaded
Open this post in threaded view
|

Re: JMS SU and Http SU binding

Adrian Trenaman-2
Hi Manish,

You need something like:

* Create a JMS SU for a *provider* that will write messages to a  
queue. Choose a good service name for this endpoint and put that name  
in the service attribute of the jms provider endpoint. See http://servicemix.apache.org/servicemix-jms.html 
  for more.

* Create a HTTP SU for a *consumer* that will listen on a http URL.  
Again, give it a good service name. In the targetService attribute,  
specify the JMS endpoint you created above. See http://servicemix.apache.org/servicemix-http.html 
  for more.

* Create an SA (service assembly) that pulls both of your SUs above  
into a deployable assembly, and drop the result into the ServiceMix  
hotdeploy directory.

If you want to write a JMS client to consume the messages of the queue  
then there are lots of resources available online that can help - you  
could use the basic JMS API - there's some ActiveMQ demos that show  
how to do this - or you could use the SpringFramework's support for JMS.

Cheers,

Ade
http://trenaman.blogspot.com

On 6 Nov 2008, at 06:51, manish_goyal wrote:

>
> Hi All,
>
> I am developing project which JMS Service unit and Http service  
> unit . In
> this scenario, Http SU is producer and JMS SU is acting as consumer.
> Http SU will route incoming message to JMS SU.
> Please Help me on this issue.
> I want to know How to bind the Http service Unit & JMS service  
> unit ? How to
> write the JMS client for above mention scenario?
>
> Thanks,
> Manish
> --
> View this message in context: http://www.nabble.com/JMS-SU-and-Http-SU-binding-tp20355164p20355164.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: JMS SU and Http SU binding

Adrian Trenaman-2
In reply to this post by manish_goyal
Hi Manish,

You need something like:

* Create a JMS SU for a *provider* that will write messages to a  
queue. Choose a good service name for this endpoint and put that name  
in the service attribute of the jms provider endpoint. See http://servicemix.apache.org/servicemix-jms.html 
  for more.

* Create a HTTP SU for a *consumer* that will listen on a http URL.  
Again, give it a good service name. In the targetService attribute,  
specify the JMS endpoint you created above. See http://servicemix.apache.org/servicemix-http.html 
  for more.

* Create an SA (service assembly) that pulls both of your SUs above  
into a deployable assembly, and drop the result into the ServiceMix  
hotdeploy directory.

If you want to write a JMS client to consume the messages of the queue  
then there are lots of resources available online that can help - you  
could use the basic JMS API - there's some ActiveMQ demos that show  
how to do this - or you could use the SpringFramework's support for JMS.

Cheers,

Ade
http://trenaman.blogspot.com

On 6 Nov 2008, at 06:51, manish_goyal wrote:

>
> Hi All,
>
> I am developing project which JMS Service unit and Http service  
> unit . In
> this scenario, Http SU is producer and JMS SU is acting as consumer.
> Http SU will route incoming message to JMS SU.
> Please Help me on this issue.
> I want to know How to bind the Http service Unit & JMS service  
> unit ? How to
> write the JMS client for above mention scenario?
>
> Thanks,
> Manish
> --
> View this message in context: http://www.nabble.com/JMS-SU-and-Http-SU-binding-tp20355164p20355164.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: JMS SU and Http SU binding

Jean-Baptiste Onofré
In reply to this post by manish_goyal
Hi Manish,


You can create the first HTTP SU with the following xbean.xml :

<http:endpoint service="MyService" endpoint="HttpProducer"
               role="producer"
               locationUri="http://0.0.0.0:8181/Service/"
               defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
               targetService="MyService"
               targetEndpoint="JmsConsumer"/>

After that, you can create the JMS SU with the following xbean.xml :

<jms:endpoint service="MyService" endpoint="JmsConsumer"
              role="consumer"
              destinationStyle="queue"
              jmsProviderDestinationName="queue/A"
              jndiConnectionFactoryName="ConnectionFactory"
              defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
              defaultOperation="test:Test"/>

Don't forget to add the component in dependency of each SU pom.xml.

You can pacakge both SU in a SA.

I'm little bit surprised by the HTTP as producer and the JMS as consumer. Are you sure that the HTTP is not a consumer ?

Regards
JB

On Wednesday 05 November 2008 - 20:51, manish_goyal wrote:

>
> Hi All,
>
>  I am developing project which JMS Service unit and Http service unit . In
> this scenario, Http SU is producer and JMS SU is acting as consumer.
> Http SU will route incoming message to JMS SU.
> Please Help me on this issue.
> I want to know How to bind the Http service Unit & JMS service unit ? How to
> write the JMS client for above mention scenario?
>
> Thanks,
> Manish
> --
> View this message in context: http://www.nabble.com/JMS-SU-and-Http-SU-binding-tp20355164p20355164.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
[hidden email]
PGP : 17D4F086