You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/11/18 16:27:26 UTC

[GitHub] [camel-quarkus] ffang commented on issue #4282: CXF endpoint configured via URI options doesn't work with PAYLOAD mode

ffang commented on issue #4282:
URL: https://github.com/apache/camel-quarkus/issues/4282#issuecomment-1320249709

   Hi @llowinge ,
   
   Firstly, by defaulut there is no such type converter which can change type from int[] to the required type: org.apache.camel.component.cxf.common.CxfPayload. So the exception here is expected.
   
   And for the cxf:bean:soapClientEndpoint, actually the POJO dataFormat is used, it's from the last part of your route
   ```
   from("direct:operandsAdd")
                   .setHeader(CxfConstants.OPERATION_NAME).constant("addOperands")
                   .to("cxf:bean:soapClientEndpoint?dataFormat=POJO");
   ```
   So here the same bean name soapClientEndpoint is reused, which means the POJO data format will be set to bean with name soapClientEndpoint, which is the same instance of CxfEndpoint from where you define soapClientEndpoint
   ```
   @Produces
       @ApplicationScoped
       @Named
       CxfEndpoint soapClientEndpoint() {
           final CxfEndpoint result = new CxfEndpoint();
           result.setServiceClass(CalculatorService.class);
           result.setAddress(calculatorServiceAddress());
           result.setWsdlURL(calculatorServiceWsdlUrl());
           result.getFeatures().add(loggingFeature);
           return result;
       }
   ```
   So whenever bean soapClientEndpoint is used during test, it will use POJO dataFormat, that's why https://github.com/apache/camel-quarkus/blob/main/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java#L45 passed as it uses POJO dataFormat.
   
   Freeman
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org