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