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>&lt;colour&gt;red&lt;/colour&gt;&lt; &lt;comments &gt;red&lt;/comments &gt;&lt;&lt;condition &gt;red&lt;/condition &gt;&lt;</vehicleobject></updatevehicleviaobj></v:body></v:envelope> 

please help..

look @ documentation of ksoap2

https://code.google.com/p/ksoap2-android/wiki/codingtipsandtricks#sending/receiving_array_of_complex_types_or_primitives

you can create class implement marshable interface , add other property inside class


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -