Dont check validation on write log for sendxml operation
[anna.git] / example / diameter / launcher / testing / TestStep.cpp
index e58bb0b..d02d9b6 100644 (file)
@@ -334,6 +334,9 @@ throw() {
     xmlmsg += a_messageCodec->asXMLString();
     xmlmsg += "\n";
   }
+  else {
+    xmlmsg = "<unable to decode, check traces>"; 
+  }
 
   if (msg != "") result->createAttribute("Message", msg);
   if (xmlmsg != "") result->createAttribute("XMLMessage", xmlmsg);
@@ -410,10 +413,12 @@ bool TestStepSendxml::do_execute() throw() {
 
       // Detailed log:
       if(a_originHost->logEnabled()) {
-        if (decodeMessage()) {
+        //if (decodeMessage()) {
+          // here we decode what we encoded on programming, then we could have a validation problem but not a decoding one:
+          decodeMessage();
           std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // shouldn't happen
           a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2e" : "send2eError"), detail);
-        }
+        //}
       }
     }
     else if (getType() == Type::Sendxml2c) {
@@ -444,10 +449,12 @@ bool TestStepSendxml::do_execute() throw() {
 
       // Detailed log:
       if(a_originHost->logEnabled()) {
-        if (decodeMessage()) {
+        //if (decodeMessage()) {
+          // here we decode what we encoded on programming, then we could have a validation problem but not a decoding one:
+          decodeMessage();
           std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // shouldn't happen
           a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2c" : "send2cError"), detail);
-        }
+        //}
       }
     }
 
@@ -570,6 +577,9 @@ throw() {
     xmlmsg += a_messageCodec->asXMLString();
     xmlmsg += "\n";
   }
+  else {
+    xmlmsg = "<unable to decode, check traces>"; 
+  }
 
   if (msg != "") result->createAttribute("MatchedMessage", msg);
   if (xmlmsg != "") result->createAttribute("MatchedXMLMessage", xmlmsg);