on 01-18-2016 3:42 PM
I just create a sender communication channel with RESTAdapter configured with the operation GET. I've done everything and moved all the configurations, but I can't get to see the payload in the request and I'm not getting a response message. I need to set my channel so it can receive a GET request as a REST Service.
I'm using SAP PI 7.4 SP11 and to test the REST Service the Chrome plugin Advanced REST Client
Can somebody help me, or show me an example of how the channel must be configured to make the GET Operation work properly. Thanks in advance for your help.
This is the Request Datatype
In this tab I matched the datatype field ID, so it can recognize where the data should go
The message mapping shows that we only need that ID as a parameter to the query:
I test this REST Service in the Google Chrome plugin like this:
I get the error InterfaceDetermination did not yield any actual interface, because the message don't get the payload in the request. How can I fix this?
In the PI Message Monitoring I get this:
The status is Log Version
This is the problem I'm having, I'm not getting the Payload when I use GET Operation (if I try with a different operation like PUT or POST, the payload is shown correctly)
I can see the ID in the message attributes.
If you need more information to review the case, please let me know. Thank you.
Hi Manuel,
In the tab "Operation Determination" of REST sender communication channel configuration, fields "Operation" and "Namespace" shall refer to message type name (of a request message type in a respective called service interface operation) and its namespace, correspondingly, and not a service interface name (service operation is determined by a request message type later on by runtime). In your case, value for the field "Operation" shall be MT_RiesgosConsultablesIdReq.
Please also check your mapping: direct 1:1 mapping for the field "id" will not work here since there is no conversion from JSON to XML and payload of an XML document of a source message will not be populated with "id" (it will only contain a root element of a message and child elements - like "id" in your message type - will be missing). To solve this issue, you may retrieve value of a field "id" from corresponding dynamic attribute which is populated by REST adapter. Example of a user defined function coding that can be used to retrieve adapter specific message attribute value and description of how it can be used in a message mapping, can be found in the blog .
Since you don't have a JSON message in a sent REST request, an activated option "Add Wrapper Element" in the tab "General" of a channel configuration, is superfluous here. You may leave it activated, but you can also deactivate it - it shall bring no difference in case of the described interface.
Regards,
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same situation, I can't get the mapping of id data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandra,
Did you use of a custom user defined function / function of a function library for retrieving value of an adapter specific message attribute?
Here is an example of a UDF that can be used:
And a mapping rule that uses it to populate a field "ID":
Parameters for this function are:
Please refer to a blog - it contains details regarding how this can be implemented.
Regards,
Vadim
Hello Manuel,
Remove the SWCV for ICO and test once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.