View Javadoc

1   /*
2    * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
3    * the spring framework, http://el4j.sf.net
4    * Copyright (C) 2005 by ELCA Informatique SA, Av. de la Harpe 22-24,
5    * 1000 Lausanne, Switzerland, http://www.elca.ch
6    *
7    * EL4J is published under the GNU Lesser General Public License (LGPL)
8    * Version 2.1. See http://www.gnu.org/licenses/
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   * GNU Lesser General Public License for more details.
14   *
15   * For alternative licensing, please contact info@elca.ch
16   */
17  
18  package ch.elca.el4j.tests.remoting.jaxws.service;
19  
20  import javax.jws.WebMethod;
21  import javax.jws.WebService;
22  
23  
24  /**
25   * This interface is a calculator.
26   *
27   * @svnLink $Revision: 3873 $;$Date: 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/tests/remoting_jaxws/jar-wsgen/src/main/java/ch/elca/el4j/tests/remoting/jaxws/service/Calculator.java $
28   *
29   * @author Martin Zeltner (MZE)
30   */
31  @WebService(name = "CalculatorPortType",
32  	targetNamespace = "http://webservice.jaxws.remoting.tests.el4j.elca.ch/")
33  public interface Calculator {
34  	/**
35  	 * This method calculates the area of a rectangle.
36  	 *
37  	 * @param a
38  	 *            Is the first side.
39  	 * @param b
40  	 *            Is the second side.
41  	 * @return Returns the area of the triangle.
42  	 */
43  	@WebMethod
44  	public double getArea(double a, double b);
45  	
46  	/**
47  	 * This method throws an exception for test reason.
48  	 *
49  	 * @throws CalculatorException will be thrown every time.
50  	 */
51  	@WebMethod
52  	public void throwMeAnException() throws CalculatorException;
53  	
54  	/**
55  	 * This method throws a special exception for test reason.
56  	 *
57  	 * @param action Is the dynamic part of the thrown exception.
58  	 * @throws SpecialCalculatorException will be thrown every time.
59  	 */
60  	public void throwMeASpecialException(String action)
61  		throws SpecialCalculatorException;
62  
63  	/**
64  	 * This method counts all uppercase letters of a text.
65  	 *
66  	 * @param text Is the object to analyze.
67  	 * @return Returns the number of uppercase letters.
68  	 */
69  	@WebMethod
70  	public int countNumberOfUppercaseLetters(String text);
71  	
72  	/**
73  	 * This method does an echo of the given object.
74  	 *
75  	 * @param o Is the object to echo.
76  	 * @return Returns the received object.
77  	 */
78  	@WebMethod
79  	public CalculatorValueObject echoValueObject(CalculatorValueObject o);
80  }