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 Member

Hello,

this is just a short summary on how to use dynamic username and password with soap adapter.

Generally the feature is documented in sap help, see https://help.sap.com/saphelp_nw73/helpdata/en/48/327519a3af58d8e10000000a421937/frameset.htm under "Define Adapter-Specific Message Properties" and "Enter and Display Authentication Keys".


You basically use the feature of dynamic header attributes. So first of all you have to set these attributes. You can do so for example with a user defined function in your mapping:



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


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


  conf.put (key, "SAP_PI_APPL_USER");




This means you are setting the dynamic attribute TAuthKey. The value will be the actual username that shall be used in communication. The same way you can also set all the other attributes like url, proxy user, proxy as documented in the help.

The password however is not set as header attribute (for security reasons) but must be configured explicitly in the integration directory. Check "Use Adapter-Specific Message Attributes", "Variable Transport Binding" and "View Authorization Keys". Enter username/password pairs. Note that the key will be the username (SAP_PI_APPL_USER in our example). :

The unfortunate thing is that you can enter only up to ten different users. I really have no idea why SAP put that restriction on the feature. It would be so easy to provide a table entry here. Anyway I found that the documentation was insufficient on the matter and I hope this may be helpful.

3 Comments
Labels in this area