cancel
Showing results for 
Search instead for 
Did you mean: 

REST Adapter - optional parameters

Former Member
0 Kudos

Hi,

I'm trying to do a GET with an empty parameter to a sap rest receiver adapter:

URL pattern is like this:

http://Host:Port/rest?tounit={tounit}&fromunit={fromunit}

Example with empty param::

http://Host:Port/rest?tounit=123&;fromunit=

I get the error

Transmitting the message using connection REST_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.receiver.PlaceholderMissingException: URL placeholder fromunit is not configured, or has an empty value

Is this standard beaviour or can I somehow tell the adapter to accept empty parameters?

Note that I put the parameter as Optional in the sender adapter.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Olof.

With the help of a colleague I have found a work-around for this problem. In message mapping you have to set the value of an empty parameter to "&". In your case you have to set formunit=&. The result is a URL like this:

http://Host:Port/rest?tounit=123&fromunit=&

This should work.

Kind regards.

Gil

Answers (2)

Answers (2)

former_member188353
Participant
0 Kudos

can you please give me the UDF if you have used any? or else how you got this? regards, P R.

Former Member
0 Kudos

I don't use a UDF. This is just a simple graphical mapping.

Former Member
0 Kudos

I too have this issue.