camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-6084) SOAP over JMS does not work with camel-cxf endpoint
Date Wed, 27 Feb 2013 07:59:13 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-6084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Charles Moulliard updated CAMEL-6084:
-------------------------------------

    Description: 
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.mycompany.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.mycompany.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.mycompany.cxf</package>
    </camelContext>

</beans>
{code}


  was:
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}


    
> 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.mycompany.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.mycompany.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.mycompany.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