android - Error consuming a web service with ksoap2? -


i'm consuming web service(tomcat) using ksoap2 library. can insert data in table can't understand why return system.err in logcat , method returns false because pass on catch

here how did

public class usuariodaows {      private final string url = "http://192.168.1.102:8080/exemplows/services/usuariodao?wsdl";     private final string namespace = "http://testepk.com.br"; //pacote no web service: br.com.testepk        private final string insert = "insert";      public boolean insert(usuario u){         soapobject soo = new soapobject(namespace, insert);          soapobject soouser = new soapobject(namespace, "u");         soouser.addproperty("nome" , u.getnome());         soouser.addproperty("idade", u.getidade());              soo.addsoapobject(soouser);          soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11);              //envelope.dotnet = true;         envelope.implicittypes = true;         envelope.setaddadornments(false);         envelope.setoutputsoapobject(soo);          httptransportse httptransport = new httptransportse(url);                 try {             httptransport.call("urn:" + insert, envelope);             soapprimitive answer = (soapprimitive)envelope.getresponse();             return boolean.parseboolean(answer.tostring());         } catch (httpresponseexception e) {                              e.printstacktrace();                 return false;         } catch (ioexception e) {                                e.printstacktrace();                 return false;         } catch (xmlpullparserexception e) {                                 e.printstacktrace();                 return false;         }             }  } 

here system.err

11-13 08:39:31.752: d/dalvikvm(1896): gc_for_alloc freed 113k, 6% free 2882k/3064k, paused 56ms, total 60ms 11-13 08:39:32.452: d/dalvikvm(1896): gc_for_alloc freed 403k, 14% free 2981k/3456k, paused 31ms, total 31ms 11-13 08:39:32.462: w/system.err(1896): invalid stream or encoding: java.io.ioexception: bufferedinputstream closed (position:start_document null@1:1) caused by: java.io.ioexception: bufferedinputstream closed; nested exception is: 11-13 08:39:32.482: w/system.err(1896): java.io.ioexception: bufferedinputstream closed 11-13 08:39:32.482: w/system.err(1896):     @ java.io.bufferedinputstream.streamclosed(bufferedinputstream.java:118) 11-13 08:39:32.482: w/system.err(1896):     @ java.io.bufferedinputstream.read(bufferedinputstream.java:223) 11-13 08:39:32.492: w/system.err(1896):     @ org.kxml2.io.kxmlparser.setinput(kxmlparser.java:1633) 11-13 08:39:32.502: w/system.err(1896):     @ org.ksoap2.transport.transport.parseresponse(transport.java:117) 11-13 08:39:32.502: w/system.err(1896):     @ org.ksoap2.transport.httptransportse.call(httptransportse.java:275) 11-13 08:39:32.502: w/system.err(1896):     @ org.ksoap2.transport.httptransportse.call(httptransportse.java:118) 11-13 08:39:32.502: w/system.err(1896):     @ org.ksoap2.transport.httptransportse.call(httptransportse.java:113) 11-13 08:39:32.502: w/system.err(1896):     @ com.example.testaws.usuariodaows.insert(usuariodaows.java:37) 11-13 08:39:32.512: w/system.err(1896):     @ com.example.testaws.mainactivity.oncreate(mainactivity.java:26) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activity.performcreate(activity.java:5231) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1087) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activitythread.performlaunchactivity(activitythread.java:2159) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activitythread.handlelaunchactivity(activitythread.java:2245) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activitythread.access$800(activitythread.java:135) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activitythread$h.handlemessage(activitythread.java:1196) 11-13 08:39:32.512: w/system.err(1896):     @ android.os.handler.dispatchmessage(handler.java:102) 11-13 08:39:32.512: w/system.err(1896):     @ android.os.looper.loop(looper.java:136) 11-13 08:39:32.512: w/system.err(1896):     @ android.app.activitythread.main(activitythread.java:5017) 11-13 08:39:32.512: w/system.err(1896):     @ java.lang.reflect.method.invokenative(native method) 11-13 08:39:32.512: w/system.err(1896):     @ java.lang.reflect.method.invoke(method.java:515) 11-13 08:39:32.512: w/system.err(1896):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:779) 11-13 08:39:32.512: w/system.err(1896):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:595) 11-13 08:39:32.512: w/system.err(1896):     @ dalvik.system.nativestart.main(native method) 11-13 08:39:32.512: i/insert:(1896): false 11-13 08:39:33.202: d/gralloc_goldfish(1896): emulator without gpu emulation detected. 


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -