Hi community,
this is my first try with Basic4ppc and I have an error which I can´t get rid of.
I use the SOAP-example from Erel (with nearly no modifiaction). In my old test IDE (version 6.8) it runs fine. Now I purchased the 6.9 to compile the program and finally use and the same source code doesn´t work anymore.
This is my sub:
Sub WriteVariableInteger (id, value)
ErrorLabel(error2)
Request.New1(URL) 'Build the request.
obj.New1(False)
obj.FromLibrary("Main.Request","req",B4PObject(2))
obj.Value = obj.GetProperty("Headers")
SoapAction = "urn:UIPSTypes-IIPSVariableManager#WriteVariableInteger"
obj.RunMethod3("Add","SoapAction","System.String",Chr(34) _
& SoapAction & Chr(34),"System.String") 'Set the SOAPAction header
Request.Method = "POST"
Request.ContentType = "text/xml"
newWrite = StrReplace(newwrite,"$$1",id) 'Replace the two parameters.
newWrite = StrReplace(newWrite,"$$2",value)
buffer() = bit.StringToBytes(newWrite,0,StrLength(newWrite))
Request.ContentLength = ArrayLen(buffer())
bin.New1(Request.GetStream,True)
bin.WriteBytes(buffer())
Request.TimeOut = 30000 '30 seconds
Response.New1
Response.Value = Request.GetResponse 'Call the server
result = Response.GetString 'Get the string from the response stream.
Response.Close
Return result
error2:
Msgbox("Communication error.")
Return 0
End Sub
Any idea?
Thanks in advance
Boris
this is my first try with Basic4ppc and I have an error which I can´t get rid of.
I use the SOAP-example from Erel (with nearly no modifiaction). In my old test IDE (version 6.8) it runs fine. Now I purchased the 6.9 to compile the program and finally use and the same source code doesn´t work anymore.
This is my sub:
Sub WriteVariableInteger (id, value)
ErrorLabel(error2)
Request.New1(URL) 'Build the request.
obj.New1(False)
obj.FromLibrary("Main.Request","req",B4PObject(2))
obj.Value = obj.GetProperty("Headers")
SoapAction = "urn:UIPSTypes-IIPSVariableManager#WriteVariableInteger"
obj.RunMethod3("Add","SoapAction","System.String",Chr(34) _
& SoapAction & Chr(34),"System.String") 'Set the SOAPAction header
Request.Method = "POST"
Request.ContentType = "text/xml"
newWrite = StrReplace(newwrite,"$$1",id) 'Replace the two parameters.
newWrite = StrReplace(newWrite,"$$2",value)
buffer() = bit.StringToBytes(newWrite,0,StrLength(newWrite))
Request.ContentLength = ArrayLen(buffer())
bin.New1(Request.GetStream,True)
bin.WriteBytes(buffer())
Request.TimeOut = 30000 '30 seconds
Response.New1
Response.Value = Request.GetResponse 'Call the server
result = Response.GetString 'Get the string from the response stream.
Response.Close
Return result
error2:
Msgbox("Communication error.")
Return 0
End Sub
Any idea?
Thanks in advance
Boris