For me, the easiest way to open a web service is to create an EJB with annotations (JAX-WS) if you are using a Java EE server, such as JBoss.
WS consumption is a little different, but I prefer JAX-WS because Axis2 throws exceptions if you use complex parameters (classes) and add an attribute. JAX-WS instead calls each "get" and "set" for serialized xml. If "set" is not implemented, there is no problem. This is an advantage for backward compatibility.
source share