使用服务参考的肥皂请求

时间:2019-04-02 08:50:38

标签: c# asp.net soap

我正在尝试调用外部肥皂请求,但我不断收到以下错误:

System.ServiceModel.FaultException:java.lang.NullPointerException

我不知道这里缺少什么,我已经检查了wsdl并没有找到任何必需的参数。

SoapService.queryWebServiceSoapPortClient client = new SoapService.queryWebServiceSoapPortClient();
            client.ClientCredentials.UserName.UserName = "";
            client.ClientCredentials.UserName.Password = "";




            SoapService.qwsInput query1 = new SoapService.qwsInput();
            SoapService.queryResponse response = new SoapService.queryResponse();





            query1.pass = Password;
            query1.queryId = queryId;
            query1.qwsInputParams = "something";

            query a = new query();
            a.queryInput = query1;
            try
            {
                response = client.query(a);
            }
            catch (Exception error) {


                var b = error.ToString();
            }

1 个答案:

答案 0 :(得分:0)

我最终联系了肥皂供应商,他们发现我用于连接肥皂服务的帐户由于某种原因无法正常工作。上面的代码与新帐户完美配合。