Test webapp

adriani.webapp.services
Class SimpleJava

java.lang.Object
  extended by adriani.webapp.services.SimpleJava

public class SimpleJava
extends java.lang.Object

Very simple web service written in the "old java model", i.e. using just one Java Class to offer the service (a Plain Old Java Object).


Constructor Summary
SimpleJava()
           
 
Method Summary
 int getValue(java.lang.String key)
          Return the value specified by the input key.
 void setValue(java.lang.String key, int value)
          Insert a new value in the inner HashMap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleJava

public SimpleJava()
Method Detail

getValue

public int getValue(java.lang.String key)
Return the value specified by the input key. If no key is found returns -1.

Remark: the actual name of the input parameter should be defined by the WSDL file. For example, if the WSDL file contains the following definition for getValue:

<xs:element minOccurs="0" name="param0" nillable="true" type="xs:string"/>

Hence the HTTP call must use a parameter named param0, e.g. /getvalue?param0=foo. For the same reason, a SOAP call must specify an input XML element named <param0>.

Parameters:
key - the input key (as a String)
Returns:
the integer value bound to the input key

setValue

public void setValue(java.lang.String key,
                     int value)
Insert a new value in the inner HashMap. After this call, the pair key-value will be available calling the getValue method.

Parameters:
key - the input key (as a String)
value - the input value (as an integer)

Build 10/01/2013

Morpheus Quality Technologies - making the Zion software
Copyright © 2009-2013 Stefano Adriani. All Rights Reserved