include::../shared-doc/attributes.adoc[]

= jaxws-pojo: An POJO JAX-WS Web Service
:author: R Searls
:level: Beginner
:technologies: JAX-WS

[abstract]
The `jaxws-pojo` quickstart is a working example of the web service endpoint created from a POJO.

:standalone-server-type: default
:archiveType: jar
// Override the archive directory
:archiveDir: {artifactId}/service/target
// Override the archive name
:archiveName: {artifactId}-service

== What is it?

The `jaxws-pojo` quickstart demonstrates the use of _JAX-WS_ in {productNameFull} as a simple POJO web service application.

// System Requirements
include::../shared-doc/system-requirements.adoc[leveloffset=+1]
// Use of {jbossHomeName}
include::../shared-doc/use-of-jboss-home-name.adoc[leveloffset=+1]
// Start the {productName} Standalone Server
include::../shared-doc/start-the-standalone-server.adoc[leveloffset=+1]
// Install the Quickstart Parent Artifact in Maven
include::../shared-doc/install-quickstart-parent-artifact.adoc[leveloffset=+1]
// Build and Deploy the Quickstart
include::../shared-doc/build-and-deploy-the-quickstart.adoc[leveloffset=+1]

== Access the Application

You can check that the Web Service is running and deployed correctly by accessing the following URL: http://localhost:8080/jaxws-pojo-endpoint/JSEBean?wsdl. This URL will display the deployed WSDL endpoint for the Web Service.

== Run the Client

. Make sure you xref:install_the_quickstart_parent_artifact_in_maven[Install the Quickstart Parent Artifact in Maven].

. Verify that the service is deployed properly.

. Open a terminal and navigate into the client directory of this quickstart.
+
[source,options="nowrap"]
----
$ cd client/
----

. Type this command to run the client.
+
[source,options="nowrap"]
----
$ mvn exec:java
----

. You should see the following response.
+
[source,options="nowrap"]
----
JSEBean pojo: pojoClient calling
----

// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]
// Run the Quickstart in Red Hat Developer Studio or Eclipse
include::../shared-doc/run-the-quickstart-in-jboss-developer-studio.adoc[leveloffset=+1]

// Additional Red Hat Developer Studio instructions
For this quickstart, follow the special instructions to link:{useEclipseDeployJavaClientDocUrl}[Deploy and Undeploy a Quickstart Containing Server and Java Client Projects]

. To build all of the artifacts, right-click on the *{artifactId}* parent project, and choose *Run As* –> *Maven install*.
. To deploy the service:
** Right-click on the *{artifactId}-service* subproject, and choose *Run As* –> *Run on Server*.
** Choose the server and click *Finish*.
** This starts the server and deploys the service to the server.
. To access the application:
** Right-click on the *{artifactId}-client* subproject and choose *Run As* –> *Java Application*.
** Choose the *Client* class and click *OK*.
** You should see the following message in the *Console* tab:
+
[source,options="nowrap"]
----
JSEBean pojo: pojoClient calling
----

. To undeploy the project, right-click on the *{artifactId}* parent project and choose *Run As* –> *Maven build*. Enter `wildfly:undeploy` for the *Goals* and click *Run*.

// Debug the Application
include::../shared-doc/debug-the-application.adoc[leveloffset=+1]
