This is an automated email from the ASF dual-hosted git repository. JiriOndrusek pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 103a6e1d5bc229f3f3f155ba2a8718889abd5452 Author: Jiri Ondrusek <[email protected]> AuthorDate: Thu May 21 13:58:14 2026 +0200 fixed cxf error because of CAMEL-23526 --- .../component/cxf/soap/mtom/awt/it/CxfSoapMtomAwtRoutes.java | 5 ++++- .../quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java | 3 ++- .../quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java | 9 +++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom-awt/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/awt/it/CxfSoapMtomAwtRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-mtom-awt/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/awt/it/CxfSoapMtomAwtRoutes.java index 1b16e89d90..034a21fcff 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-mtom-awt/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/awt/it/CxfSoapMtomAwtRoutes.java +++ b/integration-test-groups/cxf-soap/cxf-soap-mtom-awt/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/awt/it/CxfSoapMtomAwtRoutes.java @@ -32,6 +32,8 @@ import org.apache.cxf.message.MessageContentsList; import org.eclipse.microprofile.config.Config; import org.eclipse.microprofile.config.ConfigProvider; +import static org.apache.camel.component.cxf.common.message.CxfConstants.OPERATION_NAME; + @ApplicationScoped public class CxfSoapMtomAwtRoutes extends RouteBuilder { @@ -56,7 +58,7 @@ public class CxfSoapMtomAwtRoutes extends RouteBuilder { from("direct:processAwtImage") .process(exchange -> { - String operationName = (String) exchange.getIn().getHeaders().get("operationName"); + String operationName = (String) exchange.getIn().getHeaders().get(OPERATION_NAME); MessageContentsList list = exchange.getIn().getBody(MessageContentsList.class); if ("uploadImage".equals(operationName)) { exchange.getIn().getHeaders().put("image", list.get(0)); @@ -65,6 +67,7 @@ public class CxfSoapMtomAwtRoutes extends RouteBuilder { .put("operationName", "uploadImage(${header.image},${header.imageName})"); } else if ("downloadImage".equals(operationName)) { exchange.getIn().setBody(list.get(0)); + exchange.getIn().getHeaders().put("operationName", "downloadImage(${body})"); } }) .recipientList((simple("bean:imageAwtService?method=${header.operationName}"))); diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java index 28e8808fc4..098ba6e774 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java +++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java @@ -235,7 +235,7 @@ public class CxfSoapMtomRoutes extends RouteBuilder { static class PojoModeProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { - String operationName = (String) exchange.getIn().getHeaders().get("operationName"); + String operationName = (String) exchange.getIn().getHeaders().get(OPERATION_NAME); MessageContentsList list = (MessageContentsList) exchange.getIn().getBody(); if ("uploadImage".equals(operationName)) { exchange.getIn().getHeaders().put("image", list.get(0)); @@ -244,6 +244,7 @@ public class CxfSoapMtomRoutes extends RouteBuilder { .put("operationName", "uploadImage(${header.image},${header.imageName})"); } else if ("downloadImage".equals(operationName)) { exchange.getIn().setBody(list.get(0)); + exchange.getIn().getHeaders().put("operationName", "downloadImage(${body})"); } } diff --git a/integration-test-groups/cxf-soap/cxf-soap-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java index e490c41520..e781a3cf14 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java +++ b/integration-test-groups/cxf-soap/cxf-soap-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java @@ -70,15 +70,16 @@ public class CxfSoapRoutes extends RouteBuilder { from("cxf:bean:codeFirstServiceEndpoint") .choice() - .when(simple("${header.operationName} == 'Hello'")) + .when(simple("${header.CamelCxfOperationName} == 'Hello'")) .setBody().simple("Hello ${body} code first") .endChoice() - .when(simple("${header.operationName} == 'GoodBye'")) + .when(simple("${header.CamelCxfOperationName} == 'GoodBye'")) .setBody().simple("Good bye ${body} code first") .endChoice() .otherwise() .process(e -> { - throw new IllegalStateException("Unexpected operation " + e.getMessage().getHeader("operationName")); + throw new IllegalStateException( + "Unexpected operation " + e.getMessage().getHeader(CxfConstants.OPERATION_NAME)); }); from("cxf:bean:textServiceResponseFromRouteCxfMessageDataFormat") @@ -120,7 +121,7 @@ public class CxfSoapRoutes extends RouteBuilder { from(String.format("cxf:textServiceResponseFromImpl?serviceClass=%s&address=/text-service-impl", TextService.class.getName())) - .toD("bean:" + TextServiceImpl.class.getName() + "?method=${header.operationName}"); + .toD("bean:" + TextServiceImpl.class.getName() + "?method=${header.CamelCxfOperationName}"); } private String alterTextByTextOperation(String operation, String text) {
