Is there a way I can generate xml string from an object?
For instance, I got below object.
Person p1 = new Person()
p1.Name = ‘Mike’
p1.Address = new Address()
p1.Address.City = ‘New York City’
String p1_XML = ??
I want to have p1_XML as below
<City>New York City</City>
I know I can use variable and bind from the Request Message. However if the xml gets complicated or has list, it’s very hard to maintain.
How do you guys deal with list and complicated xml request?