You are new to web services and want to assemble the pieces you need to create a deployment.
There are three options here. You can:
is the simplest option because you do not need to create a
deployable artifact such as a WAR or an EAR. The Endpoint API takes care of that for you, and makes the
service available in the HTTP server built-in to Java SE 6. It is
suitable for testing, or if you want to allow the creation and
publication of a service at runtime.
Write a servlet decorated with the JAX-WS annotation
publish it in a WAR. Include a WSDL and schemas, or allow Glassfish
to generate them for you at deployment time according to the values
in your annotations. Structure your WAR just as you would to deploy
a regular web application. You must include all of the regular WAR
descriptors such as web.xml.
Write a stateless session EJB decorated with the JAX-WS
@WebService and publish it in an
EAR. Structure your EAR just as you would to deploy a regular
There are some options within each of these three basic choices as well, discussed in the following sections.
You can use the SAAJ
@Provider annotation on your
service instead of the
@WebService annotation. This gives
you the ability to examine incoming and outgoing messages at the raw
XML level, and in this way
Provider is the