UsernameToken userToken; userToken = new UsernameToken(PLCC_API_UserName, PLCC_API_Password, PasswordOption.SendPlainText); SoapContext requestContext = objDirectDebitService.RequestSoapContext; // Sets the TTL to one minute. requestContext.Security.Timestamp.TtlInSeconds = 60; // Adds the token to the SOAP header. requestContext.Security.Tokens.Add(userToken);
WebServicesClientProtocol
SoapHttpClientProtocol
WebServicesClientProtocol Class (Microsoft.Web.Services3) | Microsoft Learn[^] When you build an XML Web service client, whether you use Visual Studio or not, a proxy class is generated to communicate with the XML Web service. When you are using Visual Studio, that proxy class is generated when a Web reference is made or updated. If the .NET Framework SDK is used without Visual Studio, the proxy class is generated using the Web Services Description Language tool (Wsdl.exe). Either way, the proxy class derives from SoapHttpClientProtocol by default. To use the functionality of the WSE, change the class that the proxy class derives from to WebServicesClientProtocol.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)