2

リクエストがプロキシ A に送信されるユース ケースがあります。その後、プロキシ B とプロキシ C という 2 つの異なるプロキシに複製されます。

プロキシ 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>

私に何か考えはありますか?

よろしく教祖 @gnanagurus

4

2 に答える 2

2

あなたの論理は正しいです。このプロキシが jms キューからメッセージを取得している場合は、クローン メディエータの前に inSequence で次のプロパティを設定し、再試行してください。

<property name="messageType" value="text/xml" scope="axis2"/>
于 2013-05-19T07:53:36.023 に答える