Replacement for RequestSoapContext.Security.Tokens.Add(Mytoken) RRS feed

  • Question

  • Hi Team,

    I am consuming java web service in my app, to which i need to send credentials through soap header. I extended the generated proxy class from Microsoft.Web.Services3.WebServicesClientProtocol and using below code to set the security token RequestSoapContext.Security.Tokens.Add(Mytoken).

    looks like now Microsoft.Web.Services3.dll is out dated..and i am supposed to rewrite the above code that sets the security token in soap header.

    Can you please help me on next steps here..

    one way i came around is to use wcf to generate client proxy, after this step i am not sure how to set the token in the soap header, because this generated proxy class is extending from System.Web.Services.Protocols.SoapHttpClientProtocol, which wont provide any methods to include security token..

    any help in this regard is appreciated..

    Thank you..

    Wednesday, May 22, 2013 8:54 PM


  • Hi, 

    If the service obeys WS-* protocols and the proxy can be generated, then if you specify the credentials and header at client side, it will generate header for you which includes security information.

    Tuesday, May 28, 2013 2:59 AM