问题描述
usingMicrosoft.Web.Services3;usingMicrosoft.Web.Services3.Design;usingMicrosoft.Web.Services3.Security;usingMicrosoft.Web.Services3.Security.Tokens;namespaceTpIntegration{publicclassTpPolicy:Policy{publicTpPolicy(){Assertions.Add(newUsernameOverTransportAssertion());}publicstaticUsernameTokenGetUsernameToken(stringusername,stringpassword,PasswordOptionpasswordOption){UsernameTokentoken=newUsernameToken(username,password,passwordOption);ISecurityTokenManagersecurityTokenManager=SecurityTokenManager.GetSecurityTokenManagerByTokenType(WSTrust.TokenTypes.UsernameToken);securityTokenManager.CacheSecurityToken(token);returntoken;}publicstaticvoidApplyAutheticationTicket(WebServicesClientProtocolprotocol,stringuserName,stringpassword){UsernameTokentoken=GetUsernameToken(userName,password,PasswordOption.SendPlainText);protocol.SetClientCredential(token);protocol.SetPolicy(newTpPolicy());}}}这是C#的代码在C++里怎么写呢谢谢