I am trying to call an external soap request but i keep getting the error below:

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.

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 Answers

0
Keshav Taurah On Best Solutions

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.