Issue with soap binding not getting response.
ravi21588 Mar 17, 2016 12:32 PMHi Iam not getting response from switchyard component when i use soap binding.
my switchyard xml is as below.
<?xml version="1.0" encoding="UTF-8"?>
<sy:switchyard xmlns:camel="urn:switchyard-component-camel:config:1.1" xmlns:jms="urn:switchyard-component-camel-jms:config:1.1" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.1" xmlns:sy="urn:switchyard-config:switchyard:1.1" name="switchyard-soap-mq" targetNamespace="urn:com.example.switchyard:switchyard-soap-mq:1.0">
<sca:composite name="switchyard-soap-mq" targetNamespace="urn:com.example.switchyard:switchyard-soap-mq:1.0">
<sca:component name="Component">
<camel:implementation.camel>
<camel:xml path="ESBServiceRoute.xml"/>
</camel:implementation.camel>
<sca:service name="ESBService">
<sy:interface.esb inputType="java:java.lang.String"/>
</sca:service>
</sca:component>
<sca:service name="ESBService" promote="Component/ESBService">
<sy:interface.esb inputType="java:java.lang.String"/>
<soap:binding.soap name="soap1">
<soap:messageComposer unwrapped="true"/>
<soap:wsdl>META-INF/wsdl/OrderService.wsdl</soap:wsdl>
<soap:socketAddr>:8080</soap:socketAddr>
<soap:contextPath>quickstartbean</soap:contextPath>
</soap:binding.soap>
</sca:service>
</sca:composite>
</sy:switchyard>
my route is as below:
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="switchyard://ESBService"/>
<log message="ESBService - message received: ${body}"/>
<inOut uri="language:simple:classpath:/data/Output.xml"/>
<log message="ESBService - message Output Route 1: ${body}"/>
</routes>
when i trigger the request
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header/>
<soap:Body>
<orders:submitOrder xmlns:orders="urn:switchyard-quickstart:bean-service:1.0">
<order>
<orderId>PO-19838-XYZ</orderId>
<itemId>BUTTER</itemId>
<quantity>200</quantity>
</order>
</orders:submitOrder>
</soap:Body>
</soap:Envelope>
Service is getting invoked and getting the below in logs
17:15:19,016 INFO [route56] (http-127.0.0.1/127.0.0.1:8080-7) ESBService - message received: <orders:submitOrder xmlns:orders="urn:switchyard-quickstart:bean-service:1.0">
<order>
<orderId>PO-19838-XYZ</orderId>
<itemId>BUTTER</itemId>
<quantity>200</quantity>
</order>
</orders:submitOrder>
17:15:19,022 INFO [route56] (http-127.0.0.1/127.0.0.1:8080-7) ESBService - message Output Route 1: <?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<orders:submitOrderResponse xmlns:orders="urn:switchyard-quickstart:bean-service:1.0">
<orderAck>
<orderId>PO-19838-XYZ</orderId>
<accepted>true</accepted>
<status>Order Accepted [intercepted]</status>
</orderAck>
</orders:submitOrderResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
but it is getting timed out with below error.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/>
<soap:Body>
<env:Fault xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Code>
<env:Value>env:Receiver</env:Value>
</env:Code>
<env:Reason>
<env:Text xml:lang="en-US">SWITCHYARD035452: Timed out after 15000 ms waiting on synchronous response from target service '{urn:com.example.switchyard:switchyard-soap-mq:1.0}ESBService'.</env:Text>
</env:Reason>
</env:Fault>
</soap:Body>
</soap:Envelope>
Can you please tell me what is wrong.