I want to integrate an API in WSO2 EI6.6.0 where the downstream API only accepts HTTP method GET with JSON Request body but as per WSO2 EI, it ignores the JSON request being set using the payload factory which is why the downstream gives an error. below is my code
<sequence name="moz-simo-billpay-general-process-request-seq" xmlns="http://ws.apache.org/ns/synapse">
<payloadFactory media-type="json">
<format>
{
"Document": {
"ServiceReq": {
"Hdr": {
"MsgFctn": "$2",
"PrtcolVrsn": "$3",
"MsgUUID": ""
},
"ReqData": $1
}
}
}
</format>
<args>
<arg evaluator="xml" expression="$ctx:incomingPayload"
literal="false" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:operationCode"
literal="false" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:protocol"
literal="false" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<property
expression="fn:concat($ctx:mozSimoBillpayUrl, '/BillPay/V2.0.1.0/Billers')"
name="uri.var.mozSimoBillPayUrl" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="HTTP_METHOD" scope="axis2" type="STRING" value="GET"/>
<property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
<property name="DISABLE_CHUNKING" scope="axis2" type="STRING" value="true"/>
<property expression="concat('Bearer ',$ctx:bearerToken)"
name="Authorization" scope="transport" xmlns:ns="http://org.apache.synapse/xsd"/>
<call>
<endpoint>
<http uri-template="{uri.var.mozSimoBillPayUrl}">
<timeout>
<duration>120000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</http>
</endpoint>
</call>
<log level="full"/>
<property expression="json-eval($)" name="response" xmlns:ns="http://org.apache.synapse/xsd"/>
</sequence>
How can we achieve this kind of scenario in wso2 EI?