Java class for addEmployee complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="addEmployee">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addEmployee", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class AddEmployee {
+
+ protected int arg0;
+ protected String arg1;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the arg1 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getArg1() {
+ return arg1;
+ }
+
+ /**
+ * Sets the value of the arg1 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setArg1(String value) {
+ this.arg1 = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/AddEmployeeResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/AddEmployeeResponse.java
new file mode 100644
index 0000000000..8d274942b5
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/AddEmployeeResponse.java
@@ -0,0 +1,62 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for addEmployeeResponse complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="addEmployeeResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://bottomup.server.jaxws.baeldung.com/}employee" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addEmployeeResponse", propOrder = {
+ "_return"
+})
+public class AddEmployeeResponse {
+
+ @XmlElement(name = "return")
+ protected Employee _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link Employee }
+ *
+ */
+ public Employee getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Employee }
+ *
+ */
+ public void setReturn(Employee value) {
+ this._return = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployees.java b/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployees.java
new file mode 100644
index 0000000000..d87ed31634
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployees.java
@@ -0,0 +1,32 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for countEmployees complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="countEmployees">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "countEmployees")
+public class CountEmployees {
+
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployeesResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployeesResponse.java
new file mode 100644
index 0000000000..2d71ddd0b5
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/CountEmployeesResponse.java
@@ -0,0 +1,54 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for countEmployeesResponse complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="countEmployeesResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "countEmployeesResponse", propOrder = {
+ "_return"
+})
+public class CountEmployeesResponse {
+
+ @XmlElement(name = "return")
+ protected int _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public int getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(int value) {
+ this._return = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployee.java b/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployee.java
new file mode 100644
index 0000000000..0bd3a783a7
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployee.java
@@ -0,0 +1,52 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for deleteEmployee complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="deleteEmployee">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "deleteEmployee", propOrder = {
+ "arg0"
+})
+public class DeleteEmployee {
+
+ protected int arg0;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployeeResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployeeResponse.java
new file mode 100644
index 0000000000..216f766640
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/DeleteEmployeeResponse.java
@@ -0,0 +1,54 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for deleteEmployeeResponse complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="deleteEmployeeResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "deleteEmployeeResponse", propOrder = {
+ "_return"
+})
+public class DeleteEmployeeResponse {
+
+ @XmlElement(name = "return")
+ protected boolean _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public boolean isReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(boolean value) {
+ this._return = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/Employee.java b/jee7/src/main/java/com/baeldung/jaxws/client/Employee.java
new file mode 100644
index 0000000000..8a89a5b97c
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/Employee.java
@@ -0,0 +1,79 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for employee complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="employee">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "employee", propOrder = {
+ "firstName",
+ "id"
+})
+public class Employee {
+
+ protected String firstName;
+ protected int id;
+
+ /**
+ * Gets the value of the firstName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ /**
+ * Sets the value of the firstName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFirstName(String value) {
+ this.firstName = value;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ */
+ public void setId(int value) {
+ this.id = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists.java b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists.java
new file mode 100644
index 0000000000..3c9c726552
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists.java
@@ -0,0 +1,60 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for EmployeeAlreadyExists complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="EmployeeAlreadyExists">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EmployeeAlreadyExists", propOrder = {
+ "message"
+})
+public class EmployeeAlreadyExists {
+
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists_Exception.java b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists_Exception.java
new file mode 100644
index 0000000000..4d6a867b0d
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeAlreadyExists_Exception.java
@@ -0,0 +1,54 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ *
+ */
+@WebFault(name = "EmployeeAlreadyExists", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/")
+public class EmployeeAlreadyExists_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private EmployeeAlreadyExists faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public EmployeeAlreadyExists_Exception(String message, EmployeeAlreadyExists faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param cause
+ * @param message
+ */
+ public EmployeeAlreadyExists_Exception(String message, EmployeeAlreadyExists faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: com.baeldung.jaxws.client.EmployeeAlreadyExists
+ */
+ public EmployeeAlreadyExists getFaultInfo() {
+ return faultInfo;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound.java b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound.java
new file mode 100644
index 0000000000..ba3be93571
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound.java
@@ -0,0 +1,60 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for EmployeeNotFound complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="EmployeeNotFound">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EmployeeNotFound", propOrder = {
+ "message"
+})
+public class EmployeeNotFound {
+
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound_Exception.java b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound_Exception.java
new file mode 100644
index 0000000000..957e59fdc9
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeNotFound_Exception.java
@@ -0,0 +1,54 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ *
+ */
+@WebFault(name = "EmployeeNotFound", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/")
+public class EmployeeNotFound_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private EmployeeNotFound faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public EmployeeNotFound_Exception(String message, EmployeeNotFound faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param cause
+ * @param message
+ */
+ public EmployeeNotFound_Exception(String message, EmployeeNotFound faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: com.baeldung.jaxws.client.EmployeeNotFound
+ */
+ public EmployeeNotFound getFaultInfo() {
+ return faultInfo;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeService.java b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeService.java
new file mode 100644
index 0000000000..a2c007c5a0
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/EmployeeService.java
@@ -0,0 +1,139 @@
+
+package com.baeldung.jaxws.client;
+
+import java.util.List;
+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.Action;
+import javax.xml.ws.FaultAction;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "EmployeeService", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface EmployeeService {
+
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns com.baeldung.jaxws.client.Employee
+ * @throws EmployeeNotFound_Exception
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "getEmployee", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.GetEmployee")
+ @ResponseWrapper(localName = "getEmployeeResponse", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.GetEmployeeResponse")
+ @Action(input = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/getEmployeeRequest", output = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/getEmployeeResponse", fault = {
+ @FaultAction(className = EmployeeNotFound_Exception.class, value = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/getEmployee/Fault/EmployeeNotFound")
+ })
+ public Employee getEmployee(
+ @WebParam(name = "arg0", targetNamespace = "")
+ int arg0)
+ throws EmployeeNotFound_Exception
+ ;
+
+ /**
+ *
+ * @param arg1
+ * @param arg0
+ * @return
+ * returns com.baeldung.jaxws.client.Employee
+ * @throws EmployeeNotFound_Exception
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "updateEmployee", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.UpdateEmployee")
+ @ResponseWrapper(localName = "updateEmployeeResponse", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.UpdateEmployeeResponse")
+ @Action(input = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/updateEmployeeRequest", output = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/updateEmployeeResponse", fault = {
+ @FaultAction(className = EmployeeNotFound_Exception.class, value = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/updateEmployee/Fault/EmployeeNotFound")
+ })
+ public Employee updateEmployee(
+ @WebParam(name = "arg0", targetNamespace = "")
+ int arg0,
+ @WebParam(name = "arg1", targetNamespace = "")
+ String arg1)
+ throws EmployeeNotFound_Exception
+ ;
+
+ /**
+ *
+ * @return
+ * returns java.util.Listfeatures parameter will have their default values.
+ * @return
+ * returns EmployeeService
+ */
+ @WebEndpoint(name = "EmployeeServiceImplPort")
+ public EmployeeService getEmployeeServiceImplPort(WebServiceFeature... features) {
+ return super.getPort(new QName("http://bottomup.server.jaxws.baeldung.com/", "EmployeeServiceImplPort"), EmployeeService.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (EMPLOYEESERVICE_EXCEPTION!= null) {
+ throw EMPLOYEESERVICE_EXCEPTION;
+ }
+ return EMPLOYEESERVICE_WSDL_LOCATION;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployees.java b/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployees.java
new file mode 100644
index 0000000000..137cf06704
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployees.java
@@ -0,0 +1,32 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for getAllEmployees complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="getAllEmployees">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getAllEmployees")
+public class GetAllEmployees {
+
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployeesResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployeesResponse.java
new file mode 100644
index 0000000000..be3d502222
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/GetAllEmployeesResponse.java
@@ -0,0 +1,69 @@
+
+package com.baeldung.jaxws.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for getAllEmployeesResponse complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="getAllEmployeesResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://bottomup.server.jaxws.baeldung.com/}employee" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getAllEmployeesResponse", propOrder = {
+ "_return"
+})
+public class GetAllEmployeesResponse {
+
+ @XmlElement(name = "return")
+ protected List
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the return property.
+ *
+ *
+ * For example, to add a new item, do as follows: + *
+ * getReturn().add(newItem); + *+ * + * + *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Employee }
+ *
+ *
+ */
+ public List Java class for getEmployee complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * Java class for getEmployeeResponse complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _AddEmployeeResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "addEmployeeResponse");
+ private final static QName _EmployeeAlreadyExists_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "EmployeeAlreadyExists");
+ private final static QName _GetEmployeeResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "getEmployeeResponse");
+ private final static QName _EmployeeNotFound_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "EmployeeNotFound");
+ private final static QName _CountEmployees_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "countEmployees");
+ private final static QName _UpdateEmployee_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "updateEmployee");
+ private final static QName _DeleteEmployeeResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "deleteEmployeeResponse");
+ private final static QName _GetAllEmployeesResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "getAllEmployeesResponse");
+ private final static QName _DeleteEmployee_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "deleteEmployee");
+ private final static QName _UpdateEmployeeResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "updateEmployeeResponse");
+ private final static QName _AddEmployee_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "addEmployee");
+ private final static QName _GetAllEmployees_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "getAllEmployees");
+ private final static QName _CountEmployeesResponse_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "countEmployeesResponse");
+ private final static QName _GetEmployee_QNAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "getEmployee");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.baeldung.jaxws.client
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link EmployeeNotFound }
+ *
+ */
+ public EmployeeNotFound createEmployeeNotFound() {
+ return new EmployeeNotFound();
+ }
+
+ /**
+ * Create an instance of {@link CountEmployees }
+ *
+ */
+ public CountEmployees createCountEmployees() {
+ return new CountEmployees();
+ }
+
+ /**
+ * Create an instance of {@link AddEmployeeResponse }
+ *
+ */
+ public AddEmployeeResponse createAddEmployeeResponse() {
+ return new AddEmployeeResponse();
+ }
+
+ /**
+ * Create an instance of {@link EmployeeAlreadyExists }
+ *
+ */
+ public EmployeeAlreadyExists createEmployeeAlreadyExists() {
+ return new EmployeeAlreadyExists();
+ }
+
+ /**
+ * Create an instance of {@link GetEmployeeResponse }
+ *
+ */
+ public GetEmployeeResponse createGetEmployeeResponse() {
+ return new GetEmployeeResponse();
+ }
+
+ /**
+ * Create an instance of {@link DeleteEmployeeResponse }
+ *
+ */
+ public DeleteEmployeeResponse createDeleteEmployeeResponse() {
+ return new DeleteEmployeeResponse();
+ }
+
+ /**
+ * Create an instance of {@link GetAllEmployeesResponse }
+ *
+ */
+ public GetAllEmployeesResponse createGetAllEmployeesResponse() {
+ return new GetAllEmployeesResponse();
+ }
+
+ /**
+ * Create an instance of {@link UpdateEmployee }
+ *
+ */
+ public UpdateEmployee createUpdateEmployee() {
+ return new UpdateEmployee();
+ }
+
+ /**
+ * Create an instance of {@link CountEmployeesResponse }
+ *
+ */
+ public CountEmployeesResponse createCountEmployeesResponse() {
+ return new CountEmployeesResponse();
+ }
+
+ /**
+ * Create an instance of {@link GetEmployee }
+ *
+ */
+ public GetEmployee createGetEmployee() {
+ return new GetEmployee();
+ }
+
+ /**
+ * Create an instance of {@link DeleteEmployee }
+ *
+ */
+ public DeleteEmployee createDeleteEmployee() {
+ return new DeleteEmployee();
+ }
+
+ /**
+ * Create an instance of {@link UpdateEmployeeResponse }
+ *
+ */
+ public UpdateEmployeeResponse createUpdateEmployeeResponse() {
+ return new UpdateEmployeeResponse();
+ }
+
+ /**
+ * Create an instance of {@link AddEmployee }
+ *
+ */
+ public AddEmployee createAddEmployee() {
+ return new AddEmployee();
+ }
+
+ /**
+ * Create an instance of {@link GetAllEmployees }
+ *
+ */
+ public GetAllEmployees createGetAllEmployees() {
+ return new GetAllEmployees();
+ }
+
+ /**
+ * Create an instance of {@link Employee }
+ *
+ */
+ public Employee createEmployee() {
+ return new Employee();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddEmployeeResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://bottomup.server.jaxws.baeldung.com/", name = "addEmployeeResponse")
+ public JAXBElement Java class for updateEmployee complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * Java class for updateEmployeeResponse complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _CountEmployeesResponse_QNAME = new QName("http://topdown.server.jaxws.baeldung.com/", "countEmployeesResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.baeldung.jaxws.server.topdown
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://topdown.server.jaxws.baeldung.com/", name = "countEmployeesResponse")
+ public JAXBElement
+ * <complexType name="getEmployee">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getEmployee", propOrder = {
+ "arg0"
+})
+public class GetEmployee {
+
+ protected int arg0;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/GetEmployeeResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/GetEmployeeResponse.java
new file mode 100644
index 0000000000..6926c8a6f6
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/GetEmployeeResponse.java
@@ -0,0 +1,62 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ * <complexType name="getEmployeeResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://bottomup.server.jaxws.baeldung.com/}employee" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getEmployeeResponse", propOrder = {
+ "_return"
+})
+public class GetEmployeeResponse {
+
+ @XmlElement(name = "return")
+ protected Employee _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link Employee }
+ *
+ */
+ public Employee getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Employee }
+ *
+ */
+ public void setReturn(Employee value) {
+ this._return = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/ObjectFactory.java b/jee7/src/main/java/com/baeldung/jaxws/client/ObjectFactory.java
new file mode 100644
index 0000000000..a16ae2567b
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/ObjectFactory.java
@@ -0,0 +1,295 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.baeldung.jaxws.client package.
+ *
+ * <complexType name="updateEmployee">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "updateEmployee", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class UpdateEmployee {
+
+ protected int arg0;
+ protected String arg1;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the arg1 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getArg1() {
+ return arg1;
+ }
+
+ /**
+ * Sets the value of the arg1 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setArg1(String value) {
+ this.arg1 = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/UpdateEmployeeResponse.java b/jee7/src/main/java/com/baeldung/jaxws/client/UpdateEmployeeResponse.java
new file mode 100644
index 0000000000..56119c6546
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/UpdateEmployeeResponse.java
@@ -0,0 +1,62 @@
+
+package com.baeldung.jaxws.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ * <complexType name="updateEmployeeResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://bottomup.server.jaxws.baeldung.com/}employee" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "updateEmployeeResponse", propOrder = {
+ "_return"
+})
+public class UpdateEmployeeResponse {
+
+ @XmlElement(name = "return")
+ protected Employee _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link Employee }
+ *
+ */
+ public Employee getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Employee }
+ *
+ */
+ public void setReturn(Employee value) {
+ this._return = value;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/client/package-info.java b/jee7/src/main/java/com/baeldung/jaxws/client/package-info.java
new file mode 100644
index 0000000000..c264b876f9
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/client/package-info.java
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://bottomup.server.jaxws.baeldung.com/")
+package com.baeldung.jaxws.client;
diff --git a/jee7/src/main/java/com/baeldung/jaxws/config/EmployeeServicePublisher.java b/jee7/src/main/java/com/baeldung/jaxws/config/EmployeeServicePublisher.java
deleted file mode 100644
index ac3b049320..0000000000
--- a/jee7/src/main/java/com/baeldung/jaxws/config/EmployeeServicePublisher.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.baeldung.jaxws.config;
-
-import javax.xml.ws.Endpoint;
-
-import com.baeldung.jaxws.EmployeeServiceImpl;
-
-public class EmployeeServicePublisher {
-
- public static void main(String[] args) {
- Endpoint.publish("http://localhost:8080/employeeservice", new EmployeeServiceImpl());
- }
-}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/EmployeeService.java b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeService.java
similarity index 69%
rename from jee7/src/main/java/com/baeldung/jaxws/EmployeeService.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeService.java
index 9735607da6..7381e58dad 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/EmployeeService.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeService.java
@@ -1,13 +1,13 @@
-package com.baeldung.jaxws;
+package com.baeldung.jaxws.server.bottomup;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
-import com.baeldung.jaxws.exception.EmployeeAlreadyExists;
-import com.baeldung.jaxws.exception.EmployeeNotFound;
-import com.baeldung.jaxws.model.Employee;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeAlreadyExists;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeNotFound;
+import com.baeldung.jaxws.server.bottomup.model.Employee;
@WebService
public interface EmployeeService {
diff --git a/jee7/src/main/java/com/baeldung/jaxws/EmployeeServiceImpl.java b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeServiceImpl.java
similarity index 76%
rename from jee7/src/main/java/com/baeldung/jaxws/EmployeeServiceImpl.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeServiceImpl.java
index c1c9cd4385..602a2f7336 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/EmployeeServiceImpl.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/EmployeeServiceImpl.java
@@ -1,4 +1,4 @@
-package com.baeldung.jaxws;
+package com.baeldung.jaxws.server.bottomup;
import java.util.List;
@@ -6,12 +6,12 @@ import javax.inject.Inject;
import javax.jws.WebMethod;
import javax.jws.WebService;
-import com.baeldung.jaxws.exception.EmployeeAlreadyExists;
-import com.baeldung.jaxws.exception.EmployeeNotFound;
-import com.baeldung.jaxws.model.Employee;
-import com.baeldung.jaxws.repository.EmployeeRepository;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeAlreadyExists;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeNotFound;
+import com.baeldung.jaxws.server.bottomup.model.Employee;
+import com.baeldung.jaxws.server.repository.EmployeeRepository;
-@WebService(serviceName = "EmployeeService", endpointInterface = "com.baeldung.jaxws.EmployeeService")
+@WebService(serviceName = "EmployeeService", endpointInterface = "com.baeldung.jaxws.server.bottomup.EmployeeService")
public class EmployeeServiceImpl implements EmployeeService {
@Inject
diff --git a/jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeAlreadyExists.java b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeAlreadyExists.java
similarity index 83%
rename from jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeAlreadyExists.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeAlreadyExists.java
index 8a96f8aec0..26fd80f1e5 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeAlreadyExists.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeAlreadyExists.java
@@ -1,4 +1,4 @@
-package com.baeldung.jaxws.exception;
+package com.baeldung.jaxws.server.bottomup.exception;
import javax.xml.ws.WebFault;
diff --git a/jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeNotFound.java b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeNotFound.java
similarity index 82%
rename from jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeNotFound.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeNotFound.java
index 3de2ca8db6..52397d55a3 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/exception/EmployeeNotFound.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/exception/EmployeeNotFound.java
@@ -1,4 +1,4 @@
-package com.baeldung.jaxws.exception;
+package com.baeldung.jaxws.server.bottomup.exception;
import javax.xml.ws.WebFault;
diff --git a/jee7/src/main/java/com/baeldung/jaxws/model/Employee.java b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/model/Employee.java
similarity index 90%
rename from jee7/src/main/java/com/baeldung/jaxws/model/Employee.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/bottomup/model/Employee.java
index dbbdc234cf..089ff88aa2 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/model/Employee.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/bottomup/model/Employee.java
@@ -1,4 +1,4 @@
-package com.baeldung.jaxws.model;
+package com.baeldung.jaxws.server.bottomup.model;
public class Employee {
private int id;
diff --git a/jee7/src/main/java/com/baeldung/jaxws/server/config/EmployeeServicePublisher.java b/jee7/src/main/java/com/baeldung/jaxws/server/config/EmployeeServicePublisher.java
new file mode 100644
index 0000000000..8659833f99
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/config/EmployeeServicePublisher.java
@@ -0,0 +1,14 @@
+package com.baeldung.jaxws.server.config;
+
+import javax.xml.ws.Endpoint;
+
+import com.baeldung.jaxws.server.bottomup.EmployeeServiceImpl;
+import com.baeldung.jaxws.server.topdown.EmployeeServiceTopDownImpl;
+
+public class EmployeeServicePublisher {
+
+ public static void main(String[] args) {
+ Endpoint.publish("http://localhost:8080/employeeservicetopdown", new EmployeeServiceTopDownImpl());
+ Endpoint.publish("http://localhost:8080/employeeservice", new EmployeeServiceImpl());
+ }
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepository.java b/jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepository.java
similarity index 61%
rename from jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepository.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepository.java
index 0d5dec0462..c9d8b4d33c 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepository.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepository.java
@@ -1,10 +1,10 @@
-package com.baeldung.jaxws.repository;
+package com.baeldung.jaxws.server.repository;
import java.util.List;
-import com.baeldung.jaxws.exception.EmployeeAlreadyExists;
-import com.baeldung.jaxws.exception.EmployeeNotFound;
-import com.baeldung.jaxws.model.Employee;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeAlreadyExists;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeNotFound;
+import com.baeldung.jaxws.server.bottomup.model.Employee;
public interface EmployeeRepository {
diff --git a/jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepositoryImpl.java b/jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepositoryImpl.java
similarity index 87%
rename from jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepositoryImpl.java
rename to jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepositoryImpl.java
index f67509fff5..f211c4f25b 100644
--- a/jee7/src/main/java/com/baeldung/jaxws/repository/EmployeeRepositoryImpl.java
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/repository/EmployeeRepositoryImpl.java
@@ -1,11 +1,11 @@
-package com.baeldung.jaxws.repository;
+package com.baeldung.jaxws.server.repository;
import java.util.ArrayList;
import java.util.List;
-import com.baeldung.jaxws.exception.EmployeeAlreadyExists;
-import com.baeldung.jaxws.exception.EmployeeNotFound;
-import com.baeldung.jaxws.model.Employee;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeAlreadyExists;
+import com.baeldung.jaxws.server.bottomup.exception.EmployeeNotFound;
+import com.baeldung.jaxws.server.bottomup.model.Employee;
public class EmployeeRepositoryImpl implements EmployeeRepository {
private Listfeatures parameter will have their default values.
+ * @return
+ * returns EmployeeServiceTopDown
+ */
+ @WebEndpoint(name = "EmployeeServiceTopDownSOAP")
+ public EmployeeServiceTopDown getEmployeeServiceTopDownSOAP(WebServiceFeature... features) {
+ return super.getPort(new QName("http://topdown.server.jaxws.baeldung.com/", "EmployeeServiceTopDownSOAP"), EmployeeServiceTopDown.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (EMPLOYEESERVICETOPDOWN_EXCEPTION!= null) {
+ throw EMPLOYEESERVICETOPDOWN_EXCEPTION;
+ }
+ return EMPLOYEESERVICETOPDOWN_WSDL_LOCATION;
+ }
+
+}
diff --git a/jee7/src/main/java/com/baeldung/jaxws/server/topdown/ObjectFactory.java b/jee7/src/main/java/com/baeldung/jaxws/server/topdown/ObjectFactory.java
new file mode 100644
index 0000000000..53e23eee5d
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/jaxws/server/topdown/ObjectFactory.java
@@ -0,0 +1,45 @@
+
+package com.baeldung.jaxws.server.topdown;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.baeldung.jaxws.server.topdown package.
+ * @Ignore to see how failed test can be reflected in Serenity report.
+ * Remember to add <testFailureIgnore>true</testFailureIgnore> under maven-surefire-plugin configuration.
+ */
+ @Test
+ @Ignore
+ @Title("Members with 500 points should have a Gold status when added 4,000 points ($40,000)")
+ public void memberWith500PointsEarnsGoldAfterSpends$40000(){
+ memberSteps.aMemberHasPointsOf(500);
+ memberSteps.theMemberSpends(40_000);
+ memberSteps.theMemberShouldHaveAStatusOf(Gold);
+ }
+
+ @Test
+ @Ignore
+ @Title("Members with 100 points would have a Gold status when added 10,000 points ($100,000)")
+ public void memberWith100EarnsGoldAfterSpends$100000(){
+ memberSteps.aMemberHasPointsOf(100);
+ memberSteps.theMemberSpends(100_000);
+ memberSteps.theMemberShouldHaveAStatusOf(Gold);
+ }
+
+}
diff --git a/libraries/src/test/java/com/baeldung/serenity/github/GithubRestAssuredUserAPISteps.java b/libraries/src/test/java/com/baeldung/serenity/github/GithubRestAssuredUserAPISteps.java
new file mode 100644
index 0000000000..cc434d6d19
--- /dev/null
+++ b/libraries/src/test/java/com/baeldung/serenity/github/GithubRestAssuredUserAPISteps.java
@@ -0,0 +1,33 @@
+package com.baeldung.serenity.github;
+
+import net.thucydides.core.annotations.Step;
+import org.hamcrest.Matchers;
+
+import java.io.IOException;
+
+import static net.serenitybdd.rest.SerenityRest.rest;
+import static net.serenitybdd.rest.SerenityRest.then;
+
+/**
+ * @author aiet
+ */
+public class GithubRestAssuredUserAPISteps {
+
+ private String api;
+
+ @Step("Given the github REST API for user profile")
+ public void withUserProfileAPIEndpoint() {
+ api = "https://api.github.com/users/{username}";
+ }
+
+ @Step("When looking for {0} via the api")
+ public void getProfileOfUser(String username) throws IOException {
+ rest().get(api, username);
+ }
+
+ @Step("Then there should be a login field with value {0} in payload of user {0}")
+ public void profilePayloadShouldContainLoginValue(String username) {
+ then().body("login", Matchers.equalTo(username));
+ }
+
+}
diff --git a/libraries/src/test/java/com/baeldung/serenity/github/GithubRestUserAPISteps.java b/libraries/src/test/java/com/baeldung/serenity/github/GithubRestUserAPISteps.java
new file mode 100644
index 0000000000..6e7fbace49
--- /dev/null
+++ b/libraries/src/test/java/com/baeldung/serenity/github/GithubRestUserAPISteps.java
@@ -0,0 +1,54 @@
+package com.baeldung.serenity.github;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import net.thucydides.core.annotations.Step;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.hamcrest.Matchers;
+
+import java.io.IOException;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * @author aiet
+ */
+public class GithubRestUserAPISteps {
+
+ private String api;
+ private GitHubUser resource;
+
+ @Step("Given the github REST API for user profile")
+ public void withUserProfileAPIEndpoint() {
+ api = "https://api.github.com/users/%s";
+ }
+
+ @Step("When looking for {0} via the api")
+ public void getProfileOfUser(String username) throws IOException {
+ HttpResponse httpResponse = getGithubUserProfile(api, username);
+ resource = retrieveResourceFromResponse(httpResponse, GitHubUser.class);
+ }
+
+ @Step("Then there should be a login field with value {0} in payload of user {0}")
+ public void profilePayloadShouldContainLoginValue(String username) {
+ assertThat(username, Matchers.is(resource.getLogin()));
+ }
+
+ private static