Exemplo n.º 1
0
        protected void btnTest_Click(object sender, EventArgs e)
        {
            //不对服务端证书进行有效性校验(非第三方权威机构颁发的证书,如自己生成的)。
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);

            WS.upcardHttpsService service = new WS.upcardHttpsService();
            //设置调用WebService时使用的证书
            X509Certificate certificate = X509Certificate.CreateFromCertFile(Path.GetFullPath(@"../../") + @"Resources\cerfile.cer");
            service.ClientCertificates.Add(certificate);

            WS.CustBean custBean = new WS.CustBean();
            custBean.cardNo = "123456789";
            //...
            //给其他的属性都赋上值。
            WS.CustData custData = service.addCust(custBean);
        }
Exemplo n.º 2
0
 /// <remarks/>
 public void addCustAsync(CustBean bean, object userState) {
     if ((this.addCustOperationCompleted == null)) {
         this.addCustOperationCompleted = new System.Threading.SendOrPostCallback(this.OnaddCustOperationCompleted);
     }
     this.InvokeAsync("addCust", new object[] {
                 bean}, this.addCustOperationCompleted, userState);
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void modifyCustAsync(CustBean bean) {
     this.modifyCustAsync(bean, null);
 }
Exemplo n.º 4
0
 /// <remarks/>
 public void addCustAsync(CustBean bean) {
     this.addCustAsync(bean, null);
 }
Exemplo n.º 5
0
 /// <remarks/>
 public void qryCustAsync(CustBean bean) {
     this.qryCustAsync(bean, null);
 }