Create a simple Web Service

This code example shows how to create a simple web service. We use the annotation @WebService to declare the class as a such.
The annotation @WebMethod is provided at method level to declare it as an operation for the web service.
The operation getTime of the JavadbWebService simply returns the current time.

The result of a call to the operation getTime produces something like this:

This is the SOAP request and response to the web service:

Search for more Java info on this site here:
Custom Search

Any thoughts or questions?