Reputation: 903
I have a use case in which the request is send to a proxy A. It is then cloned to two different proxies viz., Proxy B & Proxy C.
The response from Proxy B & Proxy C has to be captured in the outsequence of Proxy A.
Will this logic work ? Because I get this error:
[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
My proxy:
<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>
Any thoughts for me ?
Regards Guru @gnanagurus
Upvotes: 2
Views: 2176
Reputation: 281
Your logic is correct. If this proxy is picking messages from a jms queue, set the following property in the inSequence before the clone mediator and try again.
<property name="messageType" value="text/xml" scope="axis2"/>
Upvotes: 2
Reputation: 9692
Your logic and proxy conf is right..The issue is system cannot recognize the endpoint.. Your service URL is right? can you make it like this? (remove the backslash at the end)
http://localhost:8280/services/LIS
Upvotes: 0