I am trying to connect to a webservice using Classic ASP. I am using the method FindCompanies... but its giving following error, confused on how to sort it please help
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at App.Apis.v_1_5.CompanyApi.FindCompanies(ApiCredentials credentials, String conditions, String orderBy, Nullable`1 limit, Nullable`1 skip)
--- End of inner exception stack trace ---
</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
My ASP code is below
<%
msURL = "https://myconnectwise.net/v4_6_release/apis/1.5/CompanyApi.asmx"
'set up xmlhttp to checkout server
Dim oRequest
Set oRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
'setting this option will allow ServerXMLHTTP to ignore the certificate errors it encounters.
oRequest.setOption(2) = SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
' resolve, connect, send, receive - in milliseconds
oRequest.setTimeouts 10000, 10000, 10000, 10000
msSOAP = "<?xml version=""1.0"" encoding=""utf-8"" ?>"
msSOAP = msSOAP & "<s:Envelope xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">"
msSOAP = msSOAP & "<s:Body>"
msSOAP = msSOAP & "<FindCompanies xmlns=""http://connectwise.com/FindCompanies"">"
msSOAP = msSOAP & "<CompanyName>training</CompanyName>"
msSOAP = msSOAP & "<IntegrationLoginId>xxx</IntegrationLoginId>"
msSOAP = msSOAP & "<IntegratorPassword>xxx</IntegratorPassword>"
msSOAP = msSOAP & "<Conditions>CompanyName like ""Connect*"" and City = ""new jersey""</Conditions>"
msSOAP = msSOAP & " <orderBy>string</orderBy>"
msSOAP = msSOAP & " <limit>int</limit>"
msSOAP = msSOAP & " <skip>int</skip>"
msSOAP = msSOAP & "</FindCompanies>"
msSOAP = msSOAP & "</s:Body>"
msSOAP = msSOAP & "</s:Envelope>"
oRequest.Open "POST", msURL, False
oRequest.setRequestHeader "Content-Type", "text/xml"
oRequest.setRequestHeader "SOAPAction", "http://connectwise.com/FindCompanies"
oRequest.send msSOAP
Response.Write oRequest.responseText
%>