on 03-27-2007 6:11 AM
Hi all,
Is there any way to capture the userid of the webservice caller ??
If we are calling a webservice in XI we should give the uid/pwd for XI.
We need to get this userid in message mapping.
Thanks in Advance,
Rgds
Chemmanz
Hi,
Plz see the below links
/people/sap.user72/blog/2004/11/30/user-mapping-based-single-sign-on
Dynamic configuration payload -
https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmm..
There is a concept of Access User List whereby you can restrict the users accessing the message. Is that what you want?
Also, the User Id is a part of the RunTime header and I dont think this can be accessed in the mapping.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi bhavesh,
In our case we need to process the webservice requests of different users in a different way. So we need to use their userids in mapping.
Just like we are accessing the file name from the sender file adapter, we need the
userid of the webservice caller from the Soap sender adapter.
rgds
Chemmanz
http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
this link provides the list of RunTimeParameters that can be accessed.And this does not contain the UserName.
Also, another interesting factor is that In the Receiver Determination --> Context Object 's you have the Context Object called<b> SRemoteuser</b> . Am not sure if it refers to the Triggering user but it is worth giving a try and checking if it refers to the User.
If it does then you can have multiple Inbound Receivers / Interfaces and then route it to the corresponding mapping program as you want.
Regards
Bhavesh
Dug deepers and found the solution
In Sender SOAP adapter, select options,
1. Select Adapter Specific Attributes
2. Variable Transport Binding
Now, use this code to read the user name,.
String SOAPurl="http:/"+"/sap.com/xi/XI/System/SOAP";
DynamicConfigurationKey keyURL = DynamicConfigurationKey.create(SOAPurl,"SRemoteUser");
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// get value
String user=conf.get(key);
Regards
Bhavesh
Hi,
Just change the above
String SOAPurl="http:/"+"/sap.com/xi/XI/System/SOAP";
DynamicConfigurationKey keyURL = DynamicConfigurationKey.create(SOAPurl,"user.name");
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// get value
String user=conf.get(key);
Regards
Chilla
Hi,
yes Bhavesh , if you want to use SRemoteUser then you my have to config in Sender SOAP Adapter.
See the below link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
But user.name can be accessed as runtime variable
Regards
Chilla
Hi,
Adapter-Specific Message Attributes
To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific Message Attributes indicator.
The following attributes are added to the XI message header if the sender makes them available, and if the Variable Transport Binding indicator is set.
Name
Technical Name
Remote User
SRemoteUser
Remote Host
SRemoteHost
To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
Name
Technical Name
Variabler Header
XHeaderName1
Variabler Header
XHeaderName2
Variabler Header
XHeaderName3
The names of the fields and parameters must correspond to the names of the fields and parameters that also go through the HTTP request.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/SOAP.
See my above link
and set it and try ..
Sure it will work either SRemoteUser : user.name
Regards
Chilla
Chemmanz,
Did the request hit the SOAP adapter? Or are you sending the SOAP request directly to the integration engine?
Your WSDL url should point to the Adapter Engine URL as shown in the How to use SOAP adapter document.
Also, in the corresponding Sender SOAP adapter did you select Adapter Specific Identifiers and variable transport binding?
Also, check in the SOAP header of your message in MONI in ther DynamicConfiguration are you able to see the UserName?
regards
Bhavesh
hi
As per the SOAP Sender sap doc
The following attributes are added to the XI message header if the sender makes them available, and if the Variable Transport Binding indicator is set.
Name Technical Name
Remote User SRemoteUser
Remote Host SRemoteHost
i am not getting the meaning of <b>'if the sender makes them available'</b>
do we have to set these and send along with the 'SOAP Request'. ??
even i tried by appending &SRemoteUser=xx&SRemoteHost to the SOAP connection endpoint URL in XML Spy.
If i check the 'Variable Transport Binding indicator', XI is not accepting the SOAP
request, it is throwing parsing error.
Any more clues.
Thanks in Advance
Regards,
Chemmanz
<b></b>
Hi Chemmanz
Did you get you scenario to work? I am have the same problem right now, need to extract user id form webservice requrest from MS Share Point to XI, user id is needed for authority check in R/3.
If you got this to work could you please share the configuration details?
Thanks in advance,
Margaret
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.