Passing string array to c# web service (Android Ksoap2)
Hi so ive been searching google for a while and but cant seem to have a
solid example for this. Ive been working with webservice this pass few
days with android and i can succesfully pass parameters from android and
consume it back with ksoap with no problems. But now i need to pass an
array to a webservice. So heres my sample web service
[WebMethod]
public string Sample(string[] array)
{
return array[0];
}
And this is the XML that i need to generate
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Sample xmlns="http://MTKAndroidService.org/">
<array>
<string>string</string>
<string>string</string>
</array>
</Sample>
</soap:Body>
</soap:Envelope>
Ive been stuck with this for a while now and hope someone can help me
No comments:
Post a Comment