cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] cxf git commit: [CXF-6869] Updating SpringBoot jaxws demo
Date Thu, 02 Jun 2016 12:20:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ecc7200c2 -> 12f1ce562


[CXF-6869] Updating SpringBoot jaxws demo


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5dd6b7aa
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5dd6b7aa
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5dd6b7aa

Branch: refs/heads/3.1.x-fixes
Commit: 5dd6b7aa92a3acb15e716959f39e83f5d6f48a9a
Parents: ecc7200
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Jun 2 13:17:24 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Jun 2 13:18:28 2016 +0100

----------------------------------------------------------------------
 .../release/samples/jaxws_spring_boot/pom.xml   | 40 ++++----------------
 .../main/java/sample/ws/WebServiceConfig.java   | 30 +++------------
 .../src/main/resources/application.properties   |  1 +
 3 files changed, 14 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5dd6b7aa/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml b/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml
index ddec26e..24b2215 100644
--- a/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml
+++ b/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml
@@ -4,13 +4,11 @@
      <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>1.2.3.RELEASE</version>
+        <version>1.3.5.RELEASE</version>
     </parent> 
     <artifactId>spring-boot-sample-ws-cxf</artifactId>
     <name>Spring Boot CXF Web Services Sample</name>
     <description>Spring Boot CXF Web Services Sample</description>
-    <groupId>org.apache.cxf.spring.boot</groupId>
-    <version>1.0.0</version>
     <properties>
         <cxf.version>3.1.6-SNAPSHOT</cxf.version>
     </properties> 
@@ -18,43 +16,19 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
-            <version>1.2.3.RELEASE</version>
+            <version>1.3.5.RELEASE</version>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-jaxws</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-                <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-webapp</artifactId>
-            <version>9.3.0.M2</version>
-        </dependency>
-        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-ws</artifactId>
-            <version>1.2.3.RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>jaxen</groupId>
-            <artifactId>jaxen</artifactId>
-            <version>1.1.6</version>
-        </dependency>
-        <dependency>
-            <groupId>org.jdom</groupId>
-            <artifactId>jdom2</artifactId>
-            <version>2.0.6</version>
+            <version>1.3.5.RELEASE</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-            <version>1.6.3</version>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
+            <version>${cxf.version}</version>
         </dependency>
     </dependencies>
     <build>

http://git-wip-us.apache.org/repos/asf/cxf/blob/5dd6b7aa/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/WebServiceConfig.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/WebServiceConfig.java
b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/WebServiceConfig.java
index 3f4c629..bbabb25 100644
--- a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/WebServiceConfig.java
+++ b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/WebServiceConfig.java
@@ -19,41 +19,23 @@
 package sample.ws;
 
 import javax.xml.ws.Endpoint;
-import org.apache.cxf.bus.spring.SpringBus;
+import org.apache.cxf.Bus;
 import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.servlet.CXFServlet;
 
-import org.springframework.boot.context.embedded.ServletRegistrationBean;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.ws.config.annotation.EnableWs;
-import org.springframework.ws.config.annotation.WsConfigurerAdapter;
-import sample.ws.service.Hello;
 import sample.ws.service.HelloPortImpl;
 
-@EnableWs
 @Configuration
-public class WebServiceConfig extends WsConfigurerAdapter {
+public class WebServiceConfig {
 
-    @Bean
-    public ServletRegistrationBean dispatcherServlet() {
-        CXFServlet cxfServlet = new CXFServlet();
-        return new ServletRegistrationBean(cxfServlet, "/Service/*");
-    }
-
-    @Bean(name = "cxf")
-    public SpringBus springBus() {
-        return new SpringBus();
-    }
-
-    @Bean
-    public Hello myService() {
-        return new HelloPortImpl();
-    }
+    @Autowired
+    private Bus bus;
 
     @Bean
     public Endpoint endpoint() {
-        EndpointImpl endpoint = new EndpointImpl(springBus(), myService());
+        EndpointImpl endpoint = new EndpointImpl(bus, new HelloPortImpl());
         endpoint.publish("/Hello");
         return endpoint;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/5dd6b7aa/distribution/src/main/release/samples/jaxws_spring_boot/src/main/resources/application.properties
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/resources/application.properties
b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/resources/application.properties
new file mode 100644
index 0000000..2f7a5bb
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/resources/application.properties
@@ -0,0 +1 @@
+cxf.path=/Service


Mime
View raw message