Lokesh B

Lokesh B

  • NA
  • 1
  • 1.8k

MYSAPSSO2 cookie in ASP.Net to consume ABAP web service

Feb 18 2016 4:53 AM
 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.