adriani.webapp.jaxws
Class SimpleJAXWS
java.lang.Object
adriani.webapp.jaxws.SimpleJAXWS
public class SimpleJAXWS
- extends java.lang.Object
A simple web service created using the JAX-WS annotations approach, based on the Java5 features.
This class is defined using the @WebService
annotation before the class definition, and
@WebMethod
annotation before the each method to be offered by the web service.
Notice that it's necessary to import the packages of the annotations, since the annotations used here
are not default Java annotations, i.e. they are not distributed with the default JDK enviroment.
For the same reason, it could be necessary to include the axis2-jaxws
library
(for example axis2-jaxws-1.5.4.jar
) in the compile classpath to succesfully compile this class.
Method Summary |
double |
add(double x,
double y)
SECOND METHOD: a simple double calculation method |
java.lang.String |
echo(java.lang.String input)
FIRST METHOD: a simple "echo" method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleJAXWS
public SimpleJAXWS()
echo
public java.lang.String echo(java.lang.String input)
- FIRST METHOD: a simple "echo" method
- Parameters:
input
- a string
- Returns:
- the echoed input string, for example "SimpleJAX-WS input"
add
public double add(double x,
double y)
- SECOND METHOD: a simple double calculation method
- Parameters:
x
- a double valuey
- a double value
- Returns:
- the sum of the two input double values
Morpheus Quality Technologies - making the Zion software
Copyright © 2009-2013 Stefano Adriani. All Rights Reserved