Reputation: 29
This is my XML format which I want to post to serve:
`<soap:Body>
<UploadImagesAndNotes xmlns="http://www.datadog.co.nz/
<UserId>string</UserId>
<Password>string</Password>
<MobileNumber>string</MobileNumber>
<Note>string</Note>
<JobNumber>int</JobNumber>
<GPSLatitude>decimal</GPSLatitude>
<GPSLongitude>decimal</GPSLongitude>
<Images>
<Image>
<ImageData>base64Binary</ImageData>
<ImageLatitude>decimal</ImageLatitude>
<ImageLongitude>decimal</ImageLongitude>
</Image>
<Image>
<ImageData>base64Binary</ImageData>
<ImageLatitude>decimal</ImageLatitude>
<ImageLongitude>decimal</ImageLongitude>
</Image>
</Images>
<Fowards>
<EmailAddress>string</EmailAddress>
<EmailAddress>string</EmailAddress>
</Fowards>
</UploadImagesAndNotes>
</soap:Body>
</soap:Envelope>`
I know how to send it to server using this:-
`SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //set up request
request.addProperty("GPSLatitude", lat);
request.addProperty("GPSLongitude", long);`
but I am getting problem in
`<Images>
<Image>`
How to set these nodes value?
Upvotes: 1
Views: 1074
Reputation: 29
I found solution here http://code.google.com/p/ksoap2-android/wiki/CodingTipsAndTricks#sending/receiving_array_of_complex_types_or_primitives
Upvotes: 2
Reputation: 5773
<image name="image1">
and <image name="image2">
add this into ur images to differentiate b/w two.
Upvotes: 1