Merge branch 'nguyennamthai-cxf_intro'
This commit is contained in:
commit
b426599e04
|
@ -10,9 +10,28 @@
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<skipTests>true</skipTests>
|
|
||||||
<cxf.version>3.1.6</cxf.version>
|
<cxf.version>3.1.6</cxf.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.baeldung.cxf.introduction.Server</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.19.1</version>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/StudentTest.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.cxf</groupId>
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
@ -25,29 +44,4 @@
|
||||||
<version>${cxf.version}</version>
|
<version>${cxf.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>server</id>
|
|
||||||
<build>
|
|
||||||
<defaultGoal>test</defaultGoal>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>java</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<mainClass>com.baeldung.cxf.introduction.Server</mainClass>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
</project>
|
|
@ -3,15 +3,11 @@ package com.baeldung.cxf.introduction;
|
||||||
import javax.xml.ws.Endpoint;
|
import javax.xml.ws.Endpoint;
|
||||||
|
|
||||||
public class Server {
|
public class Server {
|
||||||
private Server() {
|
public static void main(String args[]) throws InterruptedException {
|
||||||
BaeldungImpl implementor = new BaeldungImpl();
|
BaeldungImpl implementor = new BaeldungImpl();
|
||||||
String address = "http://localhost:8080/baeldung";
|
String address = "http://localhost:8080/baeldung";
|
||||||
Endpoint.publish(address, implementor);
|
Endpoint.publish(address, implementor);
|
||||||
}
|
System.out.println("Server ready...");
|
||||||
|
|
||||||
public static void main(String args[]) throws InterruptedException {
|
|
||||||
new Server();
|
|
||||||
System.out.println("Server ready");
|
|
||||||
Thread.sleep(60 * 1000);
|
Thread.sleep(60 * 1000);
|
||||||
System.out.println("Server exiting");
|
System.out.println("Server exiting");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class StudentTest {
|
||||||
|
|
||||||
private Service service;
|
private Service service;
|
||||||
private Baeldung baeldungProxy;
|
private Baeldung baeldungProxy;
|
||||||
private Baeldung baeldungImpl;
|
private BaeldungImpl baeldungImpl;
|
||||||
|
|
||||||
{
|
{
|
||||||
service = Service.create(SERVICE_NAME);
|
service = Service.create(SERVICE_NAME);
|
||||||
|
|
Loading…
Reference in New Issue