Exemplo n.º 1
0
std::string XmlRoots::savePersistenceToString(
    const SmartPtrCPersistenceDoc persistenceDoc) {
    CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "savePersistenceToString");
    CAF_CM_VALIDATE_SMARTPTR(persistenceDoc);

    const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx");
    const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Persistence.xsd");

    const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement(
                                            "persistence", schemaNamespace, schemaLocation);
    PersistenceXml::add(persistenceDoc, rootXml);

    return rootXml->saveToString();
}
Exemplo n.º 2
0
std::string XmlRoots::saveErrorResponseToString(
	const SmartPtrCErrorResponseDoc errorResponseDoc) {
	CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveErrorResponseToString");

	std::string rc;

	CAF_CM_ENTER {
		CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc);

		const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx");
		const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd");

		const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement(
			"errorResponse", schemaNamespace, schemaLocation);
		ErrorResponseXml::add(errorResponseDoc, rootXml);

		rc = rootXml->saveToString();
	}
	CAF_CM_EXIT;

	return rc;
}
std::string XmlRoots::saveMultiPmeMgmtRequestToString(
	const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc) {
	CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveMultiPmeMgmtRequestToString");

	std::string rc;

	CAF_CM_ENTER {
		CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc);

		const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx");
		const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/MultiPmeMgmtRequest.xsd");

		const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement(
			"multiPmeMgmtRequest", schemaNamespace, schemaLocation);
		MultiPmeMgmtRequestXml::add(multiPmeMgmtRequestDoc, rootXml);

		rc = rootXml->saveToString();
	}
	CAF_CM_EXIT;

	return rc;
}