java - Web service denying a passed string, on Android with KSoap2 -


i'm creating android application communicates soap web service, , i'm using ksoap2 it. ksoap 2 has been functional (though little unreliable @ times) calls make, except one. particular service call making register account, takes user information, along "registration code". code used ensure user member of school before letting them register account app. problem this: suppose registration code web service expects "student123". no matter string pass web service call, response saying code invalid.

i can positive web service isn't problem, can manually invoke method , works fine, , can call same soap method iphone application developed same purpose android one.

so question this: ksoap2 changing string @ when calls web service? i've tried changing registration code single character "a", still comes invalid code response. here of code. inside class extends asynctask:

protected object doinbackground(userprofile...profiles)      {         soapobject request = new soapobject(namespace, register);          vector<propertyinfo> properties = makeproperties(servicecall.register, profiles[0]);          for(int = 0; < properties.size(); ++i)         {             request.addproperty(properties.get(i));         }          soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11);         envelope.dotnet = true;         envelope.setoutputsoapobject(request);          try         {             httptransportse transport = new httptransportse(url);             transport.debug = true;              transport.call(soap_namespace + register, envelope);             log.d("regrequest", transport.requestdump);             log.d("regresponse", transport.responsedump);             log.d("execute", "in register execute");              object result = (object)envelope.getresponse();             //log.d("result", "register result: " + result.tostring());              return result;                   }         catch(exception e)         {             e.printstacktrace();         }          return null; 

the userprofile class passed doinbackground method holder bunch of strings contain registration info. , part the

vector<propertyinfo> properties = makeproperties(servicecall.register, profiles[0]); 

call, function calls function called makeproperties creates propertyinformation passed string , name, so:

private propertyinfo makeproperty(string name, string value) {     propertyinfo newproperty = new propertyinfo();     newproperty.setname(name);     newproperty.setvalue(value);     newproperty.settype(propertyinfo.string_class);      return newproperty; } 

the name of value web service expects "registrationcode", , said, i've tried playing around value of field. example of call be...

propertyinfo regcode = makeproperty("registrationcode", "student123"); 

the web service getting matches registrationcode field, responds saying value received invalid. unfortunately, @ stage of testing, web service call requires paramaters can use, can't test if other service calls having same error. have tips?

let me know if more information, , appreciated!

edit: here printout of requestdump:

05-04 12:59:51.434: d/regrequest(17492): <v:envelope xmlns:i="http://www.w3.org/2001/xmlschema-instance" xmlns:d="http://www.w3.org/2001/xmlschema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> <v:header /><v:body> <createstudentaccount xmlns="http://url/" id="o0" c:root="1"> <fname i:type="d:string">chandler</fname> <lname i:type="d:string">bing</lname> <middlename i:type="d:string">m</middlename> <username i:type="d:string">lulz</username> <registrationcode i:type="d:string">student123</registrationcode> <password i:type="d:string">pass</password> <instructorname i:type="d:string">instructor1</instructorname> <schoollocation i:type="d:string">location1</schoollocation> </createstudentaccount></v:body></v:envelope> 

i've never seen "i:type="d:string"" stuff before, have problem?


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -