WSO2服务链接-代理服务

WSO2服务链接-代理服务,wso2,wso2esb,Wso2,Wso2esb,我有一个用例,其中请求被发送到代理a。然后它被克隆到两个不同的代理,即代理B和代理C 代理B和代理C的响应必须在代理A的结果中捕获 这个逻辑行得通吗?因为我得到了这个错误: [2013-05-13 17:15:08,304] ERROR - ClientUtils The system cannot infer the transp ort information from the /services/LIS/ URL. [2013-05-13 17:15:08,304] ERROR - Axi

我有一个用例,其中请求被发送到代理a。然后它被克隆到两个不同的代理,即代理B和代理C

代理B和代理C的响应必须在代理A的结果中捕获

这个逻辑行得通吗?因为我得到了这个错误:

[2013-05-13 17:15:08,304] ERROR - ClientUtils The system cannot infer the transp
ort information from the /services/LIS/ URL.
[2013-05-13 17:15:08,304] ERROR - Axis2Sender Unexpected error during sending me
ssage out
org.apache.axis2.AxisFault: The system cannot infer the transport information fr
om the /services/LIS/ URL.
        at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtil
s.java:81)
        at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationCl
ient.executeImpl(DynamicAxisOperation.java:115)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
149)
        at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2Flexib
leMEPClient.java:456)
        at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)

        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2Synap
seEnvironment.java:316)
        at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediato
r.java:92)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractLis
tMediator.java:71)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMe
diator.java:114)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(Pro
xyServiceMessageReceiver.java:154)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEn
closingRESTHandler(ServerWorker.java:367)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclo
singRequest(ServerWorker.java:408)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.j
ava:219)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Native
WorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603)
        at java.lang.Thread.run(Thread.java:722)
[2013-05-13 17:16:08,228]  WARN - TargetHandler Connection time out while in sta
te: REQUEST_DONE
[2013-05-13 17:16:08,229]  WARN - SourceHandler Connection time out after reques
t is read: 127.0.0.1:53170->127.0.0.1:8280
[2013-05-13 17:16:08,235]  WARN - EndpointContext Endpoint : LIS will be marked
SUSPENDED as it failed
[2013-05-13 17:16:08,231]  WARN - SourceHandler Connection time out after reques
t is read: 127.0.0.1:53169->127.0.0.1:8280
[2013-05-13 17:16:08,237]  WARN - EndpointContext Suspending endpoint : LIS - cu
rrent suspend duration is : 30000ms - Next retry after : Mon May 13 17:16:38 IST
 2013
[2013-05-13 17:16:08,247]  WARN - TargetHandler Connection closed by target host
 before receiving the request
[2013-05-13 17:16:08,250]  WARN - EndpointContext Endpoint : RIS will be marked
SUSPENDED as it failed
[2013-05-13 17:16:08,253]  WARN - EndpointContext Suspending endpoint : RIS - cu
rrent suspend duration is : 30000ms - Next retry after : Mon May 13 17:16:38 IST
我的代理人:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="hospital" transports="https,http,jms,local" statistics="enable" trace="enable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="ContentType" value="text/xml" scope="default"/>
         <class name="com.test.custommediator"/>
         <clone>
            <target>
               <endpoint name="LIS">
                  <address uri="http://localhost:8280/services/LIS/"/>
               </endpoint>
            </target>
            <target>
               <endpoint name="RIS">
                  <address uri="http://localhost:8280/services/RIS/"/>
               </endpoint>
            </target>
         </clone>
      </inSequence>
      <outSequence>
         <log level="full"/>
         <log separator="Entering Aggregator"/>
         <aggregate>
            <completeCondition>
               <messageCount min="2"/>
            </completeCondition>
            <onComplete xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return">
               <send>
                  <endpoint>
                     <address uri="jms:/REPORT?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616"/>
                  </endpoint>
               </send>
            </onComplete>
         </aggregate>
      </outSequence>
      <faultSequence/>
   </target>
   <publishWSDL uri="http://localhost:8280/services/LIS?wsdl"/>
   <parameter name="transport.jms.ContentType">
      <rules>                                                                                                                                                                                                               
         <jmsProperty>contentType</jmsProperty>                                                                                                                                                                                                               
         <default>application/xml</default>                                                                                                                                          
      </rules>
   </parameter>
   <description></description>
</proxy>

内容类型
应用程序/xml
对我有什么想法吗

问候
Guru@gnanagurus

您的逻辑和代理配置是正确的。问题是系统无法识别端点。。 您的服务URL正确吗? 你能这样做吗?(删除末尾的反斜杠)

你的逻辑是正确的。 如果此代理正在从jms队列中拾取消息,请在克隆中介之前的插入序列中设置以下属性,然后重试

<property name="messageType" value="text/xml" scope="axis2"/>


你好,拉塔,我也试过了。它不起作用。还有其他解决办法吗Guruth导致上述问题的原因是,未正确定义传输发送方,或者端点url错误..顺便说一句,您从类中介器获得的输出是什么..?类中介器返回字符串Ratha。还有我的运输寄件人遗漏了什么。我猜不出还有什么:(在克隆之前、类中介之后放一个log=full,粘贴soap消息并检查头值。
<property name="messageType" value="text/xml" scope="axis2"/>