zoukankan      html  css  js  c++  java
  • wse 3.0

                    PremiumServicesPayList psList = new PremiumServicesPayList();
    
                    UsernameToken token = new UsernameToken(ServiceUser, ServiceKey, PasswordOption.SendHashed);
                    // Set the token onto the proxy
                    psList.SetClientCredential(token);
                    // Set the ClientPolicy onto the proxy
                    psList.SetPolicy("ClientPolicy");
                    //
                    psList.DeleteByOrderID(strOrder);
    

     修改Reference.cs里的System.Web.Services.Protocols.SoapHttpClientProtocol 为 Microsoft.Web.Services3.WebServicesClientProtocol

    PremiumServicesPayList :
            [WebMethod]
            public string Test(string strName)
            {
                if (RequestSoapContext.Current != null && RequestSoapContext.Current.IdentityToken.Identity.Name == ServiceUser)
                {
                    return "Hello " + strName;
                }
                else
                    return "nonono";
            }
    

  • 相关阅读:
    Day 69
    Day 68
    Day 67
    Day 66
    Day 65
    Day 64
    Day 63
    Day 62
    Day 61
    Day 60
  • 原文地址:https://www.cnblogs.com/myx/p/1829038.html
Copyright © 2011-2022 走看看