From 99a4a163158a35d57c131f89f83f4ba53f11fdb8 Mon Sep 17 00:00:00 2001 From: palatsangeetha <138600841+palatsangeetha@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:11:53 +0200 Subject: [PATCH] DT-1814 - Fix for incorrect HTTP method and added httpmethod check (#179) --- .../standards/eblissuance/action/IssuanceRequestAction.java | 1 + .../standards/eblissuance/action/IssuanceResponseAction.java | 1 + .../standards/eblissuance/party/EblIssuanceCarrier.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceRequestAction.java b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceRequestAction.java index dbb83862..6a272893 100644 --- a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceRequestAction.java +++ b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceRequestAction.java @@ -152,6 +152,7 @@ protected Stream createSubChecks() { return Stream.of( new UrlPathCheck( EblIssuanceRole::isCarrier, getMatchedExchangeUuid(), "/ebl-issuance-requests"), + new HttpMethodCheck(EblIssuanceRole::isCarrier,getMatchedExchangeUuid(),"PUT"), new ResponseStatusCheck( EblIssuanceRole::isPlatform, getMatchedExchangeUuid(), expectedStatus), new ApiHeaderCheck( diff --git a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceResponseAction.java b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceResponseAction.java index 95a47f44..175fe61a 100644 --- a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceResponseAction.java +++ b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/action/IssuanceResponseAction.java @@ -61,6 +61,7 @@ protected Stream createSubChecks() { return Stream.of( new UrlPathCheck( EblIssuanceRole::isPlatform, getMatchedExchangeUuid(), "/ebl-issuance-responses"), + new HttpMethodCheck(EblIssuanceRole::isPlatform, getMatchedExchangeUuid(), "POST"), new ResponseStatusCheck( EblIssuanceRole::isCarrier, getMatchedExchangeUuid(), expectedStatus), new ApiHeaderCheck( diff --git a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/party/EblIssuanceCarrier.java b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/party/EblIssuanceCarrier.java index 3d5bc0d9..630be8d2 100644 --- a/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/party/EblIssuanceCarrier.java +++ b/ebl-issuance/src/main/java/org/dcsa/conformance/standards/eblissuance/party/EblIssuanceCarrier.java @@ -188,7 +188,7 @@ private void sendIssuanceRequest(JsonNode actionPrompt) { jsonRequestBody.put("issuanceManifestSignedContent", payloadSigner.sign(issuanceManifest.toString())); - syncCounterpartPost( + syncCounterpartPut( "/v%s/ebl-issuance-requests".formatted(apiVersion.charAt(0)), jsonRequestBody);