#include "se/OteDomainInfoResponse.hpp" #include "se/StandardObjectType.hpp" #include // atoi() using namespace std; *oteext:infData"); *oteProperties"); *oteext:registrantName/text()"); *oteext:registrantID/text()"); *oteext:registrantID/@type"); *oteext:eligibilityType/text()"); *oteext:eligibilityName/text()"); *oteext:eligibilityID/text()"); *oteext:eligibilityID/@type"); *oteext:policyReason/text()"); OteDomainInfoResponse::OteDomainInfoResponse() : DomainInfoResponse() { policyReason = 0; } void OteDomainInfoResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException) { DomainInfoResponse::fromXML(xmlDoc); if (!(resultArray[0].succeeded())) { return; } try { registrantName = xmlDoc->getNodeValue (OTE_REGISTRANT_NAME_EXPR); registrantID = xmlDoc->getNodeValue (OTE_REGISTRANT_ID_EXPR); registrantIDType = xmlDoc->getNodeValue (OTE_REGISTRANT_ID_TYPE_EXPR); eligibilityType = xmlDoc->getNodeValue (OTE_ELI_TYPE_EXPR); eligibilityName = xmlDoc->getNodeValue (OTE_ELI_NAME_EXPR); eligibilityID = xmlDoc->getNodeValue (OTE_ELI_ID_EXPR); eligibilityIDType = xmlDoc->getNodeValue (OTE_ELI_ID_TYPE_EXPR); string polReasonStr = xmlDoc->getNodeValue (OTE_POLICY_REASON_EXPR); if (polReasonStr.length() > 0) { policyReason = atoi (polReasonStr.c_str()); } } catch (XPathExpressionException& e) { maintLogger->warning(e.getMessage()); ParsingException pe("Could not parse OteDomainInfoResponse object."); pe.causedBy(e); throw pe; } }