Answered by:
Return XML to Android from web service ?

Question
-
User2105156359 posted
Hi,
I am using a web service which returns a class , when i checked it, its returning data in xml format.
But does it recieve the data in xml format in the android when the function is called ?
Below is the class i return.
[XmlRoot("JobList")] public class JobSheet { [XmlElement("Job")] public List<clsJob> Jobs { get; set; } } public class clsJob { [XmlElement("JobCode")] public int JobID { get; set; } [XmlElement("Date")] public DateTime Date { get; set; } [XmlElement("FName")] public string FirstName { get; set; } [XmlElement("LName")] public string LastName { get; set; } [XmlElement("Addressline1")] public string Addressline1 { get; set; } [XmlElement("Addressline2")] public string Addressline2 { get; set; } [XmlElement("City")] public string City { get; set; } [XmlElement("County")] public string County { get; set; } [XmlElement("PostCode")] public string PostCode { get; set; } [XmlElement("Mobile")] public string Mobile { get; set; } [XmlElement("Status")] public string Status { get; set; } [XmlElement("Type")] public string TypeOfJob { get; set; } // Pickup or Devliery [XmlElement("Trip")] public int TripID { get; set; } [XmlElement("AddItems")] public ItemDetails AddItems { get; set; } } public class ItemDetails { [XmlElement("Item")] public List<string> Item { get; set; } }
Should i give [Serializable]above the root element to make it xml or are there any other methods to send the data as xml to android ?
Wednesday, February 13, 2013 5:26 AM
Answers
-
User2105156359 posted
Hi,
Sorry For this question....i am not used to fiddler...can you give me some tips about how to use it ?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, February 25, 2013 7:15 AM
All replies
-
User-1658256289 posted
Do you inspect it with fiddler? As I know, if you want to send SOAP msg and Android don't have direct support for sending those kind of messages. There are 3rd party libraries like KSOAP2-android which you can try.
Wednesday, February 20, 2013 4:55 AM -
User2105156359 posted
Hi,
Sorry For this question....i am not used to fiddler...can you give me some tips about how to use it ?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, February 25, 2013 7:15 AM -
User-1622227787 posted
Find below links to work with fiddler.
http://www.fiddler2.com/fiddler2/version.asp
Saturday, March 2, 2013 5:40 AM