Skip to Content
Former Member
Mar 31, 2011 at 12:39 PM

How to transfer username when calling web service from PI?



I have a scenario where a front end application is calling a web service exposed by PI 7.11 and PI is forwarding the call to the backend web service. That is, a SOAP sender adapter and a soap receiver adapter.

Now, I would like to transfer the username, which the PI exposed web service is called with, to the backend web service.

I previously did this by using a UDF where I picked up the username like this and mapped the username to a field in the request message when calling the backend web service:

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

DynamicConfigurationKey key = DynamicConfigurationKey.create("", "SRemoteUser");

String WSuser = conf.get(key);

return WSuser;

However, I would like to avoid this method and in stead e.g. use either a query string like http://xxxxx:6571/ISBWS/soap/ISBCore?username=mikael or maybe transfer the username in the http header in some way.

So my question is: what are my options and how do I set it up?

BR MIkael