Using PI with RESTful service returning plain text response
We're faced with a couple of integration patterns that have plain text (and in other case JSON) synchronous responses. Since PI seems to require xml in the message payload, we are facing a challenge with the implementation of these scenarios in PI.
Req: ABAP PROXY -> PI -> RESTful service
Response: RESTful service -> PI -> ABAP Proxy
We can successfully call the service using http adapter, but when the response is a plain text string and not xml, we are facing a challenge with using PI in thi scenario.
Surely there is a solution for this problem and we are not the first to have encountered it. We are using 7.1.
Appreciate any and all suggestions!
Mark Dihiansan replied
In that case you can refer to this blog
http://wiki.sdn.sap.com/wiki/display/XI/JavaMapping-ConverttheInputxmlto+String it uses the Java Mapping API before 7.1 and has a sample.
Do not worry about the text response, you can build your output XML via Java Mapping to match your proxy XML expected input.
Hope this helps,