* @return
*/
public OpenXGReturnObject parseOpenXGReturnBody(InputStream inputStream) {
try {
OpenXGReturnObject openXGReturnObject = new OpenXGReturnObject();
//log.debug("parseReturnBody "+inputStream);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating( false );
factory.setNamespaceAware( false );
//get a builder to create a DOM document
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse( inputStream );
NodeList members = document.getElementsByTagName("member");
//log.debug("members LENGTH "+members.getLength());
for (int i=0; i<members.getLength(); i++) {
Element member = (Element) members.item(i);
NodeList name = member.getElementsByTagName("name");
//log.debug("Name "+name.item(0).getNodeName());
Node nameTextNode = name.item(0).getFirstChild();
log.debug("getNodeValue "+nameTextNode.getNodeValue());
if (nameTextNode.getNodeValue().equals("status_code")) {
NodeList string = member.getElementsByTagName("string");
//log.debug("Value "+string.item(0).getNodeName());
Node valueTextNode = string.item(0).getFirstChild();
//log.debug("Value "+valueTextNode.getNodeValue());
openXGReturnObject.setStatus_code(valueTextNode.getNodeValue());
} else if (nameTextNode.getNodeValue().equals("status_string")) {
NodeList string = member.getElementsByTagName("string");
//log.debug("Value "+string.item(0).getNodeName());
Node valueTextNode = string.item(0).getFirstChild();
//log.debug("Value "+valueTextNode.getNodeValue());
openXGReturnObject.setStatus_string(valueTextNode.getNodeValue());
} else if (nameTextNode.getNodeValue().equals("conference_number")) {
NodeList string = member.getElementsByTagName("string");
//log.debug("Value "+string.item(0).getNodeName());
Node valueTextNode = string.item(0).getFirstChild();
//log.debug("Value "+valueTextNode.getNodeValue());
openXGReturnObject.setConferenceNumber(valueTextNode.getNodeValue());
} else if (nameTextNode.getNodeValue().equals("conference_pin")) {
NodeList string = member.getElementsByTagName("string");
//log.debug("Value "+string.item(0).getNodeName());
Node valueTextNode = string.item(0).getFirstChild();
//log.debug("Value "+valueTextNode.getNodeValue());
openXGReturnObject.setConferencePin(valueTextNode.getNodeValue());
}
}