on 2012 Jan 24 10:02 PM
Hi All,
My scenario is ABAP Proxy to HTTP GET synchronous. I have configured my scenario an I am able to get my response in the ABAP Proxy. Now I need to add some parameters in the HTTP Url, I tried to add these parameters in the path field but I don't think it is appending it to the url because same search criteria when I run in Fiddler I get the desired records but not in SAP PI.
GET URL: https://test.abchost.com/api/invoices?created-at[gt_or_eq]=01-01-2012&exported=false
Configuration in ID:
TargetHost: test.abchost.com
TargetPort:443
Path: /api/invoices?created-at[gt_or_eq]=01-01-2012&exported=false
Can I pass these two parameters in the ASMA Url parameters ? Does Url Parameters accept boolean values( true/ false)
Thx in advance
Ravijeet
Request clarification before answering.
>Can I pass these two parameters in the ASMA Url parameters ? Does Url Parameters accept boolean values( true/ false)
There is no harm in passing query string as key value pairs. The value I believe might be only in string type not boolean.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhaskar,
When I use this URL in Fiddler I get say 10 records.
But when I use the same url in SAP PI I get 200 records. PI does not contain the filtered data:
It's like I am getting the result from : GET URL: https://test.abchost.com/api/invoices without the filtering criteria: ?created-atgt_or_eq=01-01-2012&exported=false
Thx in advance
Ravijeet
Hello,
It's like I am getting the result from : GET URL: https://test.abchost.com/api/invoices without the filtering criteria: ?created-atgt_or_eq=01-01-2012&exported=false
Can you try using this
%3Fcreated-atgt_or_eq%3D01-01-2012%26exported%3Dfalse
Maybe you just need to encode the URL escape characters in your URL
http://www.december.com/html/spec/esccodes.html
Hope this helps,
Mark
Hi Mark,
I tried with your suggestion but the target system threw a HTTP Bad Request
I tried https://test.abchost.com/api/invoices?exported=false, it doesn't work but if I try the date condition only it works
https://test.abchost.com/api/invoices?created-atgt_or_eq%3D01-01-2012
Whereas if I try the above condition in tools like Fiddler or Rest Desktop tools it works fine.
Also going forward if I don't want to harcode the value in the Communication channel path but use it in Dynamic Configuration in CC tick ASMA and then under apply URL parameters your entry should be like this:
Parameter1 exported
Parameter2 created-at
How do you put this condition created-at[gt_or_eq]=01-01-2012. The actual date and boolean value( true/ false) I will pass from source ABAP Proxy.
Do we have to ensure any code page or encoding format to achieve this ?
Also my target HTTP REST wenbservice has asked SAP PI to pass these values in HTTP Header which I am setting already, does the application/xml create any issues in sender URL?
X-TEST-API-KEY- 8827348ryueijefjri8r
ACCEPT - application/xml
Where can I see the actual HTTP GET url which gets constructed in the Receiver HTTP channel ?
Thx in advance
Ravijeet
Hello,
I tried https://test.abchost.com/api/invoices?exported=false, it doesn't work but if I try the date condition only it works
https://test.abchost.com/api/invoices?created-atgt_or_eq%3D01-01-2012
There is an option in the HTTP Receiver called Mask URL Escaping, were you able to check it?
Where can I see the actual HTTP GET url which gets constructed in the Receiver HTTP channel ?
Since you are using dynamic configuration, this should be available in sxi_monitor -> double-click the message -> soap header -> dynamic configuration
Hope this helps,
Mark
User | Count |
---|---|
76 | |
29 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.