01-24-2007 8:42 AM
Hi Gurus,
I'm using a secured webservice in my webdynpro application. I'd also assigned
role to this webservice. My Portal is connected to LDAP, so when I call this
webservice through Webservice Navigator, it prompts me for username and
password, after supplying same it authenticate the user against LDAP.This is
working fine.
Now when I'call this webservice through my webdynpro application, it requires
username and password. I write follwing code:
Request_VI_RFP_CountriesDocument_displayCountries display = new
Request_VI_RFP_CountriesDocument_displayCountries();
wdContext.nodeRequest_VI_RFP_CountriesDocument_displayCountries().bind(display)
;
display._setUser("User");
display._setPassword("Password");
try {
wdContext.nodeRequest_VI_RFP_CountriesDocument_displayCountries().currentReques
t_VI_RFP_CountriesDocument_displayCountriesElement().modelObject().execute();
} catch (Exception e) {
e.printStackTrace();
}
It also works fine. Now my question is there any other method to call this
webservice without setting password in code( as one can easilly find it out)?
As this application is ultimately deployed on Portal, i have to follow Single
Sign On concept.
Plz help me out.
Thanks & Regards
Abhinav Sharma
01-24-2007 9:37 AM
Sounds like SAML would be the solution.
Can you provide some information on your Portal version (where the WebDynpro application is deployed which is submitting the WebService call)? Which system component is the WebService provider? Is it a NetWeaver Java or NetWeaver ABAP system? Which version?
Regards, Wolfgang
01-24-2007 9:37 AM
Sounds like SAML would be the solution.
Can you provide some information on your Portal version (where the WebDynpro application is deployed which is submitting the WebService call)? Which system component is the WebService provider? Is it a NetWeaver Java or NetWeaver ABAP system? Which version?
Regards, Wolfgang
01-24-2007 10:36 AM
Hi Wolfgang
I'm using NWDS version 2.0.13 and Portal version SP13. It is Netweaver Java Stack..
What is SAML?
Regards, Abhinav
01-24-2007 1:19 PM
Hi Abhinav,
no SAML won't help you.
Please have a look at the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/4bf969fb2a48908224679e83e9d805/frameset.htm">destination service</a>. You can use it to authenticate to the backend system and also make use of the SSO infrastructure. in addition, the credentials can be maintained after deployment.
BTW: if this is an OASIS (stnadard) webservice, you should also be able to use the WS proxies and infrastructure to do the same for you.
Kind regards,
Patrick
01-24-2007 1:40 PM
Hi,
With NW04 SP10 and later, the Web Dynpro Web Service model supports HTTP destinations. So you can create an HTTP destination in the Visual Administrator tool, and in you coding you must specify the name of the HTTP destination service. To use SSO, configure the destination to authentication method "Logon Ticket".
Request_QuickCarRentalServiceViDocument_saveBooking modObj =
wdContext.currentSaveBookingElement().modelObject();
modObj._setHTTPDestinationName("CarRental");
modObj.execute();
Please refer to the tutorial at
http://help.sap.com/saphelp_erp2005vp/helpdata/en/e9/9a204142d6b167e10000000a155106/frameset.htm
When following the tutorial, please ensure you have a classloader reference from your WD application to service "tc/sec/wssec/service". This is done in the project properties of your WD application in the IDE.
Regards,
Martijn de Boer
Message was edited by:
Martijn de Boer
01-25-2007 3:19 AM
Thanks Patrick and Martjin,
Let me check this first. I'll get back to you if it works.
Thanks again for your response.
Regards, Abhinav