on 10-04-2005 1:22 PM
Hello everybody,
I have WAS 6.40 SP13 installed. I have NWDS sp12.
I have imported Car rental tutorial which includes Authentication and authorization code. This tutorial has implemented SSO also between Webdynpro and Web service using SAP logon ticket.
I deployed this application on my server. This application works properly with SSO.
Now, i have created one webdynpro application and created Web service model for the same web service used in above project. I have specified same HTTP destination in code as specified in above tutprial project.
But when i am running my webdynpro application it is giving me Unauthorized error. Means, SSO between Webdynpro and web service not completed.
What could be the problem behind this?
Regards,
Bhavik
Hi,
I need not to include SSO ticket explicitly. This thing will be done by HTTP Destination.
I have resolved this problem. I missed one reference to this HTTP destination. I have added and now its working fine.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think the problem is that ths SSO header is not added to security protocol when calling the web service. You can try this to add the ticket before calling the ws:
serviceImpl service = WebServiceModel.getServiceImpl();
yourServiceViDocument logicalPort = (yourServiceViDocument) service.getLogicalPort("Config1Port_Document" , yourServiceViDocument.class );
BaseGeneratedStub stubForLogicalPort = (BaseGeneratedStub) logicalPort ;
SecurityProtocol securityProtocol = (SecurityProtocol) stubForLogicalPort._getGlobalProtocols().getProtocol("SecurityProtocol");
securityProtocol.addHeader("Cookie","MYSAPSSO2="getSSOTicket()";");
private String getSSOTicket() {
IWDMessageManager msgMgr = wdThis.wdGetAPI().getComponent().getMessageManager();
try {
HttpServletRequest req = TaskBinder.getCurrentTask().getWebContextAdapter().getHttpServletRequest();
if (req != null)
return SSOSession.getSSOTicket(req);
else
return"";
} catch (Exception e) {
msgMgr.reportException(e.getLocalizedMessage(), true);
return "";
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.