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


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">