cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.5 REST sender with no payload

imanuelrahamim
Explorer
0 Kudos

Hello all.

Trying to use PI REST sender adapter to allow calling the PI ICO with URL and parameters only.

So e.g.: http://<server name>:50000/RESTAdapter/<endpoint>?param1=abc¶m2=123

That should generate the following patyload:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_NAME ns0:namespace>

<param1>abc</param1>

<param2>123</param2>

</MT_NAME>

But as no payload is being passed the following error is returned:

Returning to application. Exception: com.sap.aii.adapter.xi.routing.RoutingException: Unable to parse XML message payload to extract operation for receiver determination

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.

any help is appreciated.

I have tried PutPayloadValueBean but as the payload is empty it fails as well.

View Entire Topic
imanuelrahamim
Explorer
0 Kudos

Managed to use MessageTransformBean in order to ignore the empty payload.
So not a very elegant solution but it works.

Leaving the question open if anyone has something better to offer and will upload a short summery of what I did later.

JaySchwendemann
Active Contributor
0 Kudos

How did you use MessageTransformBean for this?

juankinspain
Explorer
0 Kudos

Hello, I am facing the same issue, can you please explain how did you use the MessageTransformBean? Thanks!

Senthilprakash1
Participant
0 Kudos

reference for others, if you want to send only the URL with parameters without payload to rest the sender adapter. Go to sender Rest updater -- > Rest Operation Tab --> Select Value Source as "HTTP Operation". You don't need any modules or anything.

and have a dummy message mapping and use ASMA to extract the parameter values from the Dynamic attributes section.

 

Senthilprakash1_0-1708601900051.png

Senthilprakash1_1-1708601920879.png