From c8da53bcaca6e73863cb616bb2dac8935fb272ec Mon Sep 17 00:00:00 2001 From: Manfred Weiss Date: Tue, 7 Nov 2023 15:52:11 +0100 Subject: [PATCH 1/2] Do not parse response in case of http-404 --- .../http/src/org/apache/axis2/transport/http/HTTPSender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java b/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java index 48d2e1a5c6..e99c36e97f 100644 --- a/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java +++ b/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java @@ -205,7 +205,7 @@ public void send(MessageContext msgContext, URL url, String soapActionString) processResponse = true; fault = false; } else if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR - || statusCode == HttpStatus.SC_BAD_REQUEST || statusCode == HttpStatus.SC_NOT_FOUND) { + || statusCode == HttpStatus.SC_BAD_REQUEST) { processResponse = true; fault = true; } else { From cddc93a1c27f115c9a919f1b8e6285f72487b873 Mon Sep 17 00:00:00 2001 From: Manfred Weiss Date: Wed, 8 Nov 2023 09:01:17 +0100 Subject: [PATCH 2/2] Fix FaultHandlingTest --- .../test/org/apache/axis2/engine/FaultHandlingTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java b/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java index 39fbb73638..0870ce213e 100644 --- a/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java +++ b/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java @@ -47,6 +47,7 @@ import org.apache.axis2.integration.TestingUtils; import org.apache.axis2.integration.UtilServer; import org.apache.axis2.integration.UtilServerBasedTestCase; +import org.apache.axis2.util.Utils; import org.apache.axis2.wsdl.WSDLConstants; public class FaultHandlingTest extends UtilServerBasedTestCase implements TestConstants { @@ -63,6 +64,9 @@ protected void setUp() throws Exception { configurationContext.getAxisConfiguration().getInFlowPhases(); Phase phaseOne = (Phase)inPhasesUptoAndIncludingPostDispatch.get(0); phaseOne.addHandler(new FaultHandler()); + UtilServer.deployService(Utils.createSimpleService(serviceName, + Echo.class.getName(), + operationName)); } public void testFaultHandlingWithParamsSetToMsgCtxt() throws AxisFault { @@ -173,6 +177,7 @@ public File getTestResourceFile(String relativePath) { } protected void tearDown() throws Exception { + UtilServer.unDeployService(serviceName); } public void testExceptionInformationExtractionFromAxisFault() {