Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181985
Active Contributor

AddSOAPHeaderBean? thinking??, is it a custom adapter module?? Well, it is a standard SAP module but unfortunately no where documented :sad:

1. What is the use?


As the module name indicates, we can add our own custom soap headers for incoming and outgoing message in XI using this module

2. How to use in channel?

Simply add AF_Modules/AddSOAPHeaderBean in require channel as a local ejb type with a module key entry e.g., 0, ns, auth etc.. as per your requirement

3. What parameters it supports?

Mandatory Parameter: namespace as key and it's value e.g., namespace           http://customheader.com
Optional Parameters: any textual key, pair values. Each key will become a soap header tag with the maintained value in module configuration
The module key will be suffixed with static 'ns' string and will become namespace prefix for each  soap header that is required via this module

e.g., if modulekey is 0, key is hdr1, value is 1234 then below value will be added in SOAP Header

<SOAP:Header><ns0:hdr1 xmlns:ns0='http://customheader.com'>1234</ns0:hdr1></SOAP:Header>

4.Use cases

Case1: for modulekey is 0, namespace http://customheader.com and hdr1      1234

Result:

<SOAP:Header>
<ns0:hdr1 xmlns:ns0='http://customheader.com'>1234</ns0:hdr1>
</SOAP:Header>

Case2 (tricky one): for modulekey is 0, namespace      http://customheader.com and authenticationHdr      <UserName>Praveen Gujjeti</UserName><Password>exposedpasswordinID</Password>

Result:

<SOAP:Header>
<ns0:authenticationHdr xmlns:ns0='http://customheader.com'>
<UserName>Praveen Gujjeti</UserName>
<Password>exposedpasswordinID</Password>
</ns0:authenticationHdr>
</SOAP:Header>

Case3 (same as case2, but we can hide all header params in ID): for modulekey is 0, namespace http://customheader.com and pwd.authenticationHdr <UserName>Praveen Gujjeti</UserName><Password>passwordNotExposedinID</Password>

Result:

<SOAP:Header>
<ns0:authenticationHdr xmlns:ns0='http://customheader.com'>
<UserName>Praveen Gujjeti</UserName>
<Password>passwordNotExposedinID</Password>
</ns0:authenticationHdr>
</SOAP:Header>


5. What other alternative solutions are available to add custom SOAP headers?


Well, adding custom soap headers has been a frequent integration requirement in XI world since XI3.0. Java/XSLT mapping to create custom headers is one such option. And recently, this feature was also introuduced with AXIS HandlerBean module. Also this feature seems to be available with WS adapter with some limitations


References for Alternative solutions

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/18/axis-adapter-sender-comm-channel-...
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/06/05/soap-axis-receiver-communication-...

**Note: Though this module is a standard SAP one, but since it is not documented and released officially by SAP, developers should use this module at their own risk.

Regards,

Praveen Gujjeti

45 Comments
Labels in this area