how to add .csr certificate in wso2 enterprise integrator 7 ide in xml - wso2-esb

hi can anyone tell me how to add the .csr certificate from the curl command to wso2 enterprise integrator in xml.
curl -v -X POST --cert {{path_to_client_certificate_generated_in_developer_portal} } --cert-type DER --key {{insert_path_to_private_key_used_to_create_CSR}} -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/json" -H "x-fapi-financial-id: test" -H "Cache-Control: no-cache" -d 'grant_type=client_credentials&scope=accounts&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6IjhkZThjYTc3LWQ2ODEtNDc4Mi04MTIyLWUwMzkyNTg5MDIxYiJ9.eyJpc3MiOiIyMTFlMzZkZS02NGIyLTQ3OWUtYWUyOC04YTViNDFhMWE5NDAiLCJhdWQiOiJodHRwczovL3NhbmRib3guaHNiYy5jb20vcHNkMi9vYmllL3YzLjEvYXMvdG9rZW4ub2F1dGgyIiwic3ViIjoiMjExZTM2ZGUtNjRiMi00NzllLWFlMjgtOGE1YjQxYTFhOTQwIiwiaWF0IjoxNDk5MTgzNjAxLCJleHAiOjE3NzkzNDg1MjF9.uu282OmEHUa0t6z6T68MfXzEGGgq8PiWuyJxuNQ1be6iWdD5sVbw3W--_O6TFAH-ae7BYXsE0kncYgA6gF9AmkXuA77w_Wbn2YyjPCB9gDCkrlJUS6rvb3UJYcIBZ7W-WZlRAsRE0l6EV74c5xnyL9c7cpGMfQ-HfPsYOG4JCsrvtpAHdo7jHWTVgKoe67jWGQkNOYt1Ba7rCf4y-fqQ3d6hZoptAAcJd26yigvV4768GHQGrBvgAc7OzutOGzYARAgStpjQMp0kMiOGIzq-TUsDlvtMrx2fH8gfy2uG2HvzsROkbNedL-iO5PmswNrDvCYEWZmVjMcaVg--ZF0sjg' "https://sandbox.hsbc.com/psd2/obie/v3.1/as/token.oauth2"
<resource methods="POST" url-mapping="/getAccounts">
<inSequence>
<header name="Content-Type" scope="transport" value="application/x-www-form-urlencoded"/>
<header name="Accept" scope="transport" value="application/json"/>
<header name="x-fapi-financial-id" scope="transport" value="test"/>
<header name="Cache-Control" scope="transport" value="no-cache"/>
<property expression="$trp:grant_type" name="client_credentials" scope="default" type="STRING"/>
<property expression="$trp:scope" name="accounts" scope="default" type="STRING"/>
<property expression="$trp:client_assertion_type" name="urn:ietf:params:oauth:client-assertion-type:jwt-bearer" scope="default" type="STRING"/>
<!-- <property expression="json-eval($.authorization)" name="prop.bearer.token" scope="default" type="STRING"/> -->
<payloadFactory media-type="json">
<format>{
"grant_type": "$1",
"scope": "$2",
"client_assertion_type": "$3"
}
<args>
<arg evaluator="xml" expression="$trp:grant_type"/>
<arg evaluator="xml" expression="$trp:scope"/>
<arg evaluator="xml" expression="$trp:client_assertion_type"/>
</args>
</payloadFactory>
<call>
<endpoint>
<http method="post" statistics="enable" uri-template="https://sandbox.hsbc.com/psd2/obie/v3.1/as/token.oauth2">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
<sequence key="conf:sequence/HttpFaultSequence.xml"/>

As per my understanding, your requirement is to update the Keystore in the micro integrator packed with the Integration studio. You can update the Keystore directly from the Integration studio installation location. In mac this location is
/Applications/IntegrationStudio.app/Contents/Eclipse/runtime/microesb/repository/resources/security

Related

WSO2 EI: Can I use mediator to request another API and pass its response to the body request?

In my case, I want to add a dynamic value ("Bearer" + {access-token}) to the header mediator .
So before the header mediator, I want to invoke a get-token API and extract {access-token} element from its response. How can I get that ? Thank you so much.
You can achieve such requirements with mediation sequences. You can refer to this blog for more detailed instructions on how to develop a sequence for your requirement. The blog is written for the API Manager product, but nevertheless, you can follow the same to get it done in the EI.
A sample mediation sequence will be as following
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="oauth2-sequence" xmlns="http://ws.apache.org/ns/synapse">
<!-- token generation to the oauth server's token endpoint -->
<!-- add the base64 encoded credentials -->
<property name="client-authorization-header" scope="default" type="STRING" value="MDZsZ3BTMnh0enRhOXBsaXZGUzliMnk4aEZFYTpmdE4yWTdLcnE2SWRsenBmZ1RuTVU1bkxjUFFh" />
<property name="request-body" expression="json-eval($)" scope="default" type="STRING" />
<property name="resource" expression="get-property('axis2', 'REST_URL_POSTFIX')" scope="default" type="STRING" />
<!-- creating a request payload for client_credentials -->
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<root xmlns="">
<grant_type>client_credentials</grant_type>
</root>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args></args>
</payloadFactory>
<!-- set related headers to call the token endpoint -->
<header name="Authorization" expression="fn:concat('Basic ', get-property('client-authorization-header'))" scope="transport" />
<header name="Content-Type" value="application/x-www-form-urlencoded" scope="transport" />
<property name="messageType" value="application/x-www-form-urlencoded" scope="axis2" type="STRING" />
<property name="REST_URL_POSTFIX" value="" scope="axis2" type="STRING" />
<!-- change the token endpoint -->
<call blocking="true">
<endpoint>
<http method="POST" uri-template="https://localhost:9443/oauth2/token" />
</endpoint>
</call>
<!-- append the acquired access token and make the call to the backend service -->
<property name="bearer-token" expression="json-eval($.access_token)" scope="default" type="STRING" />
<property name="REST_URL_POSTFIX" expression="get-property('resource')" scope="axis2" type="STRING" />
<header name="Authorization" expression="fn:concat('Bearer ', get-property('bearer-token'))" scope="transport" />
<payloadFactory media-type="json">
<format>$1</format>
<args>
<arg evaluator="xml" expression="get-property('request-body')" />
</args>
</payloadFactory>
<!-- perform a send or call to complete the execution of the backend service call in EI -->
</sequence>
Hope this helps you to start with implementation.

Iterate over DSS(3.2.2) response in WSO2 ESB(4.8.1) not working as expected

I am doing iteration over the DSS response, But not working as expected
Below is the payload and call for DSS:
<payloadFactory media-type="xml">
<format>
<p:getNominaIDDetails xmlns:p="http://ws.wso2.org/dataservice">
<xs:column1 xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:column1>
<xs:column2 xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:column2>
<xs:column3 xmlns:xs="http://ws.wso2.org/dataservice">$3</xs:column3>
<xs:column4 xmlns:xs="http://ws.wso2.org/dataservice">$4</xs:column4>
</p:getNominaIDDetails>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('column1')" evaluator="xml"></arg>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('column2')" evaluator="xml"></arg>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('column3')" evaluator="xml"></arg>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('column4')" evaluator="xml"></arg>
</args>
</payloadFactory>
<header name="Action" scope="default" value="urn:xxxxxxx"></header>
<call>
<endpoint key="gov:/dss/endpoint"></endpoint>
</call>
<filter xmlns:ns="http://org.apache.synapse/xsd"
xmlns:ds="http://ws.wso2.org/dataservice"
xpath="get-property('db_count')>0">
<then>
<iterate id="xxx"
preservePayload="true"
attachPath="//ds:xxxx"
expression="//ds:xxx/ds:xxx">
<target sequence="My_seq">
</target>
</iterate>
</then>
<else>
<drop/>
</else>
</filter>
Response from the dss is:
<response xmlns="http://ws.wso2.org/dataservice">
<id>
<column1>234</column1>
<column1>4455</column1>
<column1>567778</column1>
</id>
<id>
<column1>546</column1>
<column1>56866</column1>
<column1>464453</column1>
</id>
<id>
<column1>546</column1>
<column1>56866</column1>
<column1>464453</column1>
</id>
</response>
With the above response completing with first iteration and remaining all the messages expiring after global timeout.Below are the logs after first iteration:
{org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2016-09-04 06:26:13,471] WARN {org.apache.synapse.core.axis2.SynapseCallbackReceiver} - Synapse received a response for the request with message Id : urn:uuid:c62d7dae-5290-49d1-b1bd-b5d2dcba7e04 But a callback is not registered (anymore) to process this response {org.apache.synapse.core.axis2.SynapseCallbackReceiver}
TID: [0] [ESB] [2016-09-04 06:26:42,144] WARN {org.apache.synapse.core.axis2.TimeoutHandler} - Expiring message ID : urn:uuid:36df3897-73be-4bc3-a434-aaab618c7ce3; dropping message after global timeout of : 180 seconds {org.apache.synapse.core.axis2.TimeoutHandler}
TID: [0] [ESB] [2016-09-04 06:26:42,145] WARN {org.apache.synapse.core.axis2.TimeoutHandler} - Expiring message ID : urn:uuid:d8ec8998-95c6-4d70-9e33-c11bda271e90; dropping message after global timeout of : 180 seconds {org.apache.synapse.core.axis2.TimeoutHandler}
Note: inside iterator doing following operations(sequence="My_seq")
perfoming the Bank call-->DSS call-->SAP call using call meditor
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="My_seq" >
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:ds="http://ws.wso2.org/dataservice" name="id" expression="//ds:dss_response/ds:Id" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<h:opertion xmlns:h="http://ws.wso2.org/xxxxxx">
<h2h:id>$1</h2h:id>
</h:opertion>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" evaluator="xml" expression="get-property('id')"/>
</args>
</payloadFactory>
<property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization" expression="fn:concat('Basic ', base64Encode('xxxxx:xxxxxxxx'))" scope="transport" type="STRING"/>
<property name="ContentType" value="application/soap+xml" scope="axis2" type="STRING"/>
<property name="messageType" value="application/soap+xml" scope="axis2" type="STRING"/>
<call>
<endpoint key="gov:/endpoint"/>
</call>
<sequence key="next_sequence_to_be_DSS_then_SAP"/>
</sequence>
I believe this should suit your requirement. Here I'm checking status of incoming responses and send OK to client only if every request was successful.
<api xmlns="http://ws.apache.org/ns/synapse" name="MyAPI" context="/myapi">
<resource methods="POST GET" url-mapping="/">
<inSequence>
<call blocking="true">
<endpoint>
<http uri-template="http://www.mocky.io/v2/57cd6f422d00000101b15868"/>
</endpoint>
</call>
<property name="Staus" value="OK" type="STRING"/>
<iterate xmlns:ds="http://ws.wso2.org/dataservice" id="xxx" preservePayload="true" expression="//ds:response/ds:id">
<target>
<sequence>
<send>
<endpoint>
<http uri-template="http://www.mocky.io/v2/57cd70c22d00002401b1586c"/>
</endpoint>
</send>
</sequence>
</target>
</iterate>
</inSequence>
<outSequence>
<filter source="$axis2:HTTP_SC" regex="200">
<then/>
<else>
<property name="Staus" value="NOT OK" type="STRING"/>
</else>
</filter>
<aggregate id="xxx">
<completeCondition>
<messageCount/>
</completeCondition>
<onComplete xmlns:ds="http://ws.wso2.org/dataservice" expression="/">
<log level="custom">
<property name="Final Staus" expression="$ctx:Staus"/>
</log>
<payloadFactory media-type="xml">
<format>
<status>$1</status>
</format>
<args>
<arg evaluator="xml" expression="$ctx:Status"/>
</args>
</payloadFactory>
<send/>
</onComplete>
</aggregate>
</outSequence>
</resource>
</api>

WSO2 ESB - Api to Soap transformation

I would like to expose an API (REST) on ESB that traslate the request to a SOAP service.
My Api is definined in this way :
<api xmlns="http://ws.apache.org/ns/synapse" name="__test" context="/mytest">
<resource methods="GET" uri-template="/{symbol}">
<inSequence>
<property name="symbol" expression="get-property('uri.var.symbol')"/>
<payloadFactory media-type="xml">
<format>
<ser:getQuote xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
<ser:request>
<xsd:symbol>$1</xsd:symbol>
</ser:request>
</ser:getQuote>
</format>
<args>
<arg evaluator="xml" expression="get-property('symbol')"/>
</args>
</payloadFactory>
<log level="full"/>
<send>
<endpoint>
<wsdl service="SimpleStockQuoteService" port="SimpleStockQuoteServiceHttpEndpoint"
uri="http://localhost:9000/services/SimpleStockQuoteService?wsdl"/>
</endpoint>
</send>
</inSequence>
</resource>
</api>
But when i invoke the url with http://:8280/mytest/WSO2 I heve this error on console
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Text xml:lang="en-US">
The endpoint reference (EPR) for the Operation not found is /services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpEndpoint/WSO2?request= and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.
</soapenv:Text>
</soapenv:Reason>
Because the esb append the WSO2 part of the request to URL.
How I can solve this ?
Thanks
You can follow this guide for achieving this. Note that the soap action header should be added as follows and endpoint is different.
<header name="Action" value="urn:getQuote"/>
Find the complete solution API below,
<api xmlns="http://ws.apache.org/ns/synapse" name="__test" context="/mytest"><resource methods="GET" uri-template="/{symbol}">
<inSequence>
<property name="symbol" expression="get-property('uri.var.symbol')"/>
<payloadFactory media-type="xml">
<format>
<ser:getQuote xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
<ser:request>
<xsd:symbol>$1</xsd:symbol>
</ser:request>
</ser:getQuote>
</format>
<args>
<arg evaluator="xml" expression="get-property('symbol')"/>
</args>
</payloadFactory>
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
<log level="full"/>
<header name="Action" value="urn:getQuote"/>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>
</endpoint>
</send>
</inSequence></resource></api>
If you want to use the WSDL url directly, you can achive this using WSO2 API Manager and it can be easily tried in WSO2 API Cloud. There is a similar question here.

Sending Content-Type application/x-www-form-urlencoded WSO2 ESB

I have been working in a service chaining that answers me with a Bearer Token using in WSO2 EMM.
I made a proxy in ESB and then I passed to a new sequence that makes the next call but this one receives a Content-Type application/x-www-form-urlencoded. I have been looking for some help so that I can find anything interesting.
This is my proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="TokenService" startOnLoad="true" statistics="enable"
trace="enable" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<!--Aggregate incoming responses -->
<log level="full">
<property name="sequence" value="Paso 1 - request for client register"/>
</log>
<property description="Content-Type" name="ContentType"
scope="default" type="STRING" value="application/json"/>
<header name="Accept" scope="transport" value="application/json"/>
<payloadFactory description="Payload" media-type="json">
<format>{
"owner": "admin",
"clientName": "admin_emm",
"grantType":
"refresh_token password client_credentials",
"tokenScope": "prod"
}</format>
<args/>
</payloadFactory>
<send receive="Mensaje"/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
</proxy>
This is my sequence that gets the response from the other service in my proxy
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="Mensaje" trace="enable" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property expression="json-eval($.client_secret)"
name="client_secret" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
<log level="custom">
<property expression="json-eval($.client_id)" name="client_id" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
<log level="custom">
<property
expression="fn:concat('Basic ', base64Encode('client_id:client_secret'))"
name="Authorization" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
<property name="grant_type" value="password"/>
<property name="username" value="admin"/>
<property name="password" value="admin"/>
<property name="scope" value="default"/>
<header name="Accept" scope="transport" value="application/json"/>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<root xmlns="">
<grant_type>$1</grant_type>
<username>$2</username>
<password>$3</password>
<scope>$4</scope>
</root>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:grant_type" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:username" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:password" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:scope" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<property name="ContentType" value="application/x-www-form-urlencoded"/>
<property name="DISABLE_CHUNKING" scope="axis2" type="STRING" value="true"/>
<call>
<endpoint name="Token">
<http method="POST" uri-template="https://localhost:9443/oauth2/token"/>
</endpoint>
</call>
<respond/>
</sequence>
Then when i run it i have an error of HTTP/1.1 415 Unsupported Media Type
Please, help
I got it this is the answer
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="Mensaje" trace="enable" xmlns="http://ws.apache.org/ns/synapse">
<property expression="json-eval($.client_secret)"
name="client_secret" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="json-eval($.client_id)" name="client_id" xmlns:ns="http://org.apache.synapse/xsd"/>
<property
expression="fn:concat(get-property('client_id'),':',get-property('client_secret'))"
name="Concatenados" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="base64Encode(get-property('Concatenados'))"
name="Codificados" xmlns:ns="http://org.apache.synapse/xsd"/>
<property
expression="fn:concat('Basic ', get-property('Codificados'))"
name="Autorizacion" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="grant_type" value="password"/>
<property name="username" value="admin"/>
<property name="password" value="admin"/>
<property name="scope" value="default"/>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<root xmlns="">
<grant_type>$1</grant_type>
<username>$2</username>
<password>$3</password>
<scope>$4</scope>
</root>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:grant_type" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:username" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:password" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:scope" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<header name="Content-Type" scope="transport" value="application/x-www-form-urlencoded"/>
<header expression="get-property('Autorizacion')"
name="Authorization" scope="transport" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="messageType" scope="axis2" type="STRING" value="application/x-www-form-urlencoded"/>
<property name="DISABLE_CHUNKING" scope="axis2" type="STRING" value="true"/>
<call>
<endpoint name="Token">
<http method="POST" uri-template="https://localhost:9443/oauth2/token"/>
</endpoint>
</call>
<respond/>
</sequence>
I had the same error. This is my solution, similar to previous but in Json:
<property name="scope" scope="default" type="STRING" value="myScope"/>
<payloadFactory media-type="json">
<format>{"grant_type":"password","username":"admin","password":"admin","scope":"$1"}</format>
<args>
<arg evaluator="xml" expression="get-property('scope')"/>
</args>
</payloadFactory>
<!-- authorization header with consumer-key:consumer-secret in Base64 -->
<header name="Authorization" scope="transport" value="Basic RUVyY0VRejFfU..."/>
<header name="Content-Type" scope="transport" value="application/x-www-form-urlencoded"/>
<property name="messageType" scope="axis2" type="STRING" value="application/x-www-form-urlencoded"/>
<call blocking="true">
<endpoint key="GetToken"/>
</call>

Issue in getting response back while connecting to Oracle DB in WSO2 esb

I am working on sample application in WSO2 esb
which connects to Oracle Database and return the response of a query. Below mentioned is my service. Issue I am facing is I am not getting the response back after execution of service.However I am able to see the value returned as a query response, but not able to render it in response document.
Can anybody suggest, what I am missing?
DB credentials fields have been hashed.
Proxy :
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="getEmployeeDetails"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true" scope="default" type="BOOLEAN"/>
<log level="full" category="DEBUG"/>
<dblookup>
<connection>
<pool>
<password>****</password>
<user>****</user>
<url>****</url>
<driver>oracle.jdbc.xa.client.OracleXADataSource</driver>
</pool>
</connection>
<statement>
<sql>select firstname from employee where lastname = 'pawar'</sql>
<result name="firstname" column="firstname"/>
</statement>
</dblookup>
<log level="custom">
<property name="firstname" expression="get-property('firstname')"/>
</log>
<payloadFactory media-type="xml">
<format>
<GetEmployeeDetailsResponse xmlns="">
<out>$1</out>
</GetEmployeeDetailsResponse>
</format>
<args>
<arg evaluator="xml" expression="get-property('firstname')"/>
</args>
</payloadFactory>
</inSequence>
<outSequence>
<log level="full" category="DEBUG"/>
</outSequence>
</target>
<publishWSDL uri="file:/development/data/wso2/wsdl/Employee.wsdl"/>
<description/>
</proxy>
You have to send back the message generated by your payloadFactory in your inSequence :
<header name="To" action="remove"/>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
<send/>
Your mediation is "OUT_ONLY", so, your outSequence will never been executed