camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-6084) SOAP over JMS does not work with camel-cxf endpoint
Date Mon, 18 Feb 2013 04:23:14 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13580400#comment-13580400
] 

Willem Jiang edited comment on CAMEL-6084 at 2/18/13 4:23 AM:
--------------------------------------------------------------

Hi Charles,

I just wrote a simple test case by using the jms transport as you did. I can reproduce the
error when I use the JMS URI or not. 
It looks like there are something wrong with the jms continuation which the cxf consumer is
used by default.
You can work around it by using the synchronous=true on the camel-cxf endpoint like this
{code}
from("cxf:bean:jmsEndpoint?synchronous=true")...
{code}

I will keep on digging that.

Willem
                
      was (Author: njiang):
    Hi Charles,

I just wrote a simple test case by using the jms transport as you did. I can reproduce the
error when I use the JMS URI or not. 
It looks like the camel-cxf consumer just treat the request a oneway request, the response
is never send back.
I will keep on digging the issue. 

Willem
                  
> SOAP over JMS does not work with camel-cxf endpoint
> ---------------------------------------------------
>
>                 Key: CAMEL-6084
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6084
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.10.0
>            Reporter: Charles Moulliard
>            Assignee: Willem Jiang
>
> If we would like to use SOAP over JMS using CXF & Camel (2.10),that fails.
> The CXF endpoint receives well the incoming request from the JMS queue
> {code}
> [aultMessageListenerContainer-1] HelloWorldServicePortType INFO  Inbound Message
> ----------------------------
> ID: 1
> Content-Type: text/xml
> Headers: {JMSMessageType=[text]}
> Payload: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hel="http://helloworld.atos.redhat.com">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <hel:sayHello>
>          <hel:name>fred</hel:name>
>       </hel:sayHello>
>    </soapenv:Body>
> </soapenv:Envelope>
> --------------------------------------
> [aultMessageListenerContainer-1] route1 INFO  SOAP Request received message
> [aultMessageListenerContainer-1] route1 INFO  Mock service replied
> {code}
> but the response is not returned by CXF neither published in a (reply) queue.
> {code}
> Here is the Camel Route
>     @Override
>     public void configure() throws Exception {
> from("cxf:bean:endpoint.service.worklist?dataFormat=MESSAGE")
>                 .convertBodyTo(String.class)
>                 .log("SOAP Request received message")
> .setHeader("JMSReplyTo").constant("supervisorworklist.response")
>                 .transform().constant(response) // RESPONSE = SOAP MESSAGE
>                 .log("Mock service replied");
>     }
> {code}
> & Config
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xmlns:osgi="http://www.springframework.org/schema/osgi"
>        xmlns:cxf="http://camel.apache.org/schema/cxf"
>        xmlns:jms="http://cxf.apache.org/transports/jms"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
>        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf-2.10.0-spring.xsd
>        http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd">
>     <bean id="jms.connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
>        <!-- <property name="brokerURL" value="vm://myEmbeddedBroker?broker.persistent=false"
/>-->
>         <property name="brokerURL" value="tcp://localhost:61616"/>
>     </bean>
>     <bean id="jms.config.service" class="org.apache.cxf.transport.jms.JMSConfiguration">
>         <property name="connectionFactory" ref="jms.connectionFactory" />
>         <property name="targetDestination" value="supervisorworklist" />
>         <property name="replyDestination" value="supervisorworklist.response"/>
>     </bean>
>     <bean id="logginOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>     <bean id="logginInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>     <!--  Producer Endpoint -->
>     <cxf:cxfEndpoint id="endpoint.service.worklist"
>                      address="jms://"
> serviceClass="com.redhat.atos.helloworld.HelloWorldService"
>                      serviceName="s:HelloWorldService"
>                      endpointName="s:HelloWorldOverJms"
>                      xmlns:s="http://helloworld.atos.redhat.com">
>         <cxf:features>
>             <bean xmlns="http://www.springframework.org/schema/beans"
> class="org.apache.cxf.transport.jms.JMSConfigFeature">
>                 <property name="jmsConfig" ref="jms.config.service" />
>             </bean>
>         </cxf:features>
>          <cxf:inInterceptors>
>              <ref bean="logginInInterceptor"/>
>          </cxf:inInterceptors>
>          <cxf:outInterceptors>
>              <ref bean="logginOutInterceptor"/>
>          </cxf:outInterceptors>
>     </cxf:cxfEndpoint>
>     <camelContext xmlns="http://camel.apache.org/schema/spring">
>         <package>com.redhat.atos.cxf</package>
>     </camelContext>
> </beans>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message