0
Answer

MYSAPSSO2 cookie in ASP.Net to consume ABAP web service

Ask a question
Lokesh B

Lokesh B

8y
637
1
 Hello,
 
 We need to call web service (ABAP-SAP) from ASP.Net without .Net connector. We have to use the existing MYSAPSSO2 cookie. 
We have  written the below code.
 
wsCompanyAttrGCQ.z_AK_AL_GET_COMPANY_ATTR_OP proxy = new wsCompanyAttrGCQ.z_AK_AL_GET_COMPANY_ATTR_OP();
wsCompanyAttrGCQ.ZAlGetCompanyAttrOp objCall = new wsCompanyAttrGCQ.ZAlGetCompanyAttrOp();
wsCompanyAttrGCQ.ZAlGetCompanyAttrOpResponse objResponse = new wsCompanyAttrGCQ.ZAlGetCompanyAttrOpResponse();
 
Cookie _cookie = new System.Net.Cookie();
_cookie.Value = this.Request.Cookies.Get("MYSAPSSO2").Value;
CookieContainer _cookiecontainer = new System.Net.CookieContainer();
_cookiecontainer.Add(_cookie);
proxy.CookieContainer = _cookiecontainer;
objResponse = proxy.ZAlGetCompanyAttrOp(objCall);
  
Please help by explaining what exactly needs to be written to use the existing MYSAPSSO2 cookie in ASP.Net.
Thanks in advance.