From 6befb0a5a61e50b0699367f59755086001d283a6 Mon Sep 17 00:00:00 2001 From: Thai Nguyen Date: Fri, 8 Jul 2016 23:54:16 +0700 Subject: [PATCH] Minor fixes for Introduction to Apache CXF --- apache-cxf/cxf-introduction/pom.xml | 3 --- .../main/java/com/baeldung/cxf/introduction/Baeldung.java | 6 +++--- .../java/com/baeldung/cxf/introduction/BaeldungImpl.java | 2 +- .../main/java/com/baeldung/cxf/introduction/Student.java | 2 +- .../java/com/baeldung/cxf/introduction/StudentImpl.java | 2 +- .../main/java/com/baeldung/cxf/introduction/StudentMap.java | 2 +- .../java/com/baeldung/cxf/introduction/StudentTest.java | 6 +++--- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/apache-cxf/cxf-introduction/pom.xml b/apache-cxf/cxf-introduction/pom.xml index bc4f0a1225..0a6f387b06 100644 --- a/apache-cxf/cxf-introduction/pom.xml +++ b/apache-cxf/cxf-introduction/pom.xml @@ -26,9 +26,6 @@ - - maven-compiler-plugin - org.codehaus.mojo exec-maven-plugin diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Baeldung.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Baeldung.java index 6a0b52d504..472d38b8e1 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Baeldung.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Baeldung.java @@ -7,10 +7,10 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @WebService public interface Baeldung { - String hello(String name); + public String hello(String name); - String helloStudent(Student student); + public String helloStudent(Student student); @XmlJavaTypeAdapter(StudentMapAdapter.class) - Map getStudents(); + public Map getStudents(); } \ No newline at end of file diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/BaeldungImpl.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/BaeldungImpl.java index 32fd95dc02..240f6bb1da 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/BaeldungImpl.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/BaeldungImpl.java @@ -7,7 +7,7 @@ import javax.jws.WebService; @WebService(endpointInterface = "com.baeldung.cxf.introduction.Baeldung") public class BaeldungImpl implements Baeldung { - Map students = new LinkedHashMap(); + private Map students = new LinkedHashMap(); public String hello(String name) { return "Hello " + name; diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Student.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Student.java index 68bbb151df..cad8f94d97 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Student.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Student.java @@ -4,5 +4,5 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlJavaTypeAdapter(StudentAdapter.class) public interface Student { - String getName(); + public String getName(); } \ No newline at end of file diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentImpl.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentImpl.java index 3f57143909..bc9dd27afe 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentImpl.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentImpl.java @@ -4,7 +4,7 @@ import javax.xml.bind.annotation.XmlType; @XmlType(name = "Student") public class StudentImpl implements Student { - String name; + private String name; StudentImpl() { } diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentMap.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentMap.java index 8593dcaf86..4c40886c42 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentMap.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/StudentMap.java @@ -16,7 +16,7 @@ public class StudentMap { } @XmlType(name = "StudentEntry") - static class StudentEntry { + public static class StudentEntry { private Integer id; private Student student; diff --git a/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java b/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java index 120f3ac5e5..68bc4aa5e8 100644 --- a/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java +++ b/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java @@ -19,9 +19,9 @@ public class StudentTest { private static QName SERVICE_NAME = new QName("http://introduction.cxf.baeldung.com/", "Baeldung"); private static QName PORT_NAME = new QName("http://introduction.cxf.baeldung.com/", "BaeldungPort"); - Service service; - Baeldung baeldungProxy; - Baeldung baeldungImpl; + private Service service; + private Baeldung baeldungProxy; + private Baeldung baeldungImpl; { service = Service.create(SERVICE_NAME);