如何从webservice接收响应到wso2 esb代理服务的后果?

时间:2013-03-08 10:14:59

标签: web-services soap jms wso2 wso2esb

目前我正在将一个xml作为jms消息从activemq发送到wso2 esb代理服务。我正在使用mediator类聚合这条消息,并将该消息发送到外部Web服务。

现在,如何从webservice获取响应到wso2 esb proxy outsequence,我必须将它作为jms消息发送回活动的mq输出队列。

 Here is the proxy service ::-

    <proxy xmlns="http://ws.apache.org/ns/synapse" name="Demo" transports="https,http,jms" statistics="disable" trace="disable" startOnLoad="true">
       <target>
          <inSequence>
             <property name="OUT_ONLY" value="false"/>
             <property name="ContentType" value="text/plain"/>
             <class name="com.test.Mediator1"/>
             <send>
                <endpoint>
                   <address uri="http://localhost:9989/ws/param?wsdl"/>
                </endpoint>
             </send>
          </inSequence>
          <outSequence>
             <send>
                <endpoint>
                   <address uri="jms:/OutputQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616"/>
                </endpoint>
             </send>
          </outSequence>
       </target>
       <parameter name="transport.jms.ContentType">
          <rules>         
             <jmsProperty>contentType</jmsProperty>         
             <default>application/xml</default>      
          </rules>
       </parameter>
       <description></description>
    </proxy>

    This is the message which I got when I invoke webservice through soapui client.

    <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getHelloWorldAsStringResponse xmlns:ns2="http://ws.mkyong.com/"><result>true</result></ns2:getHelloWorldAsStringResponse></S:Body></S:Envelope>

    This is the message which I got in activemq output queue.


    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope>   

1 个答案:

答案 0 :(得分:0)