cancel
Showing results for 
Search instead for 
Did you mean: 

Configure Communication channel URL Dynamically

Former Member
0 Kudos

Hi,

I need to Configure the SOAP Adapter Communication channel URL dynamically.

My requirement is like this, I have to send the Login request details to the Salesforce webservice after that I will get the response, that response has the ServerUrl, I have to map that URL to the Target URL in CC

I created UDF for that, Here is the code:

"DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey parmValue=DynamicConfigurationKey.create("http:""/""/sap.com/xi/XI/System/SOAP", "TServerLocation");

conf.put(parmValue, SessionUrl);"

Note: In the above code "SessionUrl" is the servreurl.

but this not working.

Please help me in this(don't send any links)

Regards,

Yuga

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I just completed a receiver SOAP scenario:

This is the udf i used

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

String temp = "http:/sap.com/xi/XI/System/SOAP";

DynamicConfigurationKey key = DynamicConfigurationKey.create(temp, "TServerLocation");

String varURL = serverURL

conf.put(key,varURL)

*As Amit said Check if ASMA and variable transport binding are checked in the adapter.

*see Dynamic Configuration in SXMB_MONI

*If u have uid pwd send it like "http:/"+"/uid:pwd@servername:50000/XISOAPAdapter/........

*If you encounter a invalid content type error check Donot use SOAP envelope and pass &nosoap=true

*use the url and post from a SOAP client

*If you get a mapping exception try to check what is the exact reason for the exception in the Trace

Shakthi

Former Member
0 Kudos

Hi,

1. I was not able to see the dynamic configuration in the SXMB_MONI.

2. I'm getting error like this "com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request" in Moni.

Yuga

Former Member
0 Kudos

Hi,

You can set the URL in the adapter specific attributes, but you can only set the whole URL and not parts of it.

The decription is here:

http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm

check this blog too..

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Thanks,

Vijaya.

Former Member
0 Kudos

Hi Vijaya,

My requirement is also to change the Whole URL only (put function replaces the TargetURL with the new value).

I have already gone thorugh those links

Yuga

Former Member
0 Kudos

Hi,

Your code looks to be fine.It should work. Have you checked the flag "Use Adapter-Specific Message Attributes" under Adapter-Specific Message Attributes.

If not please set it and try. You should be able to see the DynamicConfiguration parameter at runtime in your message monitoring(sxmb_moni) under your message header

Thanks

Amit

Reward points if answer is helpful