on 2005 Oct 04 5:25 AM
Hi,
I wanted to get the cookie MYSAPSSO2 through web dynpro. How will i get it?
Hi Sujesh,
Try with following code:
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 "";
}
}
For this you need to add servlet.jar file in classpath.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.