on 04-18-2016 8:25 AM
I have configured a scenario with a REST receiver for consuming a REST Service. My URL looks like that:
http://server:port/service?para1={para1}¶2={para2}
The para1 and para2 are in my request payload. The problem is that these parameters are optional. It is possible that they have no value. And the REST service allows calls like this:
http://server:port/service?para1=¶2=value2
But I get always an error when I try to call the service via the REST receiver with an empty parameter.
"MP: exception caught with cause com.sap.aii.adapter.rest.ejb.receiver.PlaceholderMissingException: URL placeholder para1 is not configured, or has an empty value"
In my real scenario I have more than 2 parameters and one or more of them are always empty. Is there a solution for this problem? Otherwise I can't use this for my purpose or I have to find a workaround (combine all parameter in one)
With the help of a colleague I have found a work-around. If a parameter is empty I set a "&" as value in message mapping. So the value of para1 in my example is "&". That means that I get a URL like this
http://server:port/service?para1=&¶2=value2
For the service I use this works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.