Getting -1 as a result from web service
I'm dealing with web services (wsdl, ksoap) on Android. After submitting the details (like username and password) to the server I am getting the value -1 as a response.
Log.v("TAG", String.valueOf(resultsRequestSOAP));
is the line which I added to log the value
The logcat message is:
开发者_开发问答06-16 15:48:56.244: VERBOSE/HELLO(885): Trying to Login
06-16 15:48:57.454: VERBOSE/TAG(885): -1
After few corrections in the code I got the following message in logcat.
06-16 17:25:33.595: VERBOSE/HELLO(942): Trying to Login
06-16 17:25:40.034: VERBOSE/TAG(942): RegisterUserResponse{RegisterUserResult=-1; }
What does -1
indicate? Is there any field not reaching the server?
A negative return value or status value generally indicates that something went wrong or that it is not the expected result.
It heavily depends on the web service implementation so there is probably no way to really tell what exactly went wrong. You'll have to consult the documentation of the API and web service your are using.
I'm very well aware that this is very generic answer but given that the question is just as generic I feel it is the only answer one can possibly provide.
精彩评论