last day (14 days later) » 

11:50 AM
0
A: Android Volley: null value being received at server for String params sent with POST request

Vinay JayaramUse the code given below and let me know if you are facing any issue JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST, url, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { ...

 
Error: org.json.JSONException: Value nullnullnullnull of type java.lang.String cannot be converted to JSONObject
 
could you just get me the url that you are calling?.
 
Another post on SO http://stackoverflow.com/questions/28135008/unexpected-response-code-500-for-po‌​‌​st-method tells something about replacing null in ObjectRequest with something...(i don't understand)...
url is 127.0.0.1:8080/com.va.jersey/helloworld/hello....i am getting correct response from HttpRequester firefox addon
 
is it POST or GET?. Also can you tell me the json or string output?
 
POST.... 2nd part not clear ...you want expected response from server..?
 
11:50 AM
send me the string output itself
 
i'm only appending param2 and param3 and sending it back...for test pupose
 
I am expecting the response from server.
 
have i responded to your query?
 
hi
i wanted to know the response you get
 
hi, i think the issue is that getParams() is not getting inviked, while defining ObjectRequest we need to provide something...to help invoking getParams()
 
11:54 AM
you can do one thing.. you can append the param in url itself
 
if, param2="value2", param3="value3".. the response from server is value1value2
in actuals i'll be hasing these values, for test i'm appending
 
127.0.0.1:8080/com.va.jersey/helloworld/hello.... ?param1=XXX&param2=YYY
 
ok, got it! but why not like this....there has to be a mistake which can be corrected...
anyway i've got the cheat code!!
 
if this is working we can find the root cause
 
i'll just try and come back
 
11:57 AM
even if this is not working.. issue may be with something else
 
appended the parameters in url and got correct response!
 
great!
can you just remove this "throws AuthFailureError"
and check with the same param code?
How ever if you have got the answer you can accept it i would get few points
 
12:40 PM
just checked the real problem is in size of strings that i'm passing as param, they are in 100s of KB , when i'm attaching them this way i get error 400
any take on this
 

last day (14 days later) »