I'm new to web-service and somehow I have created a simple web-service over http/https using wso2 esb 4.0.6. Now my requirement is to remove the tag from response i.e. i need plain text in response, below code snippets will give u a brief idea of my requirement.
<case regex="POST">
<property name="HTTP_METHOD" value="POST" scope="axis2" type="STRING"/>
<enrich>
<source type="inline" clone="true">
<success xmlns="">Your request for subscription is being processed.</success>
</source>
<target type="body"/>
</enrich>
<header name="To" action="remove"/>
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<property name="ContentType" value="text/plain" scope="axis2"/>
</case>
I'm able to get the below response <success>Your request for subscription is being processed.</success>
I just want to remove the <success> </success>
tags from the response.
Thanks in advance
Simply define the full envelope as inline source. Eg:
May be this is bit late, but I too have came across this recently, and here's how you can make it work.
In your proxy service set 'messageType' property as shown below
Add a payload text element. Please refer to the out sequence of the sample proxy service given below
In this scenario my response from the backend service (HelloService) is as follows.
See below the request and response for the GET request using curl command
Thanks Sajith