soap tutorial

adriani.jws.template.wrappers
Class WrapperInformationIn

java.lang.Object
  extended by adriani.jws.template.wrappers.Wrapper
      extended by adriani.jws.template.wrappers.WrapperIn
          extended by adriani.jws.template.wrappers.WrapperInformationIn

public class WrapperInformationIn
extends WrapperIn

The class wrapping the ADBBean elements containing the input SOAP request for the getInformation() method.


Field Summary
protected  java.math.BigInteger customer
          Wrapped input value, used to store the SOAP input request value after validation.
protected  java.lang.StringBuffer number
          Wrapped input value, used to store the SOAP input request value after validation.
 
Fields inherited from class adriani.jws.template.wrappers.WrapperIn
BLANK, DOT, element, EMPTY, leadingName, NO_NUMBER, NOT_A_NUMBER, NOT_AVAILABLE
 
Fields inherited from class adriani.jws.template.wrappers.Wrapper
logger, NOT_BIG_INTEGER, UNDEFINED
 
Constructor Summary
WrapperInformationIn()
          Constructor used by the SimpleClient to test the service (empty).
WrapperInformationIn(User user)
          Constructor used by the actual web service logic, used to set the wrapper's class fields reading the values from the ADBBean element of the input SOAP request.
 
Method Summary
 java.lang.String arrayToString()
          Serialize all the data contained by this wrapper as a String object.
 java.lang.StringBuffer getCommand()
          Special accessor used to retrieve the field used to send commands to the web service.
 java.math.BigInteger getCustomer()
          Accessor method.
 java.lang.StringBuffer getNumber()
          Accessor method.
 boolean isGoodNumber()
          Helper method, used just to improve performance by reducing multiple checks (only for frequent calls).
 void setCustomer(java.math.BigInteger value)
          Mutator method.
 void setCustomer(java.lang.StringBuffer value)
          Mutator method (overloaded).
 void setDefaults()
          Doing nothing (implementation required by the parent interface definition).
 void setNumber(java.lang.StringBuffer value)
          Mutator method.
 java.lang.StringBuffer[] toArray(boolean complete)
          Produce a StringBuffer[] array containing all data contained by this wrapper.
 java.lang.String toString()
          Serialize all the data contained by this wrapper as a String object, dot separated.
 boolean validate()
          This method should be called after that all the wrapper's fields have been properly set, in order to adjust any string requiring a particular format.
 
Methods inherited from class adriani.jws.template.wrappers.Wrapper
compareSB, getElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

number

protected java.lang.StringBuffer number
Wrapped input value, used to store the SOAP input request value after validation.


customer

protected java.math.BigInteger customer
Wrapped input value, used to store the SOAP input request value after validation.

Constructor Detail

WrapperInformationIn

public WrapperInformationIn()
Constructor used by the SimpleClient to test the service (empty).


WrapperInformationIn

public WrapperInformationIn(User user)
Constructor used by the actual web service logic, used to set the wrapper's class fields reading the values from the ADBBean element of the input SOAP request. For this reason implementation of this constructor is strongly coupled to the WSDL definition.

Parameters:
user - the ADBBean object as received by the service skeleton class
Method Detail

validate

public boolean validate()
This method should be called after that all the wrapper's fields have been properly set, in order to adjust any string requiring a particular format. For example, if the datasource required that all the accent vowels must be replaced with the corresponding single quote notation, this method should take care to implement the necessary operations (converting אטילעש into a'e'e'i'o'u').

Current implementation does nothing.

Remark: to grant LOOSE COUPLING to the WSDL, the ADBBean Java classes should NOT be used within this method.

Specified by:
validate in class Wrapper
Returns:
true if all the mandatory ADBBean objects were set correctly

setDefaults

public void setDefaults()
Doing nothing (implementation required by the parent interface definition).
Usually input wrappers don't need to set default data in the input SOAP requests, since if some data is missing we can not assume some default behavior.

See children of the WrapperOut class for some actual usage of this method.

Specified by:
setDefaults in class Wrapper
See Also:
Wrapper.Wrapper(), WrapperOut

getCustomer

public java.math.BigInteger getCustomer()
Accessor method.


getNumber

public java.lang.StringBuffer getNumber()
Accessor method.


setCustomer

public void setCustomer(java.math.BigInteger value)
Mutator method.


setCustomer

public void setCustomer(java.lang.StringBuffer value)
Mutator method (overloaded).


setNumber

public void setNumber(java.lang.StringBuffer value)
Mutator method.


isGoodNumber

public boolean isGoodNumber()
Helper method, used just to improve performance by reducing multiple checks (only for frequent calls). Current implementation verifies if the input customer number has been actually set.


toString

public java.lang.String toString()
Serialize all the data contained by this wrapper as a String object, dot separated.

Overrides:
toString in class java.lang.Object
Returns:
a string of the type "scott.tiger.42.prince consort road.london"

arrayToString

public java.lang.String arrayToString()
Serialize all the data contained by this wrapper as a String object. This is the "old plain version" of the toString() method, which can be used only if ALL input data (contained the SOAP request) are mandatory!

Returns:
a string of the type "rome.rm.via.garibaldi.12"

toArray

public java.lang.StringBuffer[] toArray(boolean complete)
Produce a StringBuffer[] array containing all data contained by this wrapper. If this method must be used in a test environment (where dummy input data should be complete), the input flag complete allows to add some hard-coded values if the creation of the array fails.

Parameters:
complete - if true some hard-coded data will be created if creation of the array fails
Returns:
a StringBuffer[] array with the data contained by this wrapper

getCommand

public java.lang.StringBuffer getCommand()
Special accessor used to retrieve the field used to send commands to the web service. This special field must be a text type (String or StringBuffer) to allow inserting a "leading password" in the field, for example "000". Whatever is the type of the special field, this method returns always a StringBuffer to ensure encapsulation.

Returns:
a StringBuffer object containing the original field value

Build 18/09/2012

Morpheus Quality Technologies - Making the Zion software
Copyright © 2009-2013 Morpheus Quality Technologies. All Rights Reserved