soap - Send object from android with ksoap2 to c# webservice -


i m trying send complex object me web service , return string value logcat android returns null refference

the full code ksoap2 send object

    questionnairekeyval qk = new questionnairekeyval(5, 8, "questionnaire1", "", "", "", "", "", "", "", "");       propertyinfo pi = new propertyinfo();     pi.setname("questionnairekeyval");     pi.setvalue(qk);     pi.settype(qk.getclass());     request.addproperty(pi);      soapserializationenvelope envelope = new soapserializationenvelope(             soapenvelope.ver11);      envelope.dotnet = true;      envelope.implicittypes = true;     // 2. set request parameters     envelope.setoutputsoapobject(request);      envelope.addmapping(ws_namespace, "questionnairekeyval",             new questionnairekeyval().getclass());      // 3. create http transport object send web service request     httptransportse httptransport = new httptransportse(wsdl_url);     // httptransport.debug = true; // allows capture of raw request/respose     // in     // logcat      // 4. make web service invocation     httptransport.call(soap_action, envelope);      string result;      if (envelope.bodyin instanceof soapfault) { // soapfault =                                                 // failure         soapfault soapfault = (soapfault) envelope.bodyin;         throw new exception(soapfault.getmessage());     } else {         // soapobject = success         soapprimitive soapobject = (soapprimitive) envelope.getresponse();         result = (soapobject).tostring();          log.wtf("result soapobject", result + " " + soapobject);      } 

c# object , return string

     [webmethod]     public string putanswers(questionnairekeyval reponse)     {          int = reponse.idclient;              return convert.tostring(a);    } 

solved name of proprety in java request questionnairekeyval in webservice reponse basicly problem why returns null


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -