Quantcast
Viewing all articles
Browse latest Browse all 3668

Sender Rest adapter Get operation processing

Hi All,

 

I have a scenario where I need to host a REST service using GET operation and there are 2 optional parameters (let's call them a and b).

Since this is GET operation, I am not expecting any HTTP payload in body. I have configured the sender rest channel to convert data to XML and add wrapper of Message type name (refer screenshots). I have done request mapping to hard code a few parameters.

 

However, if I send a GET message to the service using a rest client with no payload, I receive an error (MP: exception caught with cause com.sap.aii.adapter.xi.routing.RoutingException: Unable to parse XML message payload to extract operation for receiver determinationorg.xml.sax.SAXParseException: Premature end of file.). PI doesn't seem to like empty HTTP body even in case of GET operation.

 

Also noticed that:

  1. REST adapter does not add the wrapper element to the request message, if there is no content in body. I would have though it would create an empty root level tag with message type name.
  2. If I change the option to POST and pass {}, as HTTP body, my interface works fine.

 

Am I doing something wrong here?

 

Regards,

Sanjeev.

 

Message was edited by: Sanjeev Shekhar Singh


Viewing all articles
Browse latest Browse all 3668

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>