cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Custom Header in Receiver Channel

Former Member
0 Kudos

I am planning on an integration with Salesforce.com a Popular Hosted CRM solution, and am challenged by the SOAP Headers requirement. The Salesforce.com API requires you to pass on the SessionId, which was retrieved earlier using another SOAP call to the login URL, in every message as a SOAP Header.

How can I modify the SOAP Header structure to include the SessionId Dynamically, and the SOAP TargetURL.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

use dynamic configuration and set the soap header

ref: Define Adapter-Specific Message Attributes section in http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/8c4756224a6fb5e10000000a155369/frameset.htm

and also ref: /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Former Member
0 Kudos

Thanks.

I have looked at the Axis framework, and it needs components to be installed on the Server, I am working with the Basis team to get that installed, But I am running against a Tight Schedule, and practically am not seeing that as an immediate possibility. I will push more on installing that.

Are there any other ways to do the same thing.

Former Member
0 Kudos

The Axis Framework is available only from XI3.0 SP20 per Note: https://websmp230.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=1039369 . So looks like that is not a possibility.

Other options Please

Shabarish_Nair
Active Contributor
0 Kudos

no i am not talking about the axis framework - http://help.sap.com/saphelp_nwpi71/helpdata/EN/29/5bd93f130f9215e10000000a155106/content.htm

its the soap receiver adapter - adapter specific message attributes. you can dynamically program it to add custom headers

Former Member
0 Kudos

I dont think I have that option, Judging from the Screenshot... http://stashbox.org/654662/SOAP%20Adapter.JPG

Am I missing something here.

I forgot to mention, that I am on SAP XI3.0 NW04 SP15

Edited by: Shree on Oct 8, 2009 8:08 AM

Former Member
0 Kudos

Hey Shree,

Along with Adapter-Specific Message Attributes, you have to select Variable Header option in your receiver CC

and later on you have to write an UDF for populate the values in the header variables XHeaderName1 andXHeaderName2 with the targetURL.

Check out the below link for the sample UDF :

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

for your case, it ould be something like :

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

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

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

conf.put(key1, <ProvideYourTargetURL>);
conf.put(key2, <ProvieYourSessioonID>);

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417800)ID0696247750DB00857498295374117304End...

Pooja

Former Member
0 Kudos

Where can I see this option Variable Header. I seem to be missing it, or I might be on an old Service Pack. Can you send a screenshot for visualization Please.

0 Kudos

Hello, I don't rights to move this post but I suggest you post your question to the Business Objects [OnDemand|; forum

Thank you

Former Member
0 Kudos

That forum seems to concentrate on Crystal reports and Business Objects. But I am working in SAP XI Environment, Do you think, it would you think I would get a relevant answer in that Forum

Former Member
0 Kudos

In your CC Use Adapter-Specific Message Attributes and Variable Transport Binding options are already selected.

Just go ahead and write an UDF in your MM to populate values to XHeaderName1 and XHeaderName2.

Have a look at the following thread :

Pooja

Former Member
0 Kudos

I was able to get the SOAP URL Set Dynamically...

Only one more issue remaining,,, How to add additional Session Header Tags..

Former Member
0 Kudos

In general, you could pass three values dynamically for the Header into variables XHeaderName1, XHeaderName2 and XHeaderName3.

Have a look at the following document : http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b092777b-ee47-2a10-17b3-c5f59380957f&override...

Former Member
0 Kudos

But again, This is the Aixs framework and is valid for SP20 onwards... I am on SP15.

Answers (0)