cancel
Showing results for 
Search instead for 
Did you mean: 

how to transfer the webservice username/PW to the RFC call in PI 7.0

Former Member
0 Kudos

Hey,

I would like to transfer the username/PW, which is supplied, when a specific web service is called. The web service is supposed to be exposed on PI 7.0 and will transfer the request to a function module in ECC 6.0 via an RFC communication channel in PI 7.0. Typically, you specify the username/PW in the RFC comm. channel in PI, but how do I dynamically specify the received username/PW from the web service call in that RFC call to ECC 6.0? Maybe SAML is the answer, but it seems a bit cumbersome in my case.

BR

Mikael

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

if you don't want to use principal propagation you can try using the approach described in my blog:

https://weblogs.sdn.sap.com/cs/moderator/view/wlg/14454

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michael

Thanks for the reply. The link seems to be damaged however. Could you send the contents of the blog 14454 some other way?

Mikael

MichalKrawczyk
Active Contributor
0 Kudos

hi,

this is the proper link:

/people/michal.krawczyk2/blog/2009/05/26/pixi-pseudo-principal-propagation

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal

Thanks for the link. I have been looking for blogs/material on how, in a mapping in PI, to place the value of SRemoteUser in a field in the target message but without luck. Is it really the case, that I have to use batch input in order for it to work?

What is wrong with this code in a UDF where there is no input variable. Will it work?:

________

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

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

String WSuser = conf.put(key);

return WSuser;

-


Or should I skip this UDF all together and in stead use Variable Transport Binding and set XHeaderName1 = SRemoteUser ?

Looking forward to your book on iDocs in August

Mikael

Former Member
0 Kudos

one small correction. The code is:

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

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

String WSuser = conf.get(key);

return WSuser;

(get in stead of put)

Former Member
0 Kudos

Hi

Just to conclude this. I tested it and the webservice user was picked up nicely :-). So all you have to do is to tick the "Set Adapter-Specific Message Attributes" AND the "Variable Transport Binding" in your SOAP Sender comm. channel and create a UDF in your mapping which has no input variables and the following code:

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

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

String WSuser = conf.get(key);

return WSuser;

Thanks for the help, guys

Mikael

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mikael!

As far as I know principal propagation is supported in PI 7.1 but not in PI 7.0. Maybe it is supported in a higher SP-Level. Please check Support Pckage Notes.

Regards,

Volker