#include <anna/xml/xml.hpp>
#include <anna/diameter.comm/OriginHost.hpp>
#include <anna/diameter.comm/OriginHostManager.hpp>
-#include <Procedure.hpp>
// Process
#include <Launcher.hpp>
+#include <Procedure.hpp>
+#include <EventOperation.hpp>
#include <MyDiameterEngine.hpp>
#include <anna/testing/TestManager.hpp>
#include <anna/testing/TestCase.hpp>
if(opType == "code") {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
std::string hexString = anna::functions::asHexString(codecMsg.code());
// write to outfile
std::ofstream outfile(param2.c_str(), std::ifstream::out);
anna::diameter::comm::Message *msg;
if(opType == "sendxml2e") {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
updateOperatedOriginHostWithMessage(codecMsg);
msg = getOperatedHost()->createCommMessage();
msg->clearBody();
} else if(param1 == "load") {
if(param2 == "") throw anna::RuntimeException("Missing xml path file for burst load operation", ANNA_FILE_LOCATION);
- codecMsg.loadXML(param2);
+ codecMsg.loadXMLFile(param2);
if(codecMsg.isAnswer()) throw anna::RuntimeException("Cannot load diameter answers for burst feature", ANNA_FILE_LOCATION);
try { codecMsg.valid(); } catch(anna::RuntimeException &ex) { ex.trace(); } // at least we need to see validation errors although it will continue loading (see validation mode configured in launcher)
if (numParams > 4)
throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION);
if(param3 == "") throw anna::RuntimeException(anna::functions::asString("Missing xml file for '%s' command in test id operation", param2.c_str()), ANNA_FILE_LOCATION);
- codecMsg.loadXML(param3);
+ codecMsg.loadXMLFile(param3);
LOGWARNING(
if (!codecMsg.isRequest() && (param4 == ""))
anna::Logger::warning("Step number has not been provided. Take into account that this answer message will be sent 'as is' and sequence information could be wrong at the remote peer", ANNA_FILE_LOCATION);
anna::diameter::comm::Message *msg;
if(opType == "sendxml2c") {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
updateOperatedOriginHostWithMessage(codecMsg);
msg = getOperatedHost()->createCommMessage();
msg->clearBody();
getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2c" : "send2cError"), detail);
}
} else if(opType == "loadxml") {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
response_content = codecMsg.asXMLString();
return true; // OK
} else if(opType == "diameterServerSessions") {
} else if (param1 == "dump") {
getOperatedServer()->getReactingAnswers()->dump("programmed_answer");
} else {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
updateOperatedOriginHostWithMessage(codecMsg);
anna::diameter::codec::Message *message = getOperatedHost()->getCodecEngine()->createMessage(param1); // loads xml again, lesser of two evils
LOGDEBUG(anna::Logger::debug(message->asXMLString(), ANNA_FILE_LOCATION));
} else if (param1 == "dump") {
getOperatedEntity()->getReactingAnswers()->dump("programmed_answer");
} else {
- codecMsg.loadXML(param1);
+ codecMsg.loadXMLFile(param1);
updateOperatedOriginHostWithMessage(codecMsg);
anna::diameter::codec::Message *message = getOperatedHost()->getCodecEngine()->createMessage(param1); // loads xml again, lesser of two evils
LOGDEBUG(anna::Logger::debug(message->asXMLString(), ANNA_FILE_LOCATION));