Passing XML(DataSet) as Parameter ksoap2 android -
i trying send xml requst webservice using ksop2 not workig
my web service request format is
<envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <body> <updatevehicleviaobj xmlns="http://tempuri.org/"> <userhash>[string?]</userhash> <vehicleobject> <colour xmlns="http://schemas.datacontract.org/2004/07/stockservice">[string?]</colour> <comments xmlns="http://schemas.datacontract.org/2004/07/stockservice">[string?]</comments> <condition xmlns="http://schemas.datacontract.org/2004/07/stockservice">[string?]</condition> </vehicleobject> </updatevehicleviaobj> </body> </envelope>
i using ksoap2 create request like
soapobject request = new soapobject("namespace", "methodname"); request.addproperty(properyobject); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); //soap implemented in dotnet true/false. envelope.dotnet = true; marshaldouble md = new marshaldouble(); //envelope.implicittypes = true; envelope.implicittypes = true; md.register(envelope); //set request data envelope , send request using httptransport envelope.setoutputsoapobject(request); httptransportse androidhttptransport = new httptransportse(minobj.geturl(), networktimeout); androidhttptransport.debug= true; androidhttptransport.call(soapaction, envelope,headerpropertyarraylist);
and ksop2 make requst become this
<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><updatevehicleviaobj xmlns="http://tempuri.org/" id="o0" c:root="1"><userhash>b5b2fdf87e848946</userhash><vehicleobject><colour>red</colour>< <comments >red</comments ><<condition >red</condition ><</vehicleobject></updatevehicleviaobj></v:body></v:envelope>
please help..
look @ documentation of ksoap2
you can create class implement marshable interface , add other property inside class
Comments
Post a Comment