on 08-29-2011 11:00 AM
Hi Experts,
I have a scenario where I need to call a particular URL via SOAP adapter.
Now the URL is not constant. A part of the URL should be dynamically selected based on the payload value.
For ex:
https://collab.test.com/<name>/<agency>/groups.asmx
Here, based on incoming payload data i need to populate the <name> and <agency> field in the communication channel.
Do I need to write any UDF for Dynamic Configuration. If yes can you please guide in this regard.
Thanks,
Souvik
Hi Souvik,
Yes you need to write a UDF for setting this in the Dynamic Configuration. Please take a look at the below link of how you can use ASMA properties (point 6) to do the same:
http://help.sap.com/saphelp_nwpi711/helpdata/en/48/327519a3af58d8e10000000a421937/content.htm
Also take a look at this link:
http://wiki.sdn.sap.com/wiki/display/profile/2007/06/22/SOAPAdapterdynamicURLconfiguration
Here is the Sample code for it:
//Get the dynamic configuration from the container
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
String url = "Your desired URL"; // the desired URL
//Create the TServerLocation key in namespace http://sap.com/xi/XI/System/SOAP. This key will hold the dynamically created URL
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");
//Put the url value from the input in the configuration under the specified key
conf.put(key, url);
//return the data for mapping to the output
return data;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the receiver determination XPATH Expression (or enhanced Receiver determination http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm) to formulate a condition for deciding receivers.
For xpath expression:
http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is a web service call.. Based on the payload I need to dynamically configure the URL and call the respective URL...
Configuring the rec det. will not allow me to point to a URL based on the payload..
There can be n number of URLs which i need to point to.. The pointing should be based on the incoming data.
thanks
Souvik
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.