on 05-23-2006 9:50 AM
Hi,
My question is about the web dynpro authentication via logon ticket.
I have a WD application which has its sap.authentication set to true. My application calls some BAPIs with RFC connection, using a generic user no-dialog via JCO.
<b>How can I specify to my connection, that the user who wants execute such a BAPI is not the generic one but a specific user with specific permissions (the user of my logon ticket)?</b>
I have found out a tutorial which is about the logon ticket for WebServices application : <a href="http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/content.htm</a>
but it doesn't fit my request. Actually, my model is a RFC model, so I can't have access to the methodes
myModel._setHTTPDestinationName(<namedest>)
Thanks
berthe,
Run WebDynpro Content Administrator (http://host:port/webdynpro/dispatcher/sap.com/tcwdtools/Explorer), select necessary JCo destination in "Maintain JCo Destinations" section and, edit it and at step "Security" set "Used Method" to "Ticket". All the rest will be handled by Adaptive RFC / JCo.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
berthe,
If you setup SSO between WebAS and R/3 correctly, then all magic happens automatically. Otherwise (invalid SSO setup) you will see errors about ticket verification.
Footnote: ticket authentication is recomended for <b>data</b> destination, <b>meta</b> destination typically uses predefinded user.
VS
berthe,
Just read the following:
I have a WD application which has its sap.authentication set to true. My application calls some BAPIs with RFC connection, using a generic user no-dialog <b>via JCO</b>.
If you are not using Adaptive RFC Model but rather plain JCo, then in addition to my previous words obtain connection in a way suggested by Satyajit Chakraborty:
JCO.Client client = null;
try
{
final IWDJCOClientConnection conn
= WDSystemLandscape.getJCOClientConnection("NAME_USED_IN_WD_CONTENT_ADMINISTRATOR");
client = conn.getClient();
}
catch(final WDSystemLandscapeException e)
{
/* error handling */
}
Again, here SSO ticket will be applied automatically.
VS
Hi Berthe,
What I don't understand is, why do you need to change the user specifics while executing the BAPI? Since you have sap.authentication set to true, you can login using the user that has SSO set up and the JCo destination for modeldata will be take care of the SSO.
Anyways, you can use this code to change the JCo destination before executing your BAPI/RFC.
Let your model be named "YourModel". And let the JCo connection which has SSO set up be named "WD_MODELDATA_DEST_XYZ".
YourModel modelObject = (YourModel)WDModelFactory.getModelInstance(YourModel.class);
try{
IWDJCOClientConnection con = WDSystemLandscape.getJCOClientConnection("WD_MODELDATA_DEST_XYZ");
modelObject.setJcoClient(con.getClient());
}
catch(WDSystemLandscapeException e){
}
Still I would like to know why you want to do this.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why ? There is my scenario :
I have an web application which able to create, modify and view order. I have also users with different privileges such as a user which able to read only orders...
So my JCO connection uses a generic user (in my web dynpo content administration), then it has all access to my BAPIS. Therefore, I need to manage my web application behavior according to my user privileges (which is connected).
Am I clear ?
By the way, thanks for your answer
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.