throw() {
anna::xml::Node* result = TestStep::asXML(parent);
//parent->createChild("TestStepSendxml");
+ std::string msg = "", xmlmsg = "";
// Message
- std::string msg = "", xmlmsg = "";
- if (a_message.isEmpty()) {
- msg = "<empty>";
+ if (TestManager::instantiate().getDumpHex()) {
+ if (a_message.isEmpty()) {
+ msg = "<empty>";
+ }
+ else {
+ msg = "\n"; msg += a_message.asString(); msg += "\n";
+ }
}
- else {
- msg = "\n"; msg += a_message.asString(); msg += "\n";
- // Helper
+
+ if (!a_message.isEmpty()) {
try {
Launcher& my_app = static_cast <Launcher&>(anna::app::functions::getApp());
static anna::diameter::codec::Message codecMsg(my_app.getCodecEngine());
}
}
- result->createAttribute("Message", msg);
+ if (msg != "") result->createAttribute("Message", msg);
if (xmlmsg != "") result->createAttribute("XMLMessage", xmlmsg);
result->createAttribute("Expired", (a_expired ? "yes":"no"));
+ if (a_waitForRequestStepNumber != -1)
+ result->createAttribute("WaitForRequestStepNumber", a_waitForRequestStepNumber);
return result;
}
throw() {
anna::xml::Node* result = TestStep::asXML(parent);
//parent->createChild("TestStepWait");
+ std::string msg = "", xmlmsg = "";
// Condition
a_condition.asXML(result);
+ // Message
+ if (TestManager::instantiate().getDumpHex()) {
+ if (a_message.isEmpty()) {
+ msg = "<empty>";
+ }
+ else {
+ msg = "\n"; msg += a_message.asString(); msg += "\n";
+ }
+ }
+
if (!a_message.isEmpty()) {
- // Message
- result->createAttribute("MatchedMessage", a_message.asString());
- // Helper
try {
Launcher& my_app = static_cast <Launcher&>(anna::app::functions::getApp());
static anna::diameter::codec::Message codecMsg(my_app.getCodecEngine());
codecMsg.decode(a_message);
- result->createAttribute("MatchedXMLMessage", codecMsg.asXMLString());
+ xmlmsg = "\n"; xmlmsg += codecMsg.asXMLString(); xmlmsg += "\n";
}
catch (anna::RuntimeException &ex) {
ex.trace();
}
}
+ if (msg != "") result->createAttribute("MatchedMessage", msg);
+ if (xmlmsg != "") result->createAttribute("XMLMessage", xmlmsg);
+
return result;
}