The following code gives RunTime error.
Try
lr_consulta = Create remito_consultarRemitosReturnType
lr_consulta = lr_proxy.consultarRemitosEmisor(lr_auth, lr_fechas, li_pto_emision, 995, False, ls_estado, 0, False)
If Not IsNull(lr_consulta.arrayErrores) Then
lr_errores = lr_consulta.arrayErrores
For li_iter = 1 To UpperBound(lr_errores)
MessageBox("Error al consultar remitos", "Error " + String(lr_errores[li_iter].codigo) + ": " + lr_errores[li_iter].descripcion, StopSign!)
Next
End If
Catch(SoapException e1)
MessageBox("Error SOAP", "Error SOAP -> " + e1.Text, StopSign!)
st_working.Visible = False
Return
Catch(PBXRuntimeError e2)
MessageBox("Error PBX Runtime", e2.Text, StopSign!)
st_working.Visible = False
Return
Catch(RuntimeError e3)
MessageBox("Error Runtime", e3.Text, StopSign!)
st_working.Visible = False
Return
End Try
While the following code just hangs forever.
Try
lr_consulta = lr_proxy.consultarRemitosEmisor(lr_auth, lr_fechas, li_pto_emision, 995, False, ls_estado, 0, False)
If Not IsNull(lr_consulta.arrayErrores) Then
lr_errores = lr_consulta.arrayErrores
For li_iter = 1 To UpperBound(lr_errores)
MessageBox("Error al consultar remitos", "Error " + String(lr_errores[li_iter].codigo) + ": " + lr_errores[li_iter].descripcion, StopSign!)
Next
End If
Catch(SoapException e1)
MessageBox("Error SOAP", "Error SOAP -> " + e1.Text, StopSign!)
st_working.Visible = False
Return
Catch(PBXRuntimeError e2)
MessageBox("Error PBX Runtime", e2.Text, StopSign!)
st_working.Visible = False
Return
Catch(RuntimeError e3)
MessageBox("Error Runtime", e3.Text, StopSign!)
st_working.Visible = False
Return
End Try
The difference is declaring the return object before calling the web service function or not.
The weirdest thing is that all the other functions of the web service work perfectly. The only problem is that specific method from the Web Service.