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/11 10:38:24 UTC

[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #4270: Cover endpoint URI based CXF definitions

ppalaga commented on code in PR #4270:
URL: https://github.com/apache/camel-quarkus/pull/4270#discussion_r1020097388


##########
integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java:
##########
@@ -41,9 +41,13 @@ public class CxfSoapClientRoutes extends RouteBuilder {
     @Override
     public void configure() {
 
-        from("direct:simple")
+        from("direct:simpleUriBean")
                 .to("cxf:bean:soapClientEndpoint?dataFormat=PAYLOAD");
 
+        from("direct:simpleUriAddress")
+                .to(String.format("cxf://%s?wsdlURL=%s&dataFormat=POJO&serviceClass=%s", calculatorServiceAddress(),
+                        calculatorServiceWsdlUrl(), CalculatorService.class.getCanonicalName()));

Review Comment:
   It does not make any difference for most classes incl. CalculatorService, but generally Class.getName() is the appropriate format here, because Camel is internally passing to ClassLoader.loadClass(String) which expects the Class.getName() format with `$` as a delimiter for inner classes.
   
   ```suggestion
                           calculatorServiceWsdlUrl(), CalculatorService.class.getName()));
   ```



##########
integration-test-groups/cxf-soap/cxf-soap-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/server/it/CxfSoapRoutes.java:
##########
@@ -40,6 +40,10 @@ public void configure() {
         from("cxf:bean:soapServiceEndpoint")
                 .setBody().simple("Hello ${body} from CXF service");
 
+        from(String.format("cxf:///hello-uri-address?wsdlURL=wsdl/HelloService.wsdl&serviceClass=%s",
+                HelloPortType.class.getCanonicalName()))

Review Comment:
   It does not make any difference for most classes incl. CalculatorService, but generally Class.getName() is the appropriate format here, because Camel is internally passing to ClassLoader.loadClass(String) which expects the Class.getName() format with `$` as a delimiter for inner classes.
   
   ```suggestion
                   HelloPortType.class.getName()))
   ```



-- 
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