Minor fixes for Introduction to Apache CXF
This commit is contained in:
parent
800da1bbb4
commit
6befb0a5a6
|
@ -26,9 +26,6 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
|
|
|
@ -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<Integer, Student> getStudents();
|
||||
public Map<Integer, Student> getStudents();
|
||||
}
|
|
@ -7,7 +7,7 @@ import javax.jws.WebService;
|
|||
|
||||
@WebService(endpointInterface = "com.baeldung.cxf.introduction.Baeldung")
|
||||
public class BaeldungImpl implements Baeldung {
|
||||
Map<Integer, Student> students = new LinkedHashMap<Integer, Student>();
|
||||
private Map<Integer, Student> students = new LinkedHashMap<Integer, Student>();
|
||||
|
||||
public String hello(String name) {
|
||||
return "Hello " + name;
|
||||
|
|
|
@ -4,5 +4,5 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
|||
|
||||
@XmlJavaTypeAdapter(StudentAdapter.class)
|
||||
public interface Student {
|
||||
String getName();
|
||||
public String getName();
|
||||
}
|
|
@ -4,7 +4,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||
|
||||
@XmlType(name = "Student")
|
||||
public class StudentImpl implements Student {
|
||||
String name;
|
||||
private String name;
|
||||
|
||||
StudentImpl() {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class StudentMap {
|
|||
}
|
||||
|
||||
@XmlType(name = "StudentEntry")
|
||||
static class StudentEntry {
|
||||
public static class StudentEntry {
|
||||
private Integer id;
|
||||
private Student student;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue