cancel
Showing results for 
Search instead for 
Did you mean: 

Single SOAP receiver adapter for multiple interfaces

Former Member
0 Kudos

Hi,

I have to send multiple interfaces like Vendor, Customer, Material to one receiver.

I want to configure only one communication channel (receiver SOAP adapter) to send all these interfaces. Is this possible?

Currently I am provided with different URLs from the receiver system as below.

http://host:port/Services/Vendor.wsdl

http://host:port/Services/customer.wsdl

http://host:port/ServicesMaterial.wsdl

I will be having 3 Sender agreement, 3 receiver determination, 3 interface determination and 3 Receiver agreement.

I want only one SOAP reciever adapter which goes inside all the above 3 Receiver agreement.

So When I give the target url as http://host:port/Services, the messages fail.

But When I specify the full targert url in the adapter as http://host:port/Services/Vendor.wsdl then it works.

Which means I would have to create as many communication channel as interfaces.

Is there a work around for this?

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can use dynamic configuration for your requirement.. To do this use the code below as udf in your message mapping:


//Get the dynamic configuration from the container
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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,varURL);

//return the data for mapping to the output
return varURL;

And then in Integration Directory, make sure that the Adapter Specific Attributes and Variable Binding are ticked.

Hope this helps,

Mark

Edited by: Mark Dihiansan on Oct 4, 2011 5:47 AM

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

>

> But When I specify the full targert url in the adapter as http://host:port/Services/Vendor.wsdl then it works.

I guess that the scenario does not work, but just does not throw an error.

Figure out, which URL you really need. The above mentioned URL seem not correct to me.

GabrielSagaya
Active Contributor
0 Kudos

This blog will help you!!

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>I want only one SOAP reciever adapter which goes inside all the above 3 Receiver agreement.

Use Dynamic configuration to handle multiple target URL dynamically in a single comm channel at runtime. Previous replies already provided code .

Former Member
0 Kudos

hi kantheri,

For this, we have to fill the TargetURL and the SOAPAction in Receiver Communication channel dynamically.

So, we need to write UDF in Message Mappings using DynamicConfiguration to fill the TargetURL and the SOAPAction Dynamically.

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

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

// access dynamic configuration

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

conf.put(keyURL,"Soap action");

conf.put(targetURL,"target url");

return "";

In this UDF, we are filling the TargetURL in u201CTServerLocationu201D message attribute and SOAPAction in u201CTHeaderSOAPActionu201D message attribute.

So, whenever we execute this corresponding operation these values will be filled in receiver communication channel at runtime.

TargetURL- Give some dummy URL or http://

SOAPAction - *

regards,

ganesh.