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] [Comment Edited] (CAMEL-6084) SOAP over JMS does not work with camel-cxf endpoint
Date Wed, 27 Feb 2013 07:59:12 GMT

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

Charles Moulliard edited comment on CAMEL-6084 at 2/27/13 7:57 AM:
-------------------------------------------------------------------

wsdl used

{code}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
        xmlns:impl="http://helloworld.mycompany.redhat.com"
        xmlns:jms="http://cxf.apache.org/transports/jms"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:soapjms="http://www.w3.org/2010/soapjms/"
        targetNamespace="http://helloworld.mycompany.redhat.com">
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
                elementFormDefault="qualified"
                targetNamespace="http://helloworld.mycompany.redhat.com">

            <element name="sayHello">
                <complexType>
                    <sequence>
                        <element name="name" type="xsd:string"/>
                    </sequence>
                </complexType>
            </element>

            <element name="sayHelloResponse">
                <complexType>
                    <sequence>
                        <element name="sayHelloReturn" type="xsd:string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>

    <wsdl:message name="sayHelloResponse">
        <wsdl:part element="impl:sayHelloResponse" name="parameters">
        </wsdl:part>
    </wsdl:message>

    <wsdl:message name="sayHelloRequest">
        <wsdl:part element="impl:sayHello" name="parameters">
        </wsdl:part>
    </wsdl:message>

    <wsdl:portType name="HelloWorld">
        <wsdl:operation name="sayHello">
            <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest">
            </wsdl:input>
            <wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld">
        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="sayHello">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="sayHelloRequest">
                <wsdlsoap:body use="literal"/>
            </wsdl:input>

            <wsdl:output name="sayHelloResponse">
                <wsdlsoap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:binding name="HelloWorldSoap_JMS_Binding" type="impl:HelloWorld">
        <wsdlsoap:binding style="document" transport="http://cxf.apache.org/transport/jms"/>
        <wsdl:operation name="sayHello">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="sayHelloRequest">
                <wsdlsoap:body use="literal"/>
            </wsdl:input>

            <wsdl:output name="sayHelloResponse">
                <wsdlsoap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="HelloWorldService">
        <wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld">
            <wsdlsoap:address location="http://localhost:8080/WebService/services/HelloWorld"/>
        </wsdl:port>

        <wsdl:port binding="impl:HelloWorldSoap_JMS_Binding" name="HelloWorldOverJms">
            <jms:address
                    destinationStyle="queue"
                    jndiConnectionFactoryName="ConnectionFactory"
                    jndiDestinationName="dynamicQueues/test.soap.jmstransport.queue">
                <jms:JMSNamingProperty name="java.naming.factory.initial"
                                       value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
                <jms:JMSNamingProperty name="java.naming.provider.url" value="vm://localhost"/>
            </jms:address>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

{code}
                
      was (Author: cmoulliard):
    wsdl used

{code}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
        xmlns:impl="http://helloworld.atos.redhat.com"
        xmlns:jms="http://cxf.apache.org/transports/jms"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:soapjms="http://www.w3.org/2010/soapjms/"
        targetNamespace="http://helloworld.atos.redhat.com">
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
                elementFormDefault="qualified"
                targetNamespace="http://helloworld.atos.redhat.com">

            <element name="sayHello">
                <complexType>
                    <sequence>
                        <element name="name" type="xsd:string"/>
                    </sequence>
                </complexType>
            </element>

            <element name="sayHelloResponse">
                <complexType>
                    <sequence>
                        <element name="sayHelloReturn" type="xsd:string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>

    <wsdl:message name="sayHelloResponse">
        <wsdl:part element="impl:sayHelloResponse" name="parameters">
        </wsdl:part>
    </wsdl:message>

    <wsdl:message name="sayHelloRequest">
        <wsdl:part element="impl:sayHello" name="parameters">
        </wsdl:part>
    </wsdl:message>

    <wsdl:portType name="HelloWorld">
        <wsdl:operation name="sayHello">
            <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest">
            </wsdl:input>
            <wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld">
        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="sayHello">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="sayHelloRequest">
                <wsdlsoap:body use="literal"/>
            </wsdl:input>

            <wsdl:output name="sayHelloResponse">
                <wsdlsoap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:binding name="HelloWorldSoap_JMS_Binding" type="impl:HelloWorld">
        <wsdlsoap:binding style="document" transport="http://cxf.apache.org/transport/jms"/>
        <wsdl:operation name="sayHello">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="sayHelloRequest">
                <wsdlsoap:body use="literal"/>
            </wsdl:input>

            <wsdl:output name="sayHelloResponse">
                <wsdlsoap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="HelloWorldService">
        <wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld">
            <wsdlsoap:address location="http://localhost:8080/WebService/services/HelloWorld"/>
        </wsdl:port>

        <wsdl:port binding="impl:HelloWorldSoap_JMS_Binding" name="HelloWorldOverJms">
            <jms:address
                    destinationStyle="queue"
                    jndiConnectionFactoryName="ConnectionFactory"
                    jndiDestinationName="dynamicQueues/test.soap.jmstransport.queue">
                <jms:JMSNamingProperty name="java.naming.factory.initial"
                                       value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
                <jms:JMSNamingProperty name="java.naming.provider.url" value="vm://localhost"/>
            </jms:address>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

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