Background: I have a spring based REST web-service that receives a less than 1k xml file and after processing it, posts a message to a Topic running on ActiveMQ. Application war is deployed to a Tomcat instance and everything works like a charm and I receive a Http 201 (created) response. Then I created a simple WSO2 ESB Proxy Service which using Pass-through protocol sends the same message to REST service deployed on Tomcat. This works as expected on my local machine and I get a Http 201 (created).
Issue: When proxy service is deployed on a remote WSO2 ESB instance, within the same network, I start getting Http 202 (Accepted) response as compared to 201 (Created). This issue is only for REST service that has a multipart request param. I am able to pass couple of params to another REST web-service with no issues. I have used RestTemplate and AdvancedRestClient (Chrome plugin) to submit messages.
My Configuration:
- WSO2 ESB: 4.7.0
- Tomcat: 7.0.42
- Oracle: JDK 1.7.0_45
- ActiveMQ: 5.8.0
- OS: Debian Sqeeze
Troubleshooting steps:
Set log level to DEBUG for each entry in <ESB_HOME>
/repository/conf/log4.properties, nothing significant pointing to the issue
Installed Tomcat and ActiveMQ on same remote machine containing WSO2 ESB, posted directly against remote Tomcat and received a Http 201 as expected
Here is my proxy definition at <ESB_HOME>
/repository/deployment/server/synapse-configs/default/proxy-services/EventProxy.xml
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="EventProxy"
transports="http"
startOnLoad="true"
trace="enable">
<target>
<inSequence>
<log level="full" />
<send>
<endpoint>
<address uri="http://localhost:8080/services/event"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full" />
<send/>
</outSequence>
</target>
</proxy>
Tried following properties under inSequence in my proxy but to no success.
<property name="POST_TO_URI" value="true" scope="axis2" type="STRING" />
<property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
- Changed Tomcat listening port to be 9000 and in service proxy file
- Disabled Filter mediator in main sequence
<ESB_HOME>
/repository/deployment/server/synapse-configs/default/sequences/main.xml - Added
<drop/>
mediator after send in inSequence at<ESB_HOME>
/repository/deployment/server/synapse-configs/default/sequences/main.xml
Is there any external setting (increasing some sort of timeout) that I need to do when running on remote server ? I am new to WSO2 and ran out of ideas so any helpful pointers will be greatly appreciated.
Additional Steps performed:
Changed <Host>
element in <ESB_HOME>
/repository/conf/carbon.xml by using DNS name and also IP but similar 202 response.
Thanks.