diff --git a/jee7/pom.xml b/jee7/pom.xml
index e398651055..8ed6eee6be 100644
--- a/jee7/pom.xml
+++ b/jee7/pom.xml
@@ -171,6 +171,7 @@
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.
+ *
+ *
+ * <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/test/java/com/baeldung/jaxws/EmployeeServiceLiveTest.java b/jee7/src/test/java/com/baeldung/jaxws/EmployeeServiceLiveTest.java
index 4429703468..5663db712e 100644
--- a/jee7/src/test/java/com/baeldung/jaxws/EmployeeServiceLiveTest.java
+++ b/jee7/src/test/java/com/baeldung/jaxws/EmployeeServiceLiveTest.java
@@ -1,4 +1,4 @@
-/*package com.baeldung.jaxws;
+package com.baeldung.jaxws;
import static org.junit.Assert.assertEquals;
@@ -7,7 +7,6 @@ import java.net.URL;
import java.util.List;
import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
@@ -19,17 +18,18 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-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.client.Employee;
+import com.baeldung.jaxws.client.EmployeeAlreadyExists_Exception;
+import com.baeldung.jaxws.client.EmployeeNotFound_Exception;
+import com.baeldung.jaxws.client.EmployeeService;
+import com.baeldung.jaxws.client.EmployeeService_Service;
@RunWith(Arquillian.class)
public class EmployeeServiceLiveTest {
private static final String APP_NAME = "jee7";
private static final String WSDL_PATH = "EmployeeService?wsdl";
- private static QName SERVICE_NAME = new QName("http://jaxws.baeldung.com/", "EmployeeService");
+ private static QName SERVICE_NAME = new QName("http://bottomup.server.jaxws.baeldung.com/", "EmployeeService");
private static URL wsdlUrl;
@ArquillianResource
@@ -39,8 +39,12 @@ public class EmployeeServiceLiveTest {
@Deployment(testable = false)
public static WebArchive createDeployment() {
- return ShrinkWrap.create(WebArchive.class, APP_NAME + ".war").addPackage(EmployeeService.class.getPackage()).addPackage(Employee.class.getPackage()).addPackage(EmployeeNotFound.class.getPackage()).addPackage(EmployeeRepository.class.getPackage())
- .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+ return ShrinkWrap.create(WebArchive.class, APP_NAME + ".war")
+ .addPackage(com.baeldung.jaxws.server.bottomup.EmployeeService.class.getPackage())
+ .addPackage(com.baeldung.jaxws.server.bottomup.model.Employee.class.getPackage())
+ .addPackage(com.baeldung.jaxws.server.bottomup.exception.EmployeeNotFound.class.getPackage())
+ .addPackage(com.baeldung.jaxws.server.repository.EmployeeRepository.class.getPackage())
+ .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Before
@@ -51,8 +55,8 @@ public class EmployeeServiceLiveTest {
e.printStackTrace();
}
- Service service = Service.create(wsdlUrl, SERVICE_NAME);
- employeeServiceProxy = service.getPort(EmployeeService.class);
+ EmployeeService_Service employeeService_Service = new EmployeeService_Service(wsdlUrl);
+ employeeServiceProxy = employeeService_Service.getEmployeeServiceImplPort();
}
@Test
@@ -63,49 +67,48 @@ public class EmployeeServiceLiveTest {
}
@Test
- public void givenEmployees_whenGetAvailableEmployee_thenCorrectEmployeeReturned() throws EmployeeNotFound {
+ public void givenEmployees_whenGetAvailableEmployee_thenCorrectEmployeeReturned() throws EmployeeNotFound_Exception {
Employee employee = employeeServiceProxy.getEmployee(2);
assertEquals(employee.getFirstName(), "Jack");
}
- @Test(expected = EmployeeNotFound.class)
- public void givenEmployees_whenGetNonAvailableEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound {
+ @Test(expected = EmployeeNotFound_Exception.class)
+ public void givenEmployees_whenGetNonAvailableEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound_Exception {
employeeServiceProxy.getEmployee(20);
}
@Test
- public void givenEmployees_whenAddNewEmployee_thenEmployeeCountIncreased() throws EmployeeAlreadyExists {
+ public void givenEmployees_whenAddNewEmployee_thenEmployeeCountIncreased() throws EmployeeAlreadyExists_Exception {
int employeeCount = employeeServiceProxy.countEmployees();
employeeServiceProxy.addEmployee(4, "Anna");
assertEquals(employeeServiceProxy.countEmployees(), employeeCount + 1);
}
- @Test(expected = EmployeeAlreadyExists.class)
- public void givenEmployees_whenAddAlreadyExistingEmployee_thenEmployeeAlreadyExistsException() throws EmployeeAlreadyExists {
+ @Test(expected = EmployeeAlreadyExists_Exception.class)
+ public void givenEmployees_whenAddAlreadyExistingEmployee_thenEmployeeAlreadyExistsException() throws EmployeeAlreadyExists_Exception {
employeeServiceProxy.addEmployee(1, "Anna");
}
@Test
- public void givenEmployees_whenUpdateExistingEmployee_thenUpdatedEmployeeReturned() throws EmployeeNotFound {
+ public void givenEmployees_whenUpdateExistingEmployee_thenUpdatedEmployeeReturned() throws EmployeeNotFound_Exception {
Employee updated = employeeServiceProxy.updateEmployee(1, "Joan");
assertEquals(updated.getFirstName(), "Joan");
}
- @Test(expected = EmployeeNotFound.class)
- public void givenEmployees_whenUpdateNonExistingEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound {
+ @Test(expected = EmployeeNotFound_Exception.class)
+ public void givenEmployees_whenUpdateNonExistingEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound_Exception {
employeeServiceProxy.updateEmployee(20, "Joan");
}
@Test
- public void givenEmployees_whenDeleteExistingEmployee_thenSuccessReturned() throws EmployeeNotFound {
+ public void givenEmployees_whenDeleteExistingEmployee_thenSuccessReturned() throws EmployeeNotFound_Exception {
boolean deleteEmployee = employeeServiceProxy.deleteEmployee(3);
assertEquals(deleteEmployee, true);
}
- @Test(expected = EmployeeNotFound.class)
- public void givenEmployee_whenDeleteNonExistingEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound {
+ @Test(expected = EmployeeNotFound_Exception.class)
+ public void givenEmployee_whenDeleteNonExistingEmployee_thenEmployeeNotFoundException() throws EmployeeNotFound_Exception {
employeeServiceProxy.deleteEmployee(20);
}
}
-*/
\ No newline at end of file