AnsweredAssumed Answered

SOAP to REST routing problem

Question asked by Olena_Cher on Mar 4, 2016
Latest reply on Aug 28, 2016 by Stephen_Hughes

I've published a SOAP service on the API Gateway using WSDL file.

 

In the policy I need to validate the incoming SOAP and then send a routing call to my REST back end.

 

I can capture the needed parameters using the "Evaluate Request XPath" from incoming SOAP.

 

Now, I need to send the parameters with the POST request to the REST back end

 

Here's the problem, the option to "Customize Request Form POST Parameters" doesn't seem to do anything.

 

 

I'm not receiving those parameters at my back end, in fact, I'm receiving the Default request (with request.mainpart equal to the original SOAP)

 

I'm expecting to receive them as:

request = {Message}

contentType = {String} "application/x-www-form-urlencoded"

http.allheadervalues = {Object[]} size = 7

[0] = {String} "accept:text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"

[1] = {String} "authorization:Basic QXV0b21....."

[2] = {String} "connection:close"

[3] = {String} "content-length:92"

[4] = {String} "content-type:application/x-www-form-urlencoded"

[5] = {String} "host:ngsi-ppd.tdlab.ca:8443"

[6] = {String} "user-agent:Java/1.8.0_73"

mainpart = {String} "address=12345&correlator=549925&message=XoXOXo&notifyURL=http://notifyURL/test"

 

But, instead, I'm receiving

request = {Message}

contentType = {String} "application/x-www-form-urlencoded"

http.allheadervalues = {Object[]} size = 6

[0] = {String} "authorization:Basic QXV0b2......=="

[1] = {String} "connection:Keep-Alive"

[2] = {String} "content-length:616"

[3] = {String} "content-type:application/x-www-form-urlencoded, text/xml;charset=UTF-8"

[4] = {String} "host:myapiGateway:8443"

[5] = {String} "user-agent:Apache-HttpClient/4.2.6 (java 1.5)"

mainpart = {String} "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loc="http://www.csapi.org/schema/parlayx/sms/send/v2_3/local">   <soapenv:Header/>   <soapenv:Body>      <loc:myservice>         <loc:addresses>12345</loc:addresses>         <loc:message>XoXOXo</loc:message>         <loc:receiptRequest>  <endpoint>http://notifyURL/test</endpoint>  <correlator>549925</correlator>  </loc:receiptRequest>      </loc:myservice>   </soapenv:Body></soapenv:Envelope>"

 

Outcomes