I have a web service built on .NET which returns XmlDocument.
I’m reading it on a JSP file using a servlet like this:
CuteServlet servlet = new CuteServlet();
result = servlet.searchProperties(market_type, location, bedroom, price);
searchProperties method from CuteServlet:
public SearchPropertiesResult searchProperties(String propertyMarketType,
String location, String noOfBedroom, String price)
{
wsClient.Property service = new wsClient.Property();
wsClient.PropertySoap port = service.getPropertySoap();
return port.searchProperties(propertyMarketType, location, noOfBedroom, price);
}
The return type of searchProperties() is SearchPropertiesResult.
How can I read it?
To solve this, I read
XmlDocument(returned from C#) asresultand put value intoList<Object>, then casted each Object intoElementto read the details like following: