Commit 424bd2e2 authored by Yann Garcia's avatar Yann Garcia
Browse files

Finalyze Vessel subscription TC for I1

parent a14170d9
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -342,6 +342,29 @@ int xml_codec::patch_encode_document_derivations(std::string& s) {
}

int xml_codec::patch_encode_service_capability_derivations(std::string& s) {
  std::string search;
  std::string replace;
  size_t idx = 0;
  if (s.find("<Requests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"") != std::string::npos) {
    search.assign("<Requests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
    replace.assign("<Requests xmlns:ns3=\"http://www.cise.eu/servicemodel/v1/service/\"");
    //loggers::get_instance().log("xml_codec::patch_encode_service_capability_derivations: Apply TITAN workaround: %s --> %s", search.c_str(), replace.c_str());
    while ((idx = s.find(search, idx)) != std::string::npos) {
      s.replace(idx, search.length(), replace);
      idx += replace.length();
    } // End of 'while' statement

    if (s.find("xsi:type=\"tq0000") != std::string::npos) {
      search.assign("xsi:type=\"tq0000");
      replace.assign("xsi:type=\"ns3");
      idx = 0;
      //loggers::get_instance().log("xml_codec::patch_encode_service_capability_derivations: Apply TITAN workaround: %s --> %s", search.c_str(), replace.c_str());
      while ((idx = s.find(search, idx)) != std::string::npos) {
        s.replace(idx, search.length(), replace);
        idx += replace.length();
      } // End of 'while' statement
    }
  }

  return 0;
}
+7 −5
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ system.utPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,
#AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_01

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest with ActionServide discovery - no Acknowledgment required
AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_02
#AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_02

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest with AnomalyServide discovery - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_03
@@ -213,14 +213,16 @@ AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_02
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest with CargoServide discovery - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_DISC_BV_11




# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a subscription for VesselService
#AtsCise_TestCases.TC_CDM_NODE_SUB_BV_01
AtsCise_TestCases.TC_CDM_NODE_SUB_BV_01
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response and an error code when receiving a subscription ending in past
#AtsCise_TestCases.TC_CDM_NODE_SUB_BO_01

# Check that the IUT sends a request of subcribers list for ActionService when triggered
#AtsCise_TestCases.TC_CDM_NODE_SUB_BV_02



# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a request of subcribers list for VesselService
#AtsCise_TestCases.TC_CDM_NODE_SUB_LOOK_BV_01_01
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response with an empty list when no subscription was done for VesselService
+33 −33

File changed.

Preview size limit exceeded, changes collapsed.

+238 −431

File changed.

Preview size limit exceeded, changes collapsed.

+5 −2
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ module LibCise_Functions {
                                    in template (omit) XmlEntityPayload p_entity_payload := omit,
                                    in template (omit) PayloadSelector p_payload_selector := omit,
                                    in template (value) PullRequest_1.discoveryProfiles_list p_discovery_profiles := {},
                                    in template (omit) ServiceCapability_derivations p_requests := omit,
                                    template Acknowledgement_1.discoveredServices_list p_ack_discovery_services := *
                                    ) runs on CiseComponent return boolean {
      // Local variables
@@ -185,7 +186,8 @@ module LibCise_Functions {
      var integer v_result;
      var boolean v_res_code := false;

      // Preamble
      log(">>> f_process_subscription");

      if (ispresent(p_entity_payload)) {
        v_payload := m_core_entity_payload_derivations_payload(p_entity_payload);
      }
@@ -206,7 +208,7 @@ module LibCise_Functions {
                                              v_payload,
                                              -,
                                              1000, // ResponseTimeOut
                                              -,
                                              p_requests,
                                              p_payload_selector
                                              ));
      v_result := f_sign_pull_request(v_pull_request, PX_SECURITY_SIGN_HASH_ALG, PICS_CISE_TS_CERTIFICATE, PICS_CISE_TS_SIGNING_PRIVATE_KEY, PICS_CISE_TS_SIGNING_PRIVATE_PASSWD, v_pull_request_signed, v_pull_request_canonicalized);
@@ -258,6 +260,7 @@ module LibCise_Functions {
        }
      } // End of 'alt' statement

      log("<<< f_process_subscription:v_res_code=", v_res_code);
      return v_res_code;
    } // End of function f_process_subscription

Loading