Repository: cxf Updated Branches: refs/heads/master ef8bec404 -> 438eadb78
Simplifying jaxrs spring boot demo Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/438eadb7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/438eadb7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/438eadb7 Branch: refs/heads/master Commit: 438eadb78176341f94a44ae3483b076332cf23a0 Parents: ef8bec4 Author: Sergey Beryozkin <[email protected]> Authored: Fri May 22 14:51:08 2015 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Fri May 22 14:51:08 2015 +0100 ---------------------------------------------------------------------- .../release/samples/jaxws_spring_boot/README | 6 ++- .../jaxws_spring_boot/client/README_CLIENT.txt | 11 ---- .../samples/jaxws_spring_boot/client/pom.xml | 57 -------------------- .../src/main/java/sample/ws/service/Hello.java | 43 --------------- .../sample/ws/service/client/HelloClient.java | 24 --------- .../release/samples/jaxws_spring_boot/pom.xml | 14 ++++- 6 files changed, 17 insertions(+), 138 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/distribution/src/main/release/samples/jaxws_spring_boot/README ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/README b/distribution/src/main/release/samples/jaxws_spring_boot/README index 748feb1..62b3a1a 100644 --- a/distribution/src/main/release/samples/jaxws_spring_boot/README +++ b/distribution/src/main/release/samples/jaxws_spring_boot/README @@ -11,5 +11,9 @@ $ mvn spring-boot:run http://localhost:8080/Service/Hello?WSDL will now display the generated WSDL. -to run the client navigate to the client folder. +to run the client run in a new terminal window: + +---- +$ mvn exec:java +---- http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/distribution/src/main/release/samples/jaxws_spring_boot/client/README_CLIENT.txt ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/client/README_CLIENT.txt b/distribution/src/main/release/samples/jaxws_spring_boot/client/README_CLIENT.txt deleted file mode 100644 index edd222f..0000000 --- a/distribution/src/main/release/samples/jaxws_spring_boot/client/README_CLIENT.txt +++ /dev/null @@ -1,11 +0,0 @@ -== Spring Boot - CXF Samples - Web Services Client - -This sample project demonstrates how to run the client CXF Web Services with Spring Boot. - -The sample uses Maven. It can be built and run from the command line: - ----- -$ mvn exec:java ----- - -Will display the execution result in the console. http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/distribution/src/main/release/samples/jaxws_spring_boot/client/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/client/pom.xml b/distribution/src/main/release/samples/jaxws_spring_boot/client/pom.xml deleted file mode 100644 index a6ce361..0000000 --- a/distribution/src/main/release/samples/jaxws_spring_boot/client/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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> - <artifactId>spring-boot-sample-ws-cxf-Client</artifactId> - <name>Spring Boot CXF Web Services Sample Client</name> - <description>Spring Boot CXF Web Services Sample Client</description> - <groupId>org.apache.cxf.spring.boot</groupId> - <version>1.0.0</version> - <dependencies> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-bundle</artifactId> - <version>3.0.0-milestone2</version> - </dependency> - <dependency> - <groupId>javax.xml</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.0</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> - </dependency> - <dependency> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - <version>1.6.3</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <configuration> - <mainClass>sample.ws.service.client.HelloClient</mainClass> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/Hello.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/Hello.java b/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/Hello.java deleted file mode 100644 index 1f48ffc..0000000 --- a/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/Hello.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2012-2013 the original author or authors. - * - * Licensed 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 sample.ws.service; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - -/** - * Examples code for spring boot with CXF services. - * Hello is the interface for sayHello interface. - * - * This class was generated by Apache CXF 3.1.0 2015-05-18T13:02:03.098-05:00 - * Generated source version: 3.1.0 - * - */ -@WebService(targetNamespace = "http://service.ws.sample/", name = "Hello" , serviceName = "HelloService") -public interface Hello { - - @WebResult(name = "return", targetNamespace = "") - @RequestWrapper(localName = "sayHello", targetNamespace = "http://service.ws.sample/", className = "sample.ws.service.SayHello") - @WebMethod(action = "urn:SayHello") - @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = "http://service.ws.sample/", className = "sample.ws.service.SayHelloResponse") - public java.lang.String sayHello( - @WebParam(name = "myname", targetNamespace = "") java.lang.String myname); -} http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/client/HelloClient.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/client/HelloClient.java b/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/client/HelloClient.java deleted file mode 100644 index 59ba104..0000000 --- a/distribution/src/main/release/samples/jaxws_spring_boot/client/src/main/java/sample/ws/service/client/HelloClient.java +++ /dev/null @@ -1,24 +0,0 @@ -package sample.ws.service.client; - -import java.net.URL; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; - -import sample.ws.service.Hello; - -public class HelloClient { - - public static void main(String[] args) { - try { - URL wsdlURL = new URL("http://localhost:8080/Service/Hello?wsdl"); - QName SERVICE_NAME = new QName("http://service.ws.sample/","HelloService"); - Service service = Service.create(wsdlURL, SERVICE_NAME); - Hello client = service.getPort(Hello.class); - System.out.println(client.sayHello("Elan")); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} http://git-wip-us.apache.org/repos/asf/cxf/blob/438eadb7/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 a9fd0bc..120f478 100644 --- a/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml @@ -57,9 +57,19 @@ <build> <plugins> <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <mainClass>sample.ws.SampleWsApplication</mainClass> + </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <configuration> + <mainClass>sample.ws.service.client.HelloClient</mainClass> + </configuration> + </plugin> </plugins> </build> </project>
