Web Services is created in different ways, depending on whether the starting point of development is a Java source file, a Java class file, or a WSDL file.
Use different tools is used to generate JAX-WS artifacts, depending on whether the starting point of Web Services development is a Java source file, a Java class file, or a WSDL file.
apt— The Annotation Processing Tool (APT) tool is part of Java SE 5. It programmatically processes the annotations and generates the JAX-WS portable artifacts from an annotated Java source file.
wsgen- The wsgen tool reads a service endpoint implementation class and generates all of the portable artifacts for a JAX-WS web service.
wsimport- The wsimport tool reads a WSDL and generates all the required artifacts for web service development, deployment, and invocation.
After using the tools, the web.xml, sun-jaxws.xml, the implementation class, and the portable JAX-WS artifacts must be bundled into a WAR that can be deployed onto a container.
The following procedures describes how to use these methods.
Use apt to generate Java artifacts such as the WSDL file, andschema documents.
Package the web.xml, sun-jaxws.xml, service endpoint interface and implementation class, value types, and generated classes, if any, into a WAR file.
Deploy the WAR file to Web Server.
Use wsgen to generate portable artifacts.
Package the web.xml, sun-jaxws.xml, service endpoint interface and implementation class, value types, and generated classes, if any, into a WAR file.
Deploy the WAR file to Web Server.