Esempio 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);
        }
Esempio 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);
 }
Esempio n. 3
0
 /// <remarks/>
 public void modifyCustAsync(CustBean bean) {
     this.modifyCustAsync(bean, null);
 }
Esempio n. 4
0
 /// <remarks/>
 public void addCustAsync(CustBean bean) {
     this.addCustAsync(bean, null);
 }
Esempio n. 5
0
 /// <remarks/>
 public void qryCustAsync(CustBean bean) {
     this.qryCustAsync(bean, null);
 }