Skip to Content

In this Blog I would like to explain how to provide the URL and Action values dynamically to the receiver SOAP communication channel.

Scenario: ABAP Proxy to SOAP Synchronous scenario.

Requirement: Get the currency conversion (exchange) rates by requesting one of the web services (Xignite), Here we have 3 types of scenarios are there

  1. Get the daily conversion rates
  2. Get the monthly average conversion rates
  3. Get the month end conversion rates

We are using one SOAP sender communication (XI as message protocol) channel for all the 3 types of scenarios. Initially we thought to create 3 separate SOAP receiver communication channels for 3 scenarios because the action and URL is different for all those 3 scenarios, Later tried to use single communication channel and provided the URL and action dynamically.

For every scenario, sender side we creates 2 data types for Request and Response and receiver side we are using WSDL methods.

Similarly we create Message types and Service interfaces

In request mapping we need to create one UDF to dynamically provide the URL and action parameters

/wp-content/uploads/2012/09/1_137900.jpg

Created simple type UDF (dynamicallyProvidingURLAndAction), this UDF takes 2 inputs, First one is for the URL and second one is for Action.

UDF is as follows

/wp-content/uploads/2012/09/2_137901.jpg

Code:

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

DynamicConfigurationKey key=DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/SOAP“, “TServerLocation”);

  1. conf.put(key, url);

key=DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/SOAP“, “THeaderSOAPACTION”);

  1. conf.put(key, action);

return “”;

This UDF output map to the root node of target structure

We provided below 2 values as input to the UDF

URL value is http://www.xignite.com/xCurrencies.asmx

Action value is http://www.xignite.com/services/GetRealTimeCrossRates

For other 2 scenarios in requesting mapping UDF, these 2 input values are different.

Configuration:

Business system/service, Sender communication channel and integrated configurations are normal.

Receiver CC

/wp-content/uploads/2012/09/3_137902.jpg

Target URL parameter is the mandatory field so we can give any value (at runtime it is replaced by the value which is provided in request mapping), and no need to give any value at action field because it is not a mandatory parameter. If any credentials required to login to web service then we can give those credentials by selecting checkbox of “Configure user Authentication”.

/wp-content/uploads/2012/09/4_137903.jpg

In advanced tab, we need to select the Use adapter specific message attributes and Variable transport binding check boxes then provide the values (these values we used in the Dynamic configuration UDF). At runtime TServerLocation parameter takes the URL value from dynamic UDF and THeaderSOAPACTION parameter takes the action value from dynamic UDF.

Scenario configuration is completed.

Testing

Scenario-1:

Input from Sproxy transaction of ECC system

/wp-content/uploads/2012/09/5_137904.jpg

Output

/wp-content/uploads/2012/09/6_137905.jpg

Scenario-2:

Input

/wp-content/uploads/2012/09/7_137906.jpg

Output

/wp-content/uploads/2012/09/8_137907.jpg

Scenario-3:

Input

/wp-content/uploads/2012/09/9_137908.jpg

Output

/wp-content/uploads/2012/09/10_137909.jpg

Conclusion:

              I believe this blog would provide better understanding of how to provide the URL and Action values to Receiver SOAP communication channel in order to create n-number of receiver communication channels for a same web-service.

References:

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/48/327519a3af58d8e10000000a421937/frameset.htm

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply