Commit fb1a1209 authored by Yann Garcia's avatar Yann Garcia
Browse files

LIS Validation with Intersys

parent 2da95b2d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -503,13 +503,13 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
    // Convert into string
    params p;
    p["decode_str"] = std::string(static_cast<const unsigned char*>(body), body.lengthof() + static_cast<const unsigned char*>(body));
    loggers::get_instance().log("http_codec::decode_body: decode_str: %s", p["decode_str"]);
    loggers::get_instance().log("http_codec::decode_body: decode_str: %s", p["decode_str"].c_str());
    // Try to identify xml
    if (p["decode_str"].find("<?xml version=") != std::string::npos) {
       loggers::get_instance().log("http_codec::decode_body: Find xml message");
       LibItsHttp__XmlMessageBodyTypes::XmlBody xml_body;
       // TODO To be refined adding a string identifier to check which codec to use. E.g. held_code.id() returns "xmlns=\"urn:ietf:params:xml:ns:geopriv:held\">"
       if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:geopriv:held\">") != std::string::npos) {
       if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:geopriv:held\"") != std::string::npos) {
         loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:geopriv:held'");
         if (_codecs["held"].get() != nullptr) {
           loggers::get_instance().log("http_codec::decode_body: Call 'held_codec'");
@@ -525,7 +525,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
           xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast<const unsigned char*>(body));
         }
         message_body.xml__body() = xml_body;
       } else if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:lost1\">") != std::string::npos) {
       } else if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:lost1\"") != std::string::npos) {
         loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:lost1'");
         if (_codecs["lost"].get() != nullptr) {
           loggers::get_instance().log("http_codec::decode_body: Call 'lost_codec'");