Struggling with Basic SOAP Access

MattLuckham

Member
Licensed User
Longtime User
Sorry guys, but I really need help here. I have a very simple VB.Net Web Service which I can see from my Android Device (go to the browser and navigate to the asmx file). When I have tried to code it and I am getting nowhere. Always providing an error of Internal Server Error. Here is my code: -

<Code>
Sub Button1_Click

Dim test As HttpJob

Dim requestSoapXML As String
test.Initialize("Job1",Me)
requestSoapXML = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><GetClientName2 xmlns='http://tempuri.org/' /></soap:Body></soap:Envelope>"
test.PostString("http://10.0.1.9/CareControl/Service1.asmx/GetClientName2",requestSoapXML)
' Log(test.Success)
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
Log(Job.GetString)
Job.Release
End Sub
<Code>
 

MattLuckham

Member
Licensed User
Longtime User
That was a great help - thank you! So, now I have my service working and I am getting a response. So I call the following code: -

Sub JobDone (Job As HttpJob)

If Job.Success Then
'Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
Log(Job.GetString)
File.WriteString(File.DirRootExternal, "1.xml", Job.GetString)
ResultString = ""
sax.Parse(Job.GetInputStream, "sax")
Job.Release
End If
End Sub

Every time it calls the Job.GetInputStream I get a java.lang.NullPointerException

When I view the XML returned (through GetString) it looks fine. Do you know why I would be getting this error?
 
Upvote 0
Top