X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=07c2e1be73dfe176cb13b7acf221d19f417adef7;hp=420a498c0250175ec8e515c3114a7abc0d2af6ee;hb=8b8309d46e9ccc968d3a315e86e70c5a806706d0;hpb=57040efdece4ea1f4487608de3d1afbb9d1378c8 diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 420a498..07c2e1b 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -30,10 +30,11 @@ #include #include #include -#include // Process #include +#include +#include #include #include #include @@ -1834,7 +1835,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons 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); @@ -1894,7 +1895,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons anna::diameter::comm::Message *msg; if(opType == "sendxml2e") { - codecMsg.loadXML(param1); + codecMsg.loadXMLFile(param1); updateOperatedOriginHostWithMessage(codecMsg); msg = getOperatedHost()->createCommMessage(); msg->clearBody(); @@ -1944,7 +1945,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons } 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) @@ -2359,7 +2360,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons 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); @@ -2494,7 +2495,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons anna::diameter::comm::Message *msg; if(opType == "sendxml2c") { - codecMsg.loadXML(param1); + codecMsg.loadXMLFile(param1); updateOperatedOriginHostWithMessage(codecMsg); msg = getOperatedHost()->createCommMessage(); msg->clearBody(); @@ -2519,7 +2520,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons 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") { @@ -2539,7 +2540,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons } 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)); @@ -2565,7 +2566,7 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons } 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));