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/06/27 16:47:51 UTC

[GitHub] [camel] ffang opened a new pull request, #7904: Camel 9627

ffang opened a new pull request, #7904:
URL: https://github.com/apache/camel/pull/7904

   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1168026501

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **3 component(s) tested**


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167848925

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **3 component(s) tested**


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


[GitHub] [camel] davsclaus commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167704381

   @ffang I dont think anyone can review 700+ changed files.
   
   Since the main branch is moving ahead then you may need to rebase this PR before it can be merged.
   
   So instead of trying to review this PR then have does camel-cxf still work on camel-spring-boot and camel-karaf.
   There are likely some changes in these that we need too. And if you have not looked at these 2 projects, then could you take a look first as we are closing down on 3.18 LTS and cannot wait for a long time for this PR to be finished if camel-karaf and camel-spring-boot needs extra work too.
   
   And is there anything end users need to be aware of, if so maybe add some text in the 3.18 upgrade guide in the docs folder.


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167847723

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **3 component(s) tested**


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


[GitHub] [camel] orpiske commented on a diff in pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #7904:
URL: https://github.com/apache/camel/pull/7904#discussion_r907705869


##########
components/camel-cxf/camel-cxf-common/pom.xml:
##########
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-cxf-parent</artifactId>
+        <version>3.18.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-cxf-common</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Camel :: CXF :: Common</name>
+    <description>Camel CXF Common</description>
+
+    <properties>
+        <camel.osgi.import.defaults />
+        <camel.osgi.import>
+            !org.springframework.boot.*,
+            !org.springframework.context.annotation.*;resolution:=optional,
+            !org.apache.camel.component.cxf,
+            !org.apache.camel.component.cxf.blueprint,
+            !org.apache.camel.component.cxf.converter,
+            !org.apache.camel.component.cxf.feature,
+            !org.apache.camel.component.cxf.interceptors,
+            !org.apache.camel.component.cxf.jaxrs,
+            !org.apache.camel.component.cxf.spring,
+            !org.apache.camel.component.cxf.util,
+            !org.apache.camel.blueprint,
+            javax.xml.soap*;version="[1.3,2)";resolution:=optional,
+            javax.xml.stream*;version="[0.0,2)";resolution:=optional,
+            org.apache.camel.*;${camel.osgi.import.camel.version},
+            org.apache.camel.component.cxf.blueprint;${camel.osgi.import.camel.version};resolution:=optional,
+            org.apache.camel.component.cxf.jaxrs.blueprint;${camel.osgi.import.camel.version};resolution:=optional,
+            org.apache.cxf.*;version="${cxf-version-range}",
+            ${camel.osgi.import.defaults},
+            ${camel.osgi.import.additional},
+            org.osgi.service.blueprint;resolution:=optional,
+            org.osgi.service.blueprint.container;resolution:=optional,
+            org.osgi.service.blueprint.reflect;resolution:=optional,
+            org.apache.aries.blueprint;version="[1.0,2.0)";resolution:=optional,
+            org.apache.aries.blueprint.reflect;version="[1.0,2.0)";resolution:=optional,
+            org.apache.aries.blueprint.mutable;version="[1.0,2.0)";resolution:=optional,
+            org.apache.camel.blueprint;resolution:=optional,
+            *
+        </camel.osgi.import>
+        <camel.osgi.failok>true</camel.osgi.failok>
+
+        <camel-prepare-component>false</camel-prepare-component>
+
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-xml-jaxp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-attachments</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-http-base</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>${javax-servlet-api-version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-junit5</artifactId>
+        </dependency>
+
+
+
+    </dependencies>
+
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <excludes>
+                    <exclude>META-INF/spring.*</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <childDelegation>false</childDelegation>
+                    <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
+                    <reportFormat>brief</reportFormat>
+                    <useFile>false</useFile>
+                    <runOrder>alphabetical</runOrder>
+                    <!--parallel>classes</parallel>
+                    <perCoreThreadCount>true</perCoreThreadCount>
+                    <threadCount>2</threadCount-->

Review Comment:
   Maybe I'd remove this commented code.



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


[GitHub] [camel] ffang commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
ffang commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167801218

   > Just added some comments.
   
   Thanks @orpiske for the feedback!
   
   Addressed accordingly


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


[GitHub] [camel] orpiske commented on a diff in pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #7904:
URL: https://github.com/apache/camel/pull/7904#discussion_r907703886


##########
components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/HelloServiceImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.cxf.jaxws;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HelloServiceImpl implements HelloService {
+    private static final Logger LOG = LoggerFactory.getLogger(HelloServiceImpl.class);
+    private int invocationCount;
+
+    private String name;
+
+    public HelloServiceImpl(String name) {
+        this.name = name;
+    }
+
+    public HelloServiceImpl() {
+        name = "";
+    }
+
+    @Override
+    public String echo(String text) {
+        LOG.info("call for echo with " + text);

Review Comment:
   We can use log markers here to avoid them being flagged on Sonar:
   ```LOG.info("call for echo with {}", text);```
   
   



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


[GitHub] [camel] orpiske commented on a diff in pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #7904:
URL: https://github.com/apache/camel/pull/7904#discussion_r907708337


##########
components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java:
##########
@@ -946,7 +950,19 @@ public void setBus(Bus bus) {
 
     public Bus getBus() {
         if (bus == null) {
-            bus = CxfEndpointUtils.createBus(getCamelContext());
+            CamelContext context = getCamelContext();
+            if (context.getClass().getName().endsWith("SpringCamelContext")) {
+                try {
+                    Class<?> cxfSpringEndpintUtilClazz = Class.forName("org.apache.camel.component.cxf.spring.jaxws.CxfSpringEndpointUtils");
+                    Method method = cxfSpringEndpintUtilClazz.getMethod("createBus", CamelContext.class);
+                    bus = (Bus)method.invoke(null, context);
+                } catch (Exception ex) {
+                    LOG.warn("Error creating Cxf Bus from SpringCamelContext. This exception will be ignored.", ex);

Review Comment:
   Maybe log the exception message too? Something like: 
   
   ```LOG.warn("Error creating Cxf Bus from SpringCamelContext: {} This exception will be ignored.", ex.getMesage(), ex);```



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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167600091

   :warning: This PR changes Camel components and will be tested automatically.


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167989533

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **3 component(s) tested**


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167828503

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **2 component(s) tested**


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


[GitHub] [camel] ffang commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
ffang commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1169948089

   > 
   
   Hi @davsclaus ,
   I just go ahead and merge this PR.
   
   FYI, I'm creating patch(coming soon) for camel-spring-boot and camel-karaf projects to adopt this change there. 
   
   Cheers
   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


[GitHub] [camel] davsclaus commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1169632610

   @ffang what is the status of this? 


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


[GitHub] [camel] ffang merged pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
ffang merged PR #7904:
URL: https://github.com/apache/camel/pull/7904


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


[GitHub] [camel] github-actions[bot] commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167657596

   :x: Finished component verification: **1 component(s) test failed** out of 2 component(s) tested


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


[GitHub] [camel] ffang commented on pull request #7904: Camel 9627

Posted by GitBox <gi...@apache.org>.
ffang commented on PR #7904:
URL: https://github.com/apache/camel/pull/7904#issuecomment-1167765172

   Hi @davsclaus ,
   
   Thanks for the comments, and I'm checking camel-spring-boot and camel-karaf projects with regard to this change.
   
   And I will update doc if necessary.
   Cheers
   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