简体   繁体   English

使用服务参考的肥皂请求

[英]Soap request using service reference

I am trying to call an external soap request but i keep getting the error below: 我正在尝试调用外部肥皂请求,但我不断收到以下错误:

System.ServiceModel.FaultException: java.lang.NullPointerException System.ServiceModel.FaultException:java.lang.NullPointerException

I can't figure out what is lacking here, i have check the wsdl and didn't find any parameters that are mandatory. 我无法弄清楚这里缺少什么,我已经检查了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();
            }

I eventually contacted the soap provider and they figure out the account i was using to connect to the soap service was not working for some reason. 我最终联系了肥皂提供者,他们发现我用于连接肥皂服务的帐户由于某种原因无法正常工作。 The above code works perfectly with the new account. 上面的代码与新帐户完美配合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM