android - Is there a problem with ksoap2 and soap Version 12? -
i tested calling soap 12 webservices ksoap2. used code call webservice:
soapobject request = new soapobject(namespace, name); request.addproperty("id", id); request.addproperty("name", "test@test.de"); request.addproperty("pw", "password"); request.addproperty("listid", 501); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver12); envelope.setoutputsoapobject(request); androidhttptransport client = new androidhttptransport(url); try { client.call(namespace + name, envelope); object response = envelope.getresponse(); } catch (ioexception e) { log.e(getclass().getsimplename(), "io problem", e); } catch (xmlpullparserexception e) { log.e(getclass().getsimplename(), "parser problem", e); }
i following exception:
org.xmlpull.v1.xmlpullparserexception:expected: start_tag {http://www.w3.org/2001/12/soap-envelope}envelope (position:start_tag <{http://schemas.xmlsoap.org/soap/envelope/}soapenv:envelope>@1:114 in java.io.inputstreamreader@44f28a80)
is problem of server response or there wrong in code far? seems other users have same problem. if change envelope soapenvelope.ver11 step further (i access denied response soap server because of wrong url) maybe there additional info missing create ver12 envelope.
have tried various options envelope see services expects?
e.g. can set
envelope.dotnet = true; envelope.headerout = security; // element[] created before envelope.encodingstyle = soapenvelope.enc; envelope.setaddadornments(false); envelope.implicittypes = false;
and bunch more. check out javadoc?
also make sure use latest release of ksoap2-android
project bunch of fixes not in normal sourceforge
project.
Comments
Post a Comment