You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nguyen Tien Luong <ti...@yahoo.com> on 2010/05/04 17:27:37 UTC
Using the JMS via Configuration
Hi,
In context of my project, I have to configure CXF in using JMS/Joram. My example bases on jms_queue 's demonstration.
My look for this part: http://cxf.apache.org/docs/jms-transport.html
The first way with WSDL, it works well, client can send the request to request queue, and get the answer from replyWSDL queue :<
I tried to do the same things with the configuration of Spring but it didn't work.
My beans.xml is like that, and it's loaded when the client starts:
<beansxmlns:tx="http://www.springframework.org/schema/tx"xmlns:context="http://www.springframework.org/schema/context"xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jms="http://cxf.apache.org/transports/jms"http://www.springframework.org/schema/beans
>http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>http://www.springframework.org/schema/context
>http://www.springframework.org/schema/context/spring-context-2.5.xsd
>http://www.springframework.org/schema/tx
>http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
>http://cxf.apache.org/transports/jms
>http://cxf.apache.org/schemas/configuration/jms.xsd"xsi:schemaLocation="><context:component-scanbase-package="demo.jms_greeter.client"/>
>........
><!-- CXF Configuration --><importresource="classpath:META-INF/cxf/cxf.xml"/><importresource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><importresource="classpath:META-INF/cxf/cxf-extension-jms.xml"/>
>........
><jms:conduitname="{JMSGreeterService}GreeterPort.jms-conduit"><jms:addressdestinationStyle="queue"jndiConnectionFactoryName="cf"jndiDestinationName="request"jndiReplyDestinationName="replyWSDL"><jms:JMSNamingPropertyname="java.naming.factory.initial"value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/><jms:JMSNamingPropertyname="java.naming.factory.host"value="localhost"/><jms:JMSNamingPropertyname="java.naming.factory.port"value="16400"/></jms:address>
>........
> </beans></jms:conduit>
So my questions are:
- Did I miss some points in beans.xml in order to make it runs?
- Can I delete the config in WSDL file when I use spring bean's config?
- How jms:conduit works? Each client uses its own instance of JMSConduit to transfer the message (when there are many clients using the same WSDL)
Thanks in advanced :x
=========================================================================
NGUYEN Tien Luong | M2PGI - UFRIMAG
13 Rue Blanche MONIER | Tel : 06.45.42.46.33
38000 GRENOBLE | http://tienluong.info
wsdl:servicename="JMSGreeterService">.<wsdl:portbinding="tns:JMSGreeterPortBinding"name="GreeterPort"><jms:addressdestinationStyle="queue"jndiConnectionFactoryName="cf"jndiDestinationName="request"jndiReplyDestinationName="replyWSDL"><jms:JMSNamingPropertyname="java.naming.factory.initial"value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/><jms:JMSNamingPropertyname="java.naming.factory.host"value="localhost"/><jms:JMSNamingPropertyname="java.naming.factory.port"value="16400"/></jms:address><jms:clientConfiguseConduitIdSelector="false"/></wsdl:port></wsdl:service>