on 2018 Apr 02 2:31 PM
Hi Experts,
I would like to construct URL and what ever values in the URL need to be read and mapped in the mapping with dynamic configuration. I am using REST sender adapter with HTTP operation 'GET' . in the rest resource I have maintained in the Dynamic attributes
what variable will be selected for URL ?
in value source is it Get variable or URL pattern Element? based on the above how can we create URL?
http://XXXXXX.com:50000/RESTAdapter/appointmentAndAdvisement/ { }
Do we need to write URL pattern with variables in the below ?
/{operation}/businessID/{businessID}/installation/{instalation}
How many types can we generate URLs?
Thanks
Praveen
Hi,
Set all custom attributes while transforming the message using UDF.
Regards.
Anoop Rai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Anoop. I would like to understand the difference between value source " Get Variable" & URL Pattern element . How can we use both of them in the mapping ? I understood , how to use Get Variable in the udf getting the value from the URL to map values in the message mapping but where as URL Pattern element , how to use it in URL and udf? Could you please provide an example to use both of them in the dynamic URL and also populate those value in to message mapping ?
Thank you
Praveen
Hi,
URL Pattern Element : In simple words, its path param. And you need to put it as path of URL
GET Variable : Its a query param.You need to put it in URL like : ?<variable_name>=Value
Ex:-
URL : /RESTAdapter/pi/resttest/ItemData/ITD001?filterValue=52
Here, ITD001 : Its a path param
and filterValue=52 : Its a query param
Using GET Variable we can access query param values.
Regards,
Anoop Rai
Hi,
You can access both using UDF as both attributes set in dynamic configuration with namespace = "http://sap.com/xi/XI/System/REST".
For URL : /RESTAdapter/pi/resttest/ItemData/ITD001?filterValue=52
In Dynamic configuration:-
Record name="id" -- value "ITD001"
Record name="filterValue" -- value "52"
Use it first and let us know, whats your actual problem. For tutorial please read SAP Documents for REST Adapter:-
Regards,
Anoop Rai
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.