在asp.net中调用soap服务时,命名空间URI不能为null

时间:2018-07-03 08:07:41

标签: c# asp.net soap namespaces wsdl

在asp.net服务器中请求肥皂服务时,使用命名空间URI响应可能不是null错误。请检查以下代码以供参考。

 ExternalTransferInRequest requestbody = new ExternalTransferInRequest();
    requestbody.referenceTxnId = 123456789101112131;
    requestbody.userName = "5F4aS7QIfS32A4qlCP0BlaEX4qi+lV0p";
    requestbody.password = "1kZ+ZKKNe6zRqot9Qels1g==";
    requestbody.deviceType = 9;
    requestbody.amount = "5000";
    requestbody.mobileAccountNumber = "33319015910";
    requestbody.bankName = "00–Ubank";
    requestbody.bankAccountNumber = "051000207960141";
    ExternalTransferInRequest1 request = new ExternalTransferInRequest1();
    ExternalTransferInResponse resposebody = new ExternalTransferInResponse();
    ExternalTransferInResponse1 response = new ExternalTransferInResponse1();
    //Customer_PortClient proxy = new Customer_PortClient();
    ThirdPartyServicesMiddleWareSoapPortClient c = new ThirdPartyServicesMiddleWareSoapPortClient();
    ThirdPartyServicesMiddleWareSoapPort ts = c;


    c.ClientCredentials.UserName.UserName = "*********rvices_pibas";
    c.ClientCredentials.UserName.Password = "**********";

    request.ExternalTransferInRequest = requestbody;

    response = ts.ExternalTransferIn(request);
    resposebody = response.ExternalTransferInResponse;

0 个答案:

没有答案