How to make soap post request using Volley library in Android -


i want make make soap post request using volley library. using following code , got error "http/1.1 400 bad request". in previous using soap library working fine need make request using volley library.i using following url "http://test.com/testapp/services/service.asmx?op=forgotpassword"

public void forgotpassword(final string username,string url) {          stringrequest sr = new stringrequest(request.method.post,                 url,                 new response.listener<string>() {                     @override                     public void onresponse(string response) {                          toast.maketext(mcontext, "success" + response,                                 toast.length_short).show();                     }                 }, new response.errorlistener() {                     @override                     public void onerrorresponse(volleyerror error) {                         showresponse(error);                     }                 }) {             @override             protected map<string, string> getparams() {                 map<string, string> params = new hashmap<string, string>();                  params.put("email", username);                 params.put("language", "en");                   return params;             }              @override             public map<string, string> getheaders() throws authfailureerror {                 map<string, string> params = new hashmap<string, string>();                 params.put("content-type", "application/x-www-form-urlencoded");                 params.put("content-length", "length");                      return params;             }         };         application.getinstance().getrequestqueue().add(sr);     } 

please me make post soap request volley.

first of all, advise see you're sending printing log.

if want stringrequest, you'll need extend , override getparams , getbody methods.

please see answer: https://stackoverflow.com/a/26270185/421467


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -