This commit is contained in:
Ren RenJuan 2014-01-24 16:38:51 +00:00
parent 231ae962bd
commit f39150ac7e
7 changed files with 29 additions and 26 deletions

View File

@ -117,7 +117,7 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
# #
ARTKOBJS=build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o \ ARTKOBJS=build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o \
build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \ build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \
build/RegistrantObjectType.o \ build/RegistrantObjectType.o build/LPExtension.o \
build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/Properties.o build/SessionPoolImpl.o \ build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/Properties.o build/SessionPoolImpl.o \
build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/ProtocolExtensionCommand.o build/SSLException.o \ build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/ProtocolExtensionCommand.o build/SSLException.o \
build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/ReceiveSE.o build/StandardCommandType.o \ build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/ReceiveSE.o build/StandardCommandType.o \

View File

@ -4,17 +4,28 @@
namespace { namespace {
Extension& launchPhaseExtension() { Extension& launchPhaseExtension() {
static Extension* lpExtension = new LPLaunch(); static Extension* lpExtension = new LPExtension();
return *lpExtension; return *lpExtension;
} }
}; // anonymous namespace }; // anonymous namespace
void LPCheck::setExtension () void LPCheck::setExtension ()
{ {
DOMElement *lpeCreate = DOMElement *lpeCreate =
xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"), xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"),
"check", launchPhaseExtension().getURI()); "launch:check", launchPhaseExtension().getURI());
} }
void LPCheck::addToCommand(const Command &command) const
{
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement = xmlWriter->appendChild(extensionElement,
"lauch:claims", launchPhaseExtension().getURI());
if (createData.get() != NULL)
{
createData->createXMLElement(xmlWriter, createElement);
}
}

View File

@ -11,6 +11,8 @@
LPLaunch *draft_tan_epp_launchphase_12; LPLaunch *draft_tan_epp_launchphase_12;
void setExtension (); void setExtension ();
std::auto_ptr<LPLaunch> createData;
public: public:
/** /**
* Check the availability of the single identified domain. * Check the availability of the single identified domain.
@ -26,7 +28,9 @@
* @param names The names of the domains to check the availability of. * @param names The names of the domains to check the availability of.
*/ */
LPCheck (std::vector<std::string> &names ) LPCheck (std::vector<std::string> &names )
: DomainCheckCommand ( names ) {} : DomainCheckCommand ( names ) { setExtension();}
virtual void addToCommand(const Command &command) const;
}; };

View File

@ -3,9 +3,8 @@
void LPLaunch::appendData(XMLWriter* xmlWriter, DOMElement* addElement) void LPLaunch::appendData(XMLWriter* xmlWriter, DOMElement* addElement)
{ {
DOMElement* lpDataElement = xmlWriter->appendChild(addElement, "launch"); DOMElement* lpDataElement = xmlWriter->appendChild(addElement, "claims");
XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "phase"), phase); XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "claims"), claims);
XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "status"), status);
} }
@ -14,14 +13,3 @@ void LPLaunch::createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement)
} }
std::string& LPLaunch::getURI() const
{
static std::string uri = "urn:ietf:params:xml:ns:launch-1.0";
return uri;
}
std::string& LPLaunch::getSchemaLocation() const
{
static std::string loc = "urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd";
return loc;
}

View File

@ -5,7 +5,7 @@
#include "xercesc/dom/DOMElement.hpp" #include "xercesc/dom/DOMElement.hpp"
#include "xml/XMLWriter.hpp" #include "xml/XMLWriter.hpp"
#include "se/Extension.hpp" #include "se/LPE/LPExtension.hpp"
using namespace std; using namespace std;
@ -13,8 +13,9 @@ class LPLaunch : public Extension
{ {
public: public:
LPLaunch() : LPLaunch() :
phase(""), claims("claims"),
status(")") phase("sunrise"),
status("available")
{} {}
virtual ~LPLaunch() {} virtual ~LPLaunch() {}
@ -25,10 +26,9 @@ class LPLaunch : public Extension
void appendData(XMLWriter* xmlWriter, DOMElement* addElement); void appendData(XMLWriter* xmlWriter, DOMElement* addElement);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement); void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
std::string& getURI() const;
std::string& getSchemaLocation() const;
private: private:
string claims;
string phase; string phase;
string status; string status;
}; };

View File

@ -7,7 +7,7 @@ using namespace std;
void LPRespExtender::fromXML(XMLDocument *xmlDoc) void LPRespExtender::fromXML(XMLDocument *xmlDoc)
{ {
infData.reset(new LPLaunch); // infData.reset(new LPExtension);
// if (xmlDoc->getNodeCount("count(" + MAXSIGLIFE_EXPR() + ")") > 0) // if (xmlDoc->getNodeCount("count(" + MAXSIGLIFE_EXPR() + ")") > 0)
// { // {

View File

@ -193,7 +193,7 @@ void ausRegEPPTK::doOTEB()
manager->execute(thisTest); manager->execute(thisTest);
} }
catch (EPPException& e) catch (EPPException& e)
{ const char *eMsg = e.getMessage().c_str(); { const char *eMsg = e.getMessage().c_str();
const char *opNow = op.c_str(); const char *opNow = op.c_str();
theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg); theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg);
throw e; throw e;