locked
Webservice RequestSoapContext does not exists. RRS feed

  • Question

  • hi

    I am using WSE 3.0 .dll 

    Please help...

    X509SecurityToken signatureToken = GetSecurityToken();
    CBSVService.CBSVServices objser = new CBSVService.CBSVServices();
    SoapContext requestContext = RequestSoapContext.Current;
    requestContext= objser.RequestSoapContext;
    requestContext.Security.Tokens.Add(signatureToken);
    MessageSignature sig = new MessageSignature(signatureToken);
    requestContext.Security.Elements.Add(sig);
    requestContext.Security.Timestamp.TtlInSeconds = 120;
    CBSVService.ActionResponse acp = objser.ping();

    I am getting error in Request Soap Context.

    Thursday, August 29, 2013 6:59 PM

Answers

  • Solution :

    in Refernce.cs file 

    changed instead of System.Web.Services.Protocols.SoapHttpClientProtocol to 

    Microsoft.Web.Services3.WebServicesClientProtocol

    Now i am able to get proxyClass.RequestSoapContext

    • Marked as answer by somasekaranmc Tuesday, September 3, 2013 4:08 PM
    Tuesday, September 3, 2013 4:08 PM

All replies

  • Hi somasekaranmc,

    What's the error message then? please describe your problem in detail so we can help you.

    I suggest that you set a break point in your project, and debug your project step by step. Post the exception message and stack trace here.


    Caillen
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, August 30, 2013 9:27 AM
  • Hi Caillen Zhong,

    i am not able to initialize RequestSoapContext from proxy class

    as requestContext= objser.RequestSoapContext

    I am getting error as "does not contain a definition for RequestSoapContext"

    Thanks

    Monday, September 2, 2013 3:54 AM
  • Solution :

    in Refernce.cs file 

    changed instead of System.Web.Services.Protocols.SoapHttpClientProtocol to 

    Microsoft.Web.Services3.WebServicesClientProtocol

    Now i am able to get proxyClass.RequestSoapContext

    • Marked as answer by somasekaranmc Tuesday, September 3, 2013 4:08 PM
    Tuesday, September 3, 2013 4:08 PM