Friday, July 4, 2014

URL appending issue for REST invocations

Have you experienced the URL appending issue when invoking a WSO2 ESB proxy service as REST ?

In this scenario I'm using a 'JsonReqestProxy' proxy service to write into a file via vfs protocol and JsonReqestProxy is exposed as API in WSO2 API Manager. When we do Post REST invocation to write a file, you'll get URL appending error similar to the following issue.

ERROR {org.apache.synapse.core.axis2.Axis2Sender} -  Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
org.apache.axis2.AxisFault: Couldn't send the message to file : file:///home/aparna/Release_testing/abc/xyz/response.txt/services/JsonReqestProxy

In the above issue "/services/JsonReqestProxy" path has beed appended to the endpoint path, so therefore ESB cannot find the correct path and it will throw an error.

To resolve URL Appending issue you have to set the following property inside the InSequnce.
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>

Likewise, there are several HTTP Transport properties that can be configured in the WSO2 ESB.

No comments:

Post a Comment