This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch camel-3.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 49cd8ab739a9f551acc44ac833b03eaf927f961f Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Fri Apr 28 14:49:10 2023 -0400 camel-cxf doc: use exchange.getMessage() instead of the deprecated exchange.getOut() (cherry picked from commit 93a1ba2ae62e4a5fb46a5e43f364b40cfb60a93d) --- .../camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc | 6 +++--- .../camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc index 92d49e4ed20..74b83e2d5f2 100644 --- a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc +++ b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc @@ -352,13 +352,13 @@ Exchange exchange = template.send("direct://proxy", new Processor() { }); // get the response message -Customer response = (Customer) exchange.getOut().getBody(); +Customer response = (Customer) exchange.getMessage().getBody(); assertNotNull(response, "The response should not be null"); assertEquals(123, response.getId(), "Get a wrong customer id"); assertEquals("John", response.getName(), "Get a wrong customer name"); -assertEquals(200, exchange.getOut().getHeader(Exchange.HTTP_RESPONSE_CODE), "Get a wrong response code"); -assertEquals("value", exchange.getOut().getHeader("key"), "Get a wrong header value"); +assertEquals(200, exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE), "Get a wrong response code"); +assertEquals("value", exchange.getMessage().getHeader("key"), "Get a wrong header value"); ---- The http://cxf.apache.org/docs/jax-rs.html[CXF JAXRS front end] also diff --git a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc index 915f518fc4a..59d4cfca254 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc +++ b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc @@ -538,7 +538,7 @@ As an alternative you can add a message header for it as demonstrated in https:/ // set up the response context which force start document Map<String, Object> map = new HashMap<String, Object>(); map.put("org.apache.cxf.stax.force-start-document", Boolean.TRUE); - exchange.getOut().setHeader(Client.RESPONSE_CONTEXT, map); + exchange.getMessage().setHeader(Client.RESPONSE_CONTEXT, map); ------------------------------------------------------------------- == How to override the CXF producer address from message header @@ -856,7 +856,7 @@ code in the message header as demonstrated by https://github.com/apache/camel/bl from(routerEndpointURI).process(new Processor() { public void process(Exchange exchange) throws Exception { - Message out = exchange.getOut(); + Message out = exchange.getMessage(); // Set the message body with the out.setBody(this.getClass().getResourceAsStream("SoapFaultMessage.xml")); // Set the response code here @@ -892,7 +892,7 @@ response context with the following code: exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, GREET_ME_OPERATION); } }); - org.apache.camel.Message out = exchange.getOut(); + org.apache.camel.Message out = exchange.getMessage(); // The output is an object array, the first element of the array is the return value Object\[\] output = out.getBody(Object\[\].class); LOG.info("Received output text: " + output\[0\]);