cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic URL creation

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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;

Former Member
0 Kudos

Hi Gaurav,

Thanks for that.. This will work with normal SOAP adapter i guess.. but we are using HTTP (AXIS) Transport protocol.

In this we do not have the Adapter-Specific Message Attributes option.

Is there any other workaround?

Thanks

Souvik

former_member200962
Active Contributor
0 Kudos

For Axis adapter you need to perform additional configurations in your receiver channel:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b092777b-ee47-2a10-17b3-c5f593809...

A similar thread (can refer for the channel settings required):

Former Member
0 Kudos

Closing thread..

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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