Wait For(WSCallSoapURL(WSLinkSoap, cParams.ToString)) Complete (Result As String)
Public Sub WSCallSoapURL(URL As String, Parameters As String) As ResumableSub
Dim Result As String
Dim j As HttpJob
Try
j.Initialize("", Me)
j.PostString (URL, Parameters)
j.GetRequest.SetHeader("Content-Type","text/xml")
j.GetRequest.SetHeader("Content-length", Parameters.Length)
Wait For (j) JobDone(j As HttpJob) ' <-- Here is the error.
If j.Success Then
Result = j.GetString
Else
ToastMessageShow("¡Hummm...!",False)
End If
Catch
Log(LastException)
End Try
j.Release
Return Result
End Sub
I've posted this before. Only call it when you know an Activity is available - not in Activity_Create or Activity_Resume.Any idea what I should change to make it work on all devices?
That is odd, because the button must be visible on an instantiated activity for the user to press it. I wonder if Erel could comment on this.call is made from a button pressed by the user.
That's usually indicative of a timing/synchronization problem of some sort, but in this case I have no idea.And to top it off, on some it works sometimes, and sometimes it doesn't work either.
j.GetRequest.SetHeader("Content-Type","text/xml")
j.GetRequest.SetHeader("Content-length", Parameters.Length)
j.GetRequest.SetContentType("text/xml")
It has nothing to do with the uninitalized activity.Is that it?
I have tried it and the result is the same :/
Try to reproduce it in a small project.What information can I provide that will help in this case?
Wait For (j) JobDone(j As HttpJob)
Wait For (j) JobDone(j As HttpJob)
Dim Result As String
Wait For (j) JobDone(j As HttpJob)
Public Sub WSCallSoapURL(URL As String, Parameters As String) As ResumableSub
Dim Result As String
Dim j As HttpJob
Try
j.Initialize("", Me)
j.GetRequest.Timeout = 5000
j.PostString (URL, Parameters)
'
j.GetRequest.SetContentType("text/xml")
'
' j.GetRequest.SetHeader("Content-Type","text/xml")
' j.GetRequest.SetHeader("Content-length", Parameters.Length)
'
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Result = j.GetString
Else
Result = "Sin conexión"
End If
Catch
Log(LastException)
Result = "Sin conexión"
End Try
j.Release
Return Result
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?