3 weeks ago - last edited 3 weeks ago
Here is my PI solution.
1. it's a pass through PI solution (REST Adapter) for GET and POST calls. No ESR.
2. We deliver a TPZ file to customers. No separate adapter module deployment.
3. In our GET calls, we pass a bunch of HTTP Headers.
One challenge we had with our customers is that some customers require HTTP Header Content-Type and some don't in GET/DELETE calls. In CI, there's automatic forwarding of HTTP headers from source to target.
In PI, I understand that I have to list out all the HTTP Headers that I want to pass to downstream system. This means that Content-Type will always be on the header to downstream system regardless if it's provided by sender or not.
The workaround we came up with is 2 receiver communication channels. 1 with Content-Type and 1 without Content-Type. We currently also have 2 sender communication channels. We would like to set a condition inside Integrated Configuration to determine the appropriate receiver communication channel based on the presence of Content-Type. I made it work with ContextObject HEADER.ID2 by passing the HTTP Header Content-Type to it.
What we would like is NOT to use HEADER.ID2, but our own variable from DynamicConfiguration.
In my below screenshot, we have tau_header_content_type and header_content_type. Can I use one of these directly in XPath?
I tried
/DynamicConfiguration/sap:Record[@name='tau_header_content_type']
/DynamicConfiguration/tau_header_content_type
and a bunch of other variations, but they all give me an error.
Request clarification before answering.
Xpath is meant for payload. You can refer payload and put a condition. For headers, like you have showed, you can use context object, but these are inbuilt and created by SAP. only those available headers you can use.
You can try this, convert one flow into 3.
1. Your existing flow REST to REST. Here you send the request to either any of below two flows, contruct the target endpong like /RestAdapter/tau_header_content_type, /RestAdapter/header_content_type
2. New ICO for channel 1 (Rest to Rest)(sender url/RestAdapter/tau_header_content_type)
3. New ICO for channel 2 ( Rest to Rest)( /RestAdapter/header_content_type)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
22 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.