Sun Java System Web Server 7.0 Update 6 Developer's Guide to Java Web Applications

Creating Web Services

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.

Web Services Tools

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.


Note –

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.

ProcedureTo Create Web Services from a Java Source

  1. Use apt to generate Java artifacts such as the WSDL file, and schema documents.

  2. Package the web.xml, sun-jaxws.xml, service endpoint interface and implementation class, value types, and generated classes, if any, into a WAR file.

  3. Deploy the WAR file to Web Server.

ProcedureTo Create Web Services from Java Classes

  1. Use wsgen to generate portable artifacts.

  2. Package the web.xml, sun-jaxws.xml, service endpoint interface and implementation class, value types, and generated classes, if any, into a WAR file.

  3. Deploy the WAR file to Web Server.

ProcedureTo Create Web Services from a WSDL file

  1. Use wsimport to generate portable artifacts.

  2. Implement the service endpoint.

  3. Package the WSDL file, schema documents, web.xml, sun-jaxws.xml, service endpoint interface and implementation class, value types, and generated classes, if any, into a WAR file.

  4. Deploy the WAR file to a web container.