Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can follow Oracle’s Java EE 7 tutorial to understand how a simple Java SOAP service is structured, but its JDK-tool workflow is legacy: JDK 11 removed the bundled JAX-WS APIs and commands such as wsimport. The example below explains the endpoint, WSDL, and historical build-and-deploy sequence; it is not a verified setup recipe for current JDKs.

How a Java SOAP service works

SOAP messages are XML exchanged over HTTP. With JAX-WS, a Java class defines service operations, while the JAX-WS runtime maps requests and responses between SOAP messages and Java method calls. WSDL describes the service, including its endpoints and messages. Oracle’s Java EE 7 JAX-WS tutorial documents this programming model.

Define the endpoint in the legacy example

In Oracle’s Java EE 7 example, a class annotated with javax.jws.WebService serves as the endpoint implementation. An explicit service endpoint interface is optional. A public operation such as sayHello(name) can be marked with @WebMethod; its parameters and return type need to be compatible with JAXB so they can be represented in XML.

Conceptually, the operation accepts a name and returns a greeting. The annotation-based Java class is the service definition; the runtime handles translating calls to and from SOAP. The example uses the older javax.* namespace, so do not assume it compiles unchanged with a modern JDK or a different JAX-WS stack.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Java EE 7 tutorial’s build-and-deploy sequence

The tutorial describes a deployment workflow using a WAR and GlassFish, followed by generation of client artifacts from the deployed service’s WSDL. It is useful as a map of the stages, not as current-version setup instructions.

  1. Write and compile the endpoint. Implement the service class, annotate it with @WebService, and expose the intended operation with @WebMethod.
  2. Package it as a WAR. The tutorial’s service is packaged for deployment in a Java EE application server.
  3. Deploy to GlassFish. The server hosts the endpoint and makes its WSDL available.
  4. Generate client artifacts from the WSDL. The tutorial uses the wsimport Maven goal to create client-side classes and a proxy.
  5. Compile and run the client. The client uses the generated proxy to call the remote operation; the runtime handles SOAP message exchange.

That sequence illustrates how service implementation, server deployment, WSDL, generated client code, and invocation fit together. It does not establish that the same commands, plugin configuration, or server versions work with a current JDK.

Why the JDK version changes the instructions

Oracle’s Java SE 21 migration guide, “Removed Tools and Components”, records that JDK 11 removed the java.xml.ws module, which included JAX-WS and SAAJ, as well as related annotation support. The JDK’s web-service tools—including wsgen, wsimport, schemagen, and xjc—were removed too. Code that depended on these APIs or tools may therefore fail to compile or load unless its build and deployment environment is changed.

Oracle’s migration documentation says, “You can download JAXB and JAX-WS from Maven.” That establishes that the APIs are available outside the JDK; it does not identify a tested set of present-day dependency coordinates, build plugins, runtime, or server configuration for this tutorial.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose a workflow before writing commands

Situation What the sources establish What to verify
Following the Java EE 7 example The tutorial uses the javax.* API style, packages the service as a WAR, deploys it to GlassFish, and generates client artifacts from WSDL using the wsimport Maven goal. Use the tutorial as a legacy pattern reference; confirm that your chosen JDK and environment support its APIs and tools.
Using JDK 11 or later Oracle documents that the JAX-WS and related APIs and JDK web-service tools are no longer bundled beginning with JDK 11. Oracle notes that JAXB and JAX-WS can be downloaded from Maven. Select and verify compatible APIs, implementation, build plugins, and server for your project. The cited sources do not provide a current, tested combination or a standalone JDK-only server.
Generating a client only The tutorial demonstrates generating client artifacts from a service’s WSDL with the wsimport Maven goal. Check whether the tool and plugin you select are available for your JDK and chosen JAX-WS distribution; the old tutorial does not establish a current command line.

Oracle’s JDK 11 significant changes documentation also notes that JAXB and JAX-WS are no longer bundled. Before adapting the example, identify your JDK version, the JAX-WS implementation and API namespace it uses, the client-generation plugin or tool, and the application server version. Do not treat “using JDK tools” as a guarantee that a modern JDK ships a SOAP stack.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.