com.infoengine.soap.util
Class SOAPUtils

java.lang.Object
  extended bycom.infoengine.soap.util.SOAPUtils

public class SOAPUtils
extends Object

IMPORTANT: this class must remain independant of Info*Engine classes so that it can remain portable and be used by clients in non Info*Engine VMs


Nested Class Summary
(package private) static interface SOAPUtils.ArrayHandler
          Package access interface that is used as a callback for array des11n of I*E attributes.
private  class SOAPUtils.SAAJClassLoader
           
 
Field Summary
static String _ARRTYPE
           
static javax.xml.soap.Name _ARRTYPE_NAME
           
static String _HREF
           
static javax.xml.soap.Name _HREF_NAME
           
static String _ID
           
static javax.xml.soap.Name _ID_NAME
           
static String _NIL
           
static javax.xml.soap.Name _NIL_NAME
           
static String _NULL
           
static javax.xml.soap.Name _NULL_NAME
           
static String _STATE
           
static javax.xml.soap.Name _STATE_NAME
           
static String _TYPE
           
static javax.xml.soap.Name _TYPE_NAME
           
static int ATTRIBUTE
          I*E Element element type
private static List BEAN_CLASSNAMES
           
static int COLLECTION
          I*E Request element type
static String DIGITAL_NS
          SOAP security namespace
static int ELEMENT
          I*E Group element type
static int GROUP
          I*E Collection element type
private static List HANDLER_CLASSNAMES
           
private static List INTROSPECTABLE_CLASSNAMES
           
static String[] JAVA_TYPE_MAP
          type constant to closest primitive map
static String[] JAVA_TYPE_STRINGS
          type constant to java type map
static javax.xml.soap.MessageFactory MESSAGE_FACTORY
           
static int META
          I*E Attribute element type
private static ThreadLocal NAME_MAPS
           
private static Map NAMES
           
static int REQUEST
           
private static SOAPUtils SINGLETON
           
static String SOAP_ENC
          Schema namespace id
static String SOAP_ENC_NS
          SOAP encoding namespace id
static javax.xml.soap.SOAPFactory SOAP_FACTORY
           
static String SOAP_SEC
          SOAP encoding namespace
static String SOAP_SEC_NS
          SOAP security namespace id
static String[] SOAP_TYPE_STRINGS
          type constant to SOAP type map
static String TARGET_NAMESPACE
          I*E Attribute type keyword
static String TARGET_NAMESPACE_ID
          Default namespace
static int TYPE_BEAN
          Digital signature namespace
static int TYPE_BIGDECIMAL
          byte primitive
static int TYPE_BOOLEAN
          boolean java object
static int TYPE_BOOLEAN_O
          Bean
static int TYPE_BYTE
          byte java object
static int TYPE_BYTE_O
          short primitive
static int TYPE_DATE
           
static int TYPE_DOUBLE
          double java object
static int TYPE_DOUBLE_O
          boolean primitive
static int TYPE_FLOAT
          float java object
static int TYPE_FLOAT_O
          long primitive
static int TYPE_IEATTRIBUTE
          I*E Element java object
static int TYPE_IECOLLECTION
          date java object (dateTime == java.util.Date)
static int TYPE_IEELEMENT
          I*E Group java object
static int TYPE_IEGROUP
          I*E Collection java object
static int TYPE_INTEGER
          integer java object
static int TYPE_INTEGER_O
          float primitive
static int TYPE_LONG
          long java object
static int TYPE_LONG_0
          double primitive
static int TYPE_SHORT
          short java object
static int TYPE_SHORT_O
          integer primitive
static int TYPE_STRING
          string java object
static int TYPE_STRING_O
          big decimal java object
private static TimeZone UTC
           
static String XML_ARRAY_MEMBER_NAME
          XML name attribute
static String XML_ATTRIBUTE
          I*E Elements element name
static String XML_ATTRIBUTE_CTYPE
          I*E State attribute name
static String XML_ATTRIBUTE_TYPE
          I*E Element type keyword
static String XML_ATTRIBUTES
          I*E Attribute element name
static String XML_COLLECTION
          I*E Collection type keyword
static String XML_COLLECTION_TYPE
          I*E Request element name
static String XML_COLLECTIONS
          I*E Collection element name
static String XML_CONTENT_TYPE
          I*E Values element name
static String XML_ELEMENT
          I*E Groups element name
static String XML_ELEMENT_TYPE
          I*E Group type keyword
static String XML_ELEMENTS
          I*E Element element name
static String XML_GROUP
          I*E Collections element name
static String XML_GROUP_TYPE
          I*E Meta element name
static String XML_GROUPS
          I*E Group element name
static String XML_META
          I*E contentType attribute
static String XML_NAME
          I*E ContentType element name
static String XML_NAME_ATTRIBUTE
          I*E Meta element type
static String XML_REQUEST
          I*E Request type keyword
static String XML_REQUEST_TYPE
          XML array member element name
static String XML_STATE
          I*E Name element name
static String XML_VALUE
          I*E Attributes element name
static String XML_VALUES
          I*E Value element name
static String XSD
          Schema instance namespace id
static String XSD_NS
          Schema namespace
static String XSI
          Default namespace id
static String XSI_NS
          Schema instance namespace
 
Constructor Summary
SOAPUtils()
           
 
Method Summary
private static int _isSOAPElementHandler(String cls)
          Is the class an Introspectable or SOAPElementHandler or just a Bean?
static void addMeta(Data ieobj, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          If available adds meta information to a parent SOAP element.
static void attributeToElement(Attribute att, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Turns an I*E attribute into a SOAPElement.
static void attributeToElement(Attribute att, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String eName, boolean type, boolean qualify)
          Turns an I*E attribute into a SOAPElement.
static void collectionToElement(Collection col, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Turns an I*E collection into a SOAPElement.
static void collectionToElement(Collection col, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String eName, boolean type, boolean qualify)
          Turns an I*E collection into a SOAPElement.
static int countChildElements(javax.xml.soap.SOAPElement elm)
          Counts the number of SOAPElement children within an element.
static Object[] createArray(int iType, String typeS, int dim)
          Create a typed array.
(package private) static Object[] createArray(String type)
          Construct a typed array from an array def.
static String dateTime(Date d)
          Turn a Date object into an RFC822 formatted String.
static Object deserialize(javax.xml.soap.SOAPMessage message)
          Deserialize a SOAPMessage into an appropriate java Object.
static Object deserialize(String s, String cType)
          Deserializes a String to a java object based on a Content-Type.
static Date deserializeDate(String s)
          Deserialze an RFC822 formatted String into a Date object.
static Attribute elementToAttribute(javax.xml.soap.SOAPElement elm, javax.xml.soap.SOAPMessage message)
          Turns a SOAPElement representing an I*E attribute back into a attribute.
static Collection elementToCollection(javax.xml.soap.SOAPElement elm, javax.xml.soap.SOAPMessage message)
          Turns a SOAPElement representing an I*E collection back into a collection.
static void elementToElement(Element elem, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Turns an I*E element into a SOAPElement.
static void elementToElement(Element elem, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String eName, boolean type, boolean qualify)
          Turns an I*E element into a SOAPElement.
static Element elementToElement(javax.xml.soap.SOAPElement elm, javax.xml.soap.SOAPMessage message)
          Turns a SOAPElement representing an I*E element back into a element.
static Group elementToGroup(javax.xml.soap.SOAPElement elm, javax.xml.soap.SOAPMessage message)
          Turns a SOAPElement representing an I*E group back into a group.
static Object elementToObject(javax.xml.soap.SOAPElement element, javax.xml.soap.SOAPMessage message)
          Turns a SOAPElement back into a java object.
(package private) static Object elementToObject(javax.xml.soap.SOAPElement element, javax.xml.soap.SOAPMessage message, SOAPUtils.ArrayHandler arrayHandler)
          Same as public elementToObject method except passes a long an ArrayHandler.
static javax.xml.soap.SOAPElement findChildByLocalName(javax.xml.soap.SOAPElement parent, String localName)
          Searches an element for a child by its local name.
static javax.xml.soap.SOAPElement findElementWithId(String id, javax.xml.soap.SOAPElement parent)
          Find a SOAPElement by id.
static int getArrayDim(String type)
          Extract the array dimension out of an array def.
static String getArrayType(String type)
          Extract the type out of an array def.
static javax.xml.soap.Name getAttributeName(String name, javax.xml.soap.SOAPElement element)
          Find an attribute within an element by its localName.
static String getAttributeValue(String name, javax.xml.soap.SOAPElement element)
          Find an attribute value within an element by its localName.
static javax.xml.soap.SOAPEnvelope getEnvelope(javax.xml.soap.SOAPMessage msg)
           
static void getMeta(Data ieobj, javax.xml.soap.SOAPElement elm, javax.xml.soap.SOAPMessage message)
          Repopulates meta data on an I*E object from a SOAP element.
static javax.xml.soap.SOAPBody getSOAPBody(javax.xml.soap.SOAPMessage msg)
           
static javax.xml.soap.SOAPHeader getSOAPHeader(javax.xml.soap.SOAPMessage msg)
           
static void groupToElement(Group g, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Turns an I*E group into a SOAPElement.
static void groupToElement(Group g, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String eName, boolean type, boolean qualify)
          Turns an I*E group into a SOAPElement.
static int ieElementType(javax.xml.soap.SOAPElement elm)
          Gets the Info*Engine specific of a SOAPElement.
static boolean isIntrospectable(String cls)
          Is the class (string representation) cls an Introspectable.
static boolean isSOAPElementHandler(Class cls)
          Is the class (object representation) cls a SOAPElementHandler.
static boolean isSOAPElementHandler(String cls)
          Is the class (string representation) cls a SOAPElementHandler.
static javax.xml.soap.SOAPMessage newEmptyLocalMessage()
           
static javax.xml.soap.SOAPMessage newEmptyLocalMessage(OutputStream out)
           
static javax.xml.soap.SOAPMessage newEmptyMessage()
          Constructs a new SOAPMessage object.
static javax.xml.soap.SOAPElement nextSOAPElement(Iterator kids)
          Returns the next instance of SOAPElement from Iterator.
static void objectToElement(String eName, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Adds a strongly typed SOAPElement to a parent element.
(package private) static String objectToString(Object o)
          Tet a String serialized representation of o.
private static String pad(int length, char with, String s)
          Pad String s with char with until its length characters long.
static Object recastObject(int type, Object o)
          Turn an arbitrary object into a typed object.
static Object recastObject(int type, Object o, javax.xml.soap.SOAPMessage message)
          Turn an arbitrary object into a typed object.
static void saveChanges(javax.xml.soap.SOAPMessage msg)
           
(package private) static String serialize(Object o, String cType)
          Serializes a java object to a String representation based on a Content-Type.
(package private) static javax.xml.soap.SOAPElement serializeArray(String eName, int type, Bean descriptor, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message)
          Serializes a java object array to a SOAP Array.
(package private) static javax.xml.soap.SOAPElement serializeArray(String eName, int type, Bean descriptor, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String arrayMemberName, boolean canBeNull)
          Serializes a java object array to a SOAP Array.
(package private) static javax.xml.soap.SOAPElement serializeBean(Bean descriptor, String eName, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, boolean arrayMember)
          Serializes a java bean object into a SOAPElement object.
private static javax.xml.soap.SOAPElement serializeIEDataArray(String eName, int type, Object[] objects, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, String arrayMemberName)
          Used internally to serialize arrays of I*E data structure objects.
(package private) static javax.xml.soap.SOAPElement serializeIndexedArray(String eName, int type, Bean descriptor, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, Method reader)
          Version of serializeArray that works from a bean and its indexed read method
(package private) static javax.xml.soap.SOAPElement serializePrimitive(String eName, int type, Object object, javax.xml.soap.SOAPElement parent, javax.xml.soap.SOAPMessage message, boolean canBeNull, boolean arrayMember)
          Serializes a primitive java object into a SOAPElement object.
 void setElementType(javax.xml.soap.SOAPElement elm, Object o)
          Sets the xsi:type on a SOAPElement to the appropriate value based on an object.
static int stringToType(String type)
          Turn a java or SOAP type String to a SOAP type.
static String typeToJava(int type)
          Used for code generation translate SOAP type to appropriate java primitive type or supporting class.
static String typeToString(int type)
          Used in wsdl generation and response typing.
static void writeTo(javax.xml.soap.SOAPMessage msg, OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST

public static final int REQUEST
See Also:
Constant Field Values

COLLECTION

public static final int COLLECTION
I*E Request element type

See Also:
Constant Field Values

GROUP

public static final int GROUP
I*E Collection element type

See Also:
Constant Field Values

ELEMENT

public static final int ELEMENT
I*E Group element type

See Also:
Constant Field Values

ATTRIBUTE

public static final int ATTRIBUTE
I*E Element element type

See Also:
Constant Field Values

META

public static final int META
I*E Attribute element type

See Also:
Constant Field Values

XML_NAME_ATTRIBUTE

public static final String XML_NAME_ATTRIBUTE
I*E Meta element type

See Also:
Constant Field Values

XML_ARRAY_MEMBER_NAME

public static final String XML_ARRAY_MEMBER_NAME
XML name attribute

See Also:
Constant Field Values

XML_REQUEST_TYPE

public static final String XML_REQUEST_TYPE
XML array member element name

See Also:
Constant Field Values

XML_REQUEST

public static final String XML_REQUEST
I*E Request type keyword

See Also:
Constant Field Values

XML_COLLECTION_TYPE

public static final String XML_COLLECTION_TYPE
I*E Request element name

See Also:
Constant Field Values

XML_COLLECTION

public static final String XML_COLLECTION
I*E Collection type keyword

See Also:
Constant Field Values

XML_COLLECTIONS

public static final String XML_COLLECTIONS
I*E Collection element name

See Also:
Constant Field Values

XML_GROUP

public static final String XML_GROUP
I*E Collections element name

See Also:
Constant Field Values

XML_GROUPS

public static final String XML_GROUPS
I*E Group element name

See Also:
Constant Field Values

XML_ELEMENT

public static final String XML_ELEMENT
I*E Groups element name

See Also:
Constant Field Values

XML_ELEMENTS

public static final String XML_ELEMENTS
I*E Element element name

See Also:
Constant Field Values

XML_ATTRIBUTE

public static final String XML_ATTRIBUTE
I*E Elements element name

See Also:
Constant Field Values

XML_ATTRIBUTES

public static final String XML_ATTRIBUTES
I*E Attribute element name

See Also:
Constant Field Values

XML_VALUE

public static final String XML_VALUE
I*E Attributes element name

See Also:
Constant Field Values

XML_VALUES

public static final String XML_VALUES
I*E Value element name

See Also:
Constant Field Values

XML_CONTENT_TYPE

public static final String XML_CONTENT_TYPE
I*E Values element name

See Also:
Constant Field Values

XML_NAME

public static final String XML_NAME
I*E ContentType element name

See Also:
Constant Field Values

XML_STATE

public static final String XML_STATE
I*E Name element name

See Also:
Constant Field Values

XML_ATTRIBUTE_CTYPE

public static final String XML_ATTRIBUTE_CTYPE
I*E State attribute name

See Also:
Constant Field Values

XML_META

public static final String XML_META
I*E contentType attribute

See Also:
Constant Field Values

XML_GROUP_TYPE

public static final String XML_GROUP_TYPE
I*E Meta element name

See Also:
Constant Field Values

XML_ELEMENT_TYPE

public static final String XML_ELEMENT_TYPE
I*E Group type keyword

See Also:
Constant Field Values

XML_ATTRIBUTE_TYPE

public static final String XML_ATTRIBUTE_TYPE
I*E Element type keyword

See Also:
Constant Field Values

TARGET_NAMESPACE

public static final String TARGET_NAMESPACE
I*E Attribute type keyword

See Also:
Constant Field Values

TARGET_NAMESPACE_ID

public static final String TARGET_NAMESPACE_ID
Default namespace

See Also:
Constant Field Values

XSI

public static final String XSI
Default namespace id

See Also:
Constant Field Values

XSI_NS

public static final String XSI_NS
Schema instance namespace

See Also:
Constant Field Values

XSD

public static final String XSD
Schema instance namespace id

See Also:
Constant Field Values

XSD_NS

public static final String XSD_NS
Schema namespace

See Also:
Constant Field Values

SOAP_ENC

public static final String SOAP_ENC
Schema namespace id

See Also:
Constant Field Values

SOAP_ENC_NS

public static final String SOAP_ENC_NS
SOAP encoding namespace id

See Also:
Constant Field Values

SOAP_SEC

public static final String SOAP_SEC
SOAP encoding namespace

See Also:
Constant Field Values

SOAP_SEC_NS

public static final String SOAP_SEC_NS
SOAP security namespace id

See Also:
Constant Field Values

DIGITAL_NS

public static final String DIGITAL_NS
SOAP security namespace

See Also:
Constant Field Values

TYPE_BEAN

public static final int TYPE_BEAN
Digital signature namespace

See Also:
Constant Field Values

TYPE_BOOLEAN_O

public static final int TYPE_BOOLEAN_O
Bean

See Also:
Constant Field Values

TYPE_BOOLEAN

public static final int TYPE_BOOLEAN
boolean java object

See Also:
Constant Field Values

TYPE_DOUBLE_O

public static final int TYPE_DOUBLE_O
boolean primitive

See Also:
Constant Field Values

TYPE_DOUBLE

public static final int TYPE_DOUBLE
double java object

See Also:
Constant Field Values

TYPE_LONG_0

public static final int TYPE_LONG_0
double primitive

See Also:
Constant Field Values

TYPE_LONG

public static final int TYPE_LONG
long java object

See Also:
Constant Field Values

TYPE_FLOAT_O

public static final int TYPE_FLOAT_O
long primitive

See Also:
Constant Field Values

TYPE_FLOAT

public static final int TYPE_FLOAT
float java object

See Also:
Constant Field Values

TYPE_INTEGER_O

public static final int TYPE_INTEGER_O
float primitive

See Also:
Constant Field Values

TYPE_INTEGER

public static final int TYPE_INTEGER
integer java object

See Also:
Constant Field Values

TYPE_SHORT_O

public static final int TYPE_SHORT_O
integer primitive

See Also:
Constant Field Values

TYPE_SHORT

public static final int TYPE_SHORT
short java object

See Also:
Constant Field Values

TYPE_BYTE_O

public static final int TYPE_BYTE_O
short primitive

See Also:
Constant Field Values

TYPE_BYTE

public static final int TYPE_BYTE
byte java object

See Also:
Constant Field Values

TYPE_BIGDECIMAL

public static final int TYPE_BIGDECIMAL
byte primitive

See Also:
Constant Field Values

TYPE_STRING_O

public static final int TYPE_STRING_O
big decimal java object

See Also:
Constant Field Values

TYPE_STRING

public static final int TYPE_STRING
string java object

See Also:
Constant Field Values

TYPE_DATE

public static final int TYPE_DATE
See Also:
Constant Field Values

TYPE_IECOLLECTION

public static final int TYPE_IECOLLECTION
date java object (dateTime == java.util.Date)

See Also:
Constant Field Values

TYPE_IEGROUP

public static final int TYPE_IEGROUP
I*E Collection java object

See Also:
Constant Field Values

TYPE_IEELEMENT

public static final int TYPE_IEELEMENT
I*E Group java object

See Also:
Constant Field Values

TYPE_IEATTRIBUTE

public static final int TYPE_IEATTRIBUTE
I*E Element java object

See Also:
Constant Field Values

JAVA_TYPE_STRINGS

public static final String[] JAVA_TYPE_STRINGS
type constant to java type map


JAVA_TYPE_MAP

public static final String[] JAVA_TYPE_MAP
type constant to closest primitive map


SOAP_TYPE_STRINGS

public static final String[] SOAP_TYPE_STRINGS
type constant to SOAP type map


BEAN_CLASSNAMES

private static List BEAN_CLASSNAMES

HANDLER_CLASSNAMES

private static List HANDLER_CLASSNAMES

INTROSPECTABLE_CLASSNAMES

private static List INTROSPECTABLE_CLASSNAMES

SOAP_FACTORY

public static javax.xml.soap.SOAPFactory SOAP_FACTORY

MESSAGE_FACTORY

public static javax.xml.soap.MessageFactory MESSAGE_FACTORY

_TYPE

public static final String _TYPE
See Also:
Constant Field Values

_TYPE_NAME

public static javax.xml.soap.Name _TYPE_NAME

_NIL

public static final String _NIL
See Also:
Constant Field Values

_NIL_NAME

public static javax.xml.soap.Name _NIL_NAME

_HREF

public static final String _HREF
See Also:
Constant Field Values

_HREF_NAME

public static javax.xml.soap.Name _HREF_NAME

_ID

public static final String _ID
See Also:
Constant Field Values

_ID_NAME

public static javax.xml.soap.Name _ID_NAME

_ARRTYPE

public static final String _ARRTYPE
See Also:
Constant Field Values

_ARRTYPE_NAME

public static javax.xml.soap.Name _ARRTYPE_NAME

_NULL

public static final String _NULL
See Also:
Constant Field Values

_NULL_NAME

public static javax.xml.soap.Name _NULL_NAME

_STATE

public static final String _STATE
See Also:
Constant Field Values

_STATE_NAME

public static javax.xml.soap.Name _STATE_NAME

NAME_MAPS

private static ThreadLocal NAME_MAPS

NAMES

private static Map NAMES

SINGLETON

private static final SOAPUtils SINGLETON

UTC

private static TimeZone UTC
Constructor Detail

SOAPUtils

public SOAPUtils()
Method Detail

newEmptyMessage

public static javax.xml.soap.SOAPMessage newEmptyMessage()
                                                  throws javax.xml.soap.SOAPException
Constructs a new SOAPMessage object. All the appropriate default namespace declarations will be qualified on the envelope.

Returns:
The new SOAPMessage
Throws:
javax.xml.soap.SOAPException

newEmptyLocalMessage

public static javax.xml.soap.SOAPMessage newEmptyLocalMessage()
                                                       throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

newEmptyLocalMessage

public static javax.xml.soap.SOAPMessage newEmptyLocalMessage(OutputStream out)
                                                       throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

isIntrospectable

public static boolean isIntrospectable(String cls)
                                throws ClassNotFoundException
Is the class (string representation) cls an Introspectable.

Parameters:
cls - The java class name to examine
Returns:
true if cls implements Introspectable.
Throws:
ClassNotFoundException

isSOAPElementHandler

public static boolean isSOAPElementHandler(String cls)
                                    throws ClassNotFoundException
Is the class (string representation) cls a SOAPElementHandler.

Parameters:
cls - The java class name to examine
Returns:
true if cls implements SOAPElementHandler.
Throws:
ClassNotFoundException

_isSOAPElementHandler

private static int _isSOAPElementHandler(String cls)
                                  throws ClassNotFoundException
Is the class an Introspectable or SOAPElementHandler or just a Bean?

Parameters:
cls - The java class name to examine
Returns:
0 for Introspectable, 1 for SOAPElementHandler, -1 for Bean.
Throws:
ClassNotFoundException

isSOAPElementHandler

public static boolean isSOAPElementHandler(Class cls)
Is the class (object representation) cls a SOAPElementHandler.

Parameters:
cls - The java class to examine.
Returns:
true if cls implements SOAPElementHandler.

pad

private static String pad(int length,
                          char with,
                          String s)
Pad String s with char with until its length characters long.

Parameters:
length - The target length
with - The pad character
s - The string to pad
Returns:
The padded string

dateTime

public static String dateTime(Date d)
Turn a Date object into an RFC822 formatted String.

Parameters:
d - The date.
Returns:
The RFC822 String representation.

objectToString

static String objectToString(Object o)
Tet a String serialized representation of o.

Parameters:
o - The object.
Returns:
The string representation.

deserializeDate

public static Date deserializeDate(String s)
                            throws IllegalArgumentException
Deserialze an RFC822 formatted String into a Date object.

Date of format

 YYYY-MM-DDThh:mm.ss<timezone>
 <timezone> ::= Z (for UTC) | <offset>
 <offset> ::= +hh:mm | -hh:mm
 

Parameters:
s - The formatted String.
Returns:
The resulting Date object.
Throws:
IllegalArgumentException

typeToJava

public static String typeToJava(int type)
Used for code generation translate SOAP type to appropriate java primitive type or supporting class.

Parameters:
type - The SOAP type.
Returns:
A java type String or null.
See Also:
typeToString(int), stringToType(String)

typeToString

public static String typeToString(int type)
Used in wsdl generation and response typing. Translate SOAP type to appropriate SOAP type string.

Parameters:
type - The SOAP type.
Returns:
String representation of SOAP type.
See Also:
typeToJava(int), stringToType(String)

stringToType

public static int stringToType(String type)
Turn a java or SOAP type String to a SOAP type.

Parameters:
type - The String representation of the type (may be SOAP or java).
Returns:
int SOAP type
See Also:
typeToString(int), typeToJava(int)

recastObject

public static Object recastObject(int type,
                                  Object o)
                           throws ClassNotFoundException,
                                  InstantiationException,
                                  IllegalAccessException,
                                  NotSerializableException,
                                  IllegalArgumentException,
                                  IntrospectionException,
                                  InvocationTargetException,
                                  javax.xml.soap.SOAPException
Turn an arbitrary object into a typed object. If the type is TYPE_BEAN then o must be an instance of a SOAPElement that represents the bean and its properties.

Parameters:
type - The SOAP type of the object.
o - The object to recast.
Returns:
The recasted object.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IllegalArgumentException
IntrospectionException
InvocationTargetException
javax.xml.soap.SOAPException

recastObject

public static Object recastObject(int type,
                                  Object o,
                                  javax.xml.soap.SOAPMessage message)
                           throws ClassNotFoundException,
                                  InstantiationException,
                                  IllegalAccessException,
                                  NotSerializableException,
                                  IllegalArgumentException,
                                  IntrospectionException,
                                  InvocationTargetException,
                                  javax.xml.soap.SOAPException
Turn an arbitrary object into a typed object. If the type is TYPE_BEAN then o must be an instance of a SOAPElement that represents the bean and its properties.

Parameters:
type - The SOAP type of the object.
o - The object to recast.
message - The associated SOAP message.
Returns:
The recasted object.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IllegalArgumentException
IntrospectionException
InvocationTargetException
javax.xml.soap.SOAPException

getArrayType

public static String getArrayType(String type)
Extract the type out of an array def.

The array def of the form:

 <nsId>':'<type>'['<dim>']'
 

Parameters:
type - The type string.
Returns:
The type portion.

getArrayDim

public static int getArrayDim(String type)
Extract the array dimension out of an array def.

The array def of the form:

 <nsId>':'<type>'['<dim>']'
 

Parameters:
type - The type string.
Returns:
The array dimension or -1 if invalid.

createArray

static Object[] createArray(String type)
                     throws ClassNotFoundException,
                            InstantiationException,
                            IllegalAccessException,
                            NotSerializableException,
                            IntrospectionException
Construct a typed array from an array def.

The array def of the form:

 <nsId>':'<type>'['<dim>']'
 

Parameters:
type - The array def.
Returns:
Object[] typed array.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException

createArray

public static Object[] createArray(int iType,
                                   String typeS,
                                   int dim)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException,
                                   NotSerializableException,
                                   IntrospectionException
Create a typed array.

Parameters:
iType - The SOAP type.
typeS - The type string (useful for beans).
dim - The array dimension dimension.
Returns:
Object[] typed array.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException

deserialize

public static Object deserialize(javax.xml.soap.SOAPMessage message)
                          throws ClassNotFoundException,
                                 InstantiationException,
                                 IllegalAccessException,
                                 NotSerializableException,
                                 IllegalArgumentException,
                                 IntrospectionException,
                                 InvocationTargetException,
                                 javax.xml.soap.SOAPException
Deserialize a SOAPMessage into an appropriate java Object. results may be:
java object or object representation of primitive
java bean
array of java object or object representation of primitive
array of java bean

Parameters:
message - The SOAPMessage to deserialize.
Returns:
Object the object reconstructed from message.
Throws:
javax.xml.soap.SOAPException - if the message contains a Fault.
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IllegalArgumentException
IntrospectionException
InvocationTargetException

getAttributeValue

public static String getAttributeValue(String name,
                                       javax.xml.soap.SOAPElement element)
                                throws javax.xml.soap.SOAPException
Find an attribute value within an element by its localName. This could be problematic if SOAPElements contain multiple like named attributes qualified differently...

Parameters:
name - The localName.
element - The element to search.
Returns:
The Name found or null if not found.
Throws:
javax.xml.soap.SOAPException

getAttributeName

public static javax.xml.soap.Name getAttributeName(String name,
                                                   javax.xml.soap.SOAPElement element)
                                            throws javax.xml.soap.SOAPException
Find an attribute within an element by its localName.

Parameters:
name - The localName.
element - The element to search.
Returns:
The Name found or null if not found.
Throws:
javax.xml.soap.SOAPException

findElementWithId

public static javax.xml.soap.SOAPElement findElementWithId(String id,
                                                           javax.xml.soap.SOAPElement parent)
                                                    throws javax.xml.soap.SOAPException
Find a SOAPElement by id. Search the parent element and continue up the XML tree until the element is found or the root of the tree is reached.

Parameters:
id - The id to search for.
parent - The element to begin searching at.
Returns:
The found element if any.
Throws:
javax.xml.soap.SOAPException

elementToObject

public static Object elementToObject(javax.xml.soap.SOAPElement element,
                                     javax.xml.soap.SOAPMessage message)
                              throws ClassNotFoundException,
                                     InstantiationException,
                                     IllegalAccessException,
                                     NotSerializableException,
                                     IllegalArgumentException,
                                     IntrospectionException,
                                     InvocationTargetException,
                                     javax.xml.soap.SOAPException
Turns a SOAPElement back into a java object. If the SOAPElement is strongly typed then the return object will be of the type (if supported). beans and arrays of primitives or beans are supported.

Parameters:
element - The element to return to a java object.
message - The associated SOAP message.
Returns:
A recast object, null or String if not strongly typed.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IllegalArgumentException
IntrospectionException
InvocationTargetException
javax.xml.soap.SOAPException

elementToObject

static Object elementToObject(javax.xml.soap.SOAPElement element,
                              javax.xml.soap.SOAPMessage message,
                              SOAPUtils.ArrayHandler arrayHandler)
                       throws ClassNotFoundException,
                              InstantiationException,
                              IllegalAccessException,
                              NotSerializableException,
                              IllegalArgumentException,
                              IntrospectionException,
                              InvocationTargetException,
                              javax.xml.soap.SOAPException
Same as public elementToObject method except passes a long an ArrayHandler.

Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IllegalArgumentException
IntrospectionException
InvocationTargetException
javax.xml.soap.SOAPException

objectToElement

public static void objectToElement(String eName,
                                   Object object,
                                   javax.xml.soap.SOAPElement parent,
                                   javax.xml.soap.SOAPMessage message)
                            throws javax.xml.soap.SOAPException,
                                   ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException,
                                   NotSerializableException,
                                   IntrospectionException,
                                   InvocationTargetException
Adds a strongly typed SOAPElement to a parent element. This method is specifically used for generating strongly typed request parameter and response elements. This method assumes the envelope has been qualified with the default prefixes and uris.

Parameters:
eName - The name of the element to create.
object - The object to turn into a SOAPElement RPC parameter or response.
parent - The parent to add the created SOAPElement to
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

serializePrimitive

static javax.xml.soap.SOAPElement serializePrimitive(String eName,
                                                     int type,
                                                     Object object,
                                                     javax.xml.soap.SOAPElement parent,
                                                     javax.xml.soap.SOAPMessage message,
                                                     boolean canBeNull,
                                                     boolean arrayMember)
                                              throws javax.xml.soap.SOAPException
Serializes a primitive java object into a SOAPElement object. With the use of the canBeNull parameter this may violate default SOAP encoding since this may cause an attribute like wc:nil="true" to be added to an element. However there is no other aparent way of indicating a null element value.

Parameters:
eName - The element name to be created.
type - The SOAP type.
object - The primitive object to serialize.
parent - The parent element to add the new child to.
message - The associated SOAP message.
canBeNull - A boolean indicating if this element can be null.
arrayMember - A boolean indicating if this element is part of a strongly typed array (don't type locally).
Returns:
The new SOAPElement added to parent.
Throws:
javax.xml.soap.SOAPException

serializeBean

static javax.xml.soap.SOAPElement serializeBean(Bean descriptor,
                                                String eName,
                                                Object object,
                                                javax.xml.soap.SOAPElement parent,
                                                javax.xml.soap.SOAPMessage message,
                                                boolean arrayMember)
                                         throws javax.xml.soap.SOAPException,
                                                ClassNotFoundException,
                                                InstantiationException,
                                                IllegalAccessException,
                                                NotSerializableException,
                                                IntrospectionException,
                                                InvocationTargetException
Serializes a java bean object into a SOAPElement object.

Parameters:
descriptor - The bean descriptor.
eName - The element name to be created.
object - The java object to serialize.
parent - The parent element to add the new child to.
message - The associated SOAP message.
arrayMember - A boolean indicating if this element is part of a strongly typed array (don't type locally).
Returns:
The new SOAPElement added to parent.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

serializeIndexedArray

static javax.xml.soap.SOAPElement serializeIndexedArray(String eName,
                                                        int type,
                                                        Bean descriptor,
                                                        Object object,
                                                        javax.xml.soap.SOAPElement parent,
                                                        javax.xml.soap.SOAPMessage message,
                                                        Method reader)
                                                 throws javax.xml.soap.SOAPException,
                                                        ClassNotFoundException,
                                                        InstantiationException,
                                                        IllegalAccessException,
                                                        NotSerializableException,
                                                        IntrospectionException,
                                                        InvocationTargetException
Version of serializeArray that works from a bean and its indexed read method

Parameters:
eName - The element name to create.
type - The SOAP type.
descriptor - The java bean descriptor (if type == TYPE_BEAN) not of object but of the indexed objects.
object - The bean to read indexed objects from.
parent - The parent element to add the array to.
message - The associated SOAP message.
reader - The indexed reader method.
Returns:
The created SOAP Array element.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

serializeArray

static javax.xml.soap.SOAPElement serializeArray(String eName,
                                                 int type,
                                                 Bean descriptor,
                                                 Object object,
                                                 javax.xml.soap.SOAPElement parent,
                                                 javax.xml.soap.SOAPMessage message)
                                          throws javax.xml.soap.SOAPException,
                                                 ClassNotFoundException,
                                                 InstantiationException,
                                                 IllegalAccessException,
                                                 NotSerializableException,
                                                 IntrospectionException,
                                                 InvocationTargetException
Serializes a java object array to a SOAP Array. Uses the default array member element name.

Parameters:
eName - The element name to create.
type - The SOAP type.
descriptor - The java bean descriptor (if type == TYPE_BEAN).
object - The array (must be a java array).
parent - The parent element to add the array to.
message - The associated SOAP message.
Returns:
The created SOAP Array element.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

serializeArray

static javax.xml.soap.SOAPElement serializeArray(String eName,
                                                 int type,
                                                 Bean descriptor,
                                                 Object object,
                                                 javax.xml.soap.SOAPElement parent,
                                                 javax.xml.soap.SOAPMessage message,
                                                 String arrayMemberName,
                                                 boolean canBeNull)
                                          throws javax.xml.soap.SOAPException,
                                                 ClassNotFoundException,
                                                 InstantiationException,
                                                 IllegalAccessException,
                                                 NotSerializableException,
                                                 IntrospectionException,
                                                 InvocationTargetException
Serializes a java object array to a SOAP Array. With the use of the canBeNull parameter this may violate default SOAP encoding since this may cause an attribute like wc:nil="true" to be added to an element. However there is no other aparent way of indicating a null element value.

Parameters:
eName - The element name to create.
type - The SOAP type.
descriptor - The java bean descriptor (if type == TYPE_BEAN).
object - The array (must be a java array).
parent - The parent element to add the array to.
message - The associated SOAP message.
arrayMemberName - The name to use for array members.
canBeNull - Can array members be null.
Returns:
The created SOAP Array element.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

nextSOAPElement

public static javax.xml.soap.SOAPElement nextSOAPElement(Iterator kids)
Returns the next instance of SOAPElement from Iterator.

Parameters:
kids - The iterator to look through.
Returns:
The next SOAPElement instance or null.

ieElementType

public static int ieElementType(javax.xml.soap.SOAPElement elm)
                         throws javax.xml.soap.SOAPException
Gets the Info*Engine specific of a SOAPElement. May look to parent elements if type is not qualified and this element is an array member.

Parameters:
elm - The element to examine.
Returns:
The IE SOAP type or -1.
Throws:
javax.xml.soap.SOAPException

deserialize

public static Object deserialize(String s,
                                 String cType)
Deserializes a String to a java object based on a Content-Type. Currently the only Content-Type supported is 'application/java-serialized-object'

Parameters:
s - The serialized object.
cType - The object's Content-Type

serialize

static String serialize(Object o,
                        String cType)
Serializes a java object to a String representation based on a Content-Type. Currently the only Content-Type supported is 'application/java-serialized-object'

Parameters:
o - The object to serialize.
cType - The Content-Type

collectionToElement

public static void collectionToElement(Collection col,
                                       javax.xml.soap.SOAPElement parent,
                                       javax.xml.soap.SOAPMessage message)
                                throws javax.xml.soap.SOAPException,
                                       ClassNotFoundException,
                                       IllegalAccessException,
                                       InstantiationException,
                                       InvocationTargetException,
                                       NotSerializableException,
                                       IntrospectionException
Turns an I*E collection into a SOAPElement.

Parameters:
col - The collection.
parent - The parent element to add the collection to.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

collectionToElement

public static void collectionToElement(Collection col,
                                       javax.xml.soap.SOAPElement parent,
                                       javax.xml.soap.SOAPMessage message,
                                       String eName,
                                       boolean type,
                                       boolean qualify)
                                throws javax.xml.soap.SOAPException,
                                       ClassNotFoundException,
                                       IllegalAccessException,
                                       InstantiationException,
                                       InvocationTargetException,
                                       NotSerializableException,
                                       IntrospectionException
Turns an I*E collection into a SOAPElement.

Parameters:
col - The collection.
parent - The parent element to add the collection to.
message - The associated SOAP message.
eName - The element name to create.
type - Should the element be typed?
qualify - Should the element be qualified?
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

groupToElement

public static void groupToElement(Group g,
                                  javax.xml.soap.SOAPElement parent,
                                  javax.xml.soap.SOAPMessage message)
                           throws javax.xml.soap.SOAPException,
                                  ClassNotFoundException,
                                  IllegalAccessException,
                                  InstantiationException,
                                  InvocationTargetException,
                                  NotSerializableException,
                                  IntrospectionException
Turns an I*E group into a SOAPElement.

Parameters:
g - The Group.
parent - The parent element to add the group to.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

groupToElement

public static void groupToElement(Group g,
                                  javax.xml.soap.SOAPElement parent,
                                  javax.xml.soap.SOAPMessage message,
                                  String eName,
                                  boolean type,
                                  boolean qualify)
                           throws javax.xml.soap.SOAPException,
                                  ClassNotFoundException,
                                  IllegalAccessException,
                                  InstantiationException,
                                  InvocationTargetException,
                                  NotSerializableException,
                                  IntrospectionException
Turns an I*E group into a SOAPElement.

Parameters:
g - The Group.
parent - The parent element to add the group to.
message - The associated SOAP message.
eName - The element name to create.
type - Should the element be typed?
qualify - Should the element be qualified?
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToElement

public static void elementToElement(Element elem,
                                    javax.xml.soap.SOAPElement parent,
                                    javax.xml.soap.SOAPMessage message)
                             throws javax.xml.soap.SOAPException,
                                    ClassNotFoundException,
                                    IllegalAccessException,
                                    InstantiationException,
                                    InvocationTargetException,
                                    NotSerializableException,
                                    IntrospectionException
Turns an I*E element into a SOAPElement.

Parameters:
elem - The element.
parent - The parent element to add the element to.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToElement

public static void elementToElement(Element elem,
                                    javax.xml.soap.SOAPElement parent,
                                    javax.xml.soap.SOAPMessage message,
                                    String eName,
                                    boolean type,
                                    boolean qualify)
                             throws javax.xml.soap.SOAPException,
                                    ClassNotFoundException,
                                    IllegalAccessException,
                                    InstantiationException,
                                    InvocationTargetException,
                                    NotSerializableException,
                                    IntrospectionException
Turns an I*E element into a SOAPElement.

Parameters:
elem - The element.
parent - The parent element to add the element to.
message - The associated SOAP message.
eName - The element name to create.
type - Should the element be typed?
qualify - Should the element be qualified?
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

attributeToElement

public static void attributeToElement(Attribute att,
                                      javax.xml.soap.SOAPElement parent,
                                      javax.xml.soap.SOAPMessage message)
                               throws javax.xml.soap.SOAPException,
                                      ClassNotFoundException,
                                      IllegalAccessException,
                                      InstantiationException,
                                      InvocationTargetException,
                                      NotSerializableException,
                                      IntrospectionException
Turns an I*E attribute into a SOAPElement. Assumes multi-valued attributes are NOT polymorphic.

Parameters:
att - The attribute.
parent - The parent element to add the attribute to.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

attributeToElement

public static void attributeToElement(Attribute att,
                                      javax.xml.soap.SOAPElement parent,
                                      javax.xml.soap.SOAPMessage message,
                                      String eName,
                                      boolean type,
                                      boolean qualify)
                               throws javax.xml.soap.SOAPException,
                                      ClassNotFoundException,
                                      IllegalAccessException,
                                      InstantiationException,
                                      InvocationTargetException,
                                      NotSerializableException,
                                      IntrospectionException
Turns an I*E attribute into a SOAPElement. Assumes multi-valued attributes are NOT polymorphic.

Parameters:
att - The attribute.
parent - The parent element to add the attribute to.
message - The associated SOAP message.
eName - The element name to create.
type - Should the element be typed?
qualify - Should the element be qualified?
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

addMeta

public static void addMeta(Data ieobj,
                           javax.xml.soap.SOAPElement parent,
                           javax.xml.soap.SOAPMessage message)
                    throws javax.xml.soap.SOAPException,
                           ClassNotFoundException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException,
                           NotSerializableException,
                           IntrospectionException
If available adds meta information to a parent SOAP element.

Parameters:
ieobj - The I*E object.
parent - The parent SOAP element.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToCollection

public static Collection elementToCollection(javax.xml.soap.SOAPElement elm,
                                             javax.xml.soap.SOAPMessage message)
                                      throws javax.xml.soap.SOAPException,
                                             ClassNotFoundException,
                                             IllegalAccessException,
                                             InstantiationException,
                                             InvocationTargetException,
                                             NotSerializableException,
                                             IntrospectionException
Turns a SOAPElement representing an I*E collection back into a collection.

Parameters:
elm - The SOAP element.
message - The associated SOAP message.
Returns:
The deserialized collection.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToGroup

public static Group elementToGroup(javax.xml.soap.SOAPElement elm,
                                   javax.xml.soap.SOAPMessage message)
                            throws javax.xml.soap.SOAPException,
                                   ClassNotFoundException,
                                   IllegalAccessException,
                                   InstantiationException,
                                   InvocationTargetException,
                                   NotSerializableException,
                                   IntrospectionException
Turns a SOAPElement representing an I*E group back into a group.

Parameters:
elm - The SOAP element.
message - The associated SOAP message.
Returns:
The deserialized group.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToElement

public static Element elementToElement(javax.xml.soap.SOAPElement elm,
                                       javax.xml.soap.SOAPMessage message)
                                throws javax.xml.soap.SOAPException,
                                       ClassNotFoundException,
                                       IllegalAccessException,
                                       InstantiationException,
                                       InvocationTargetException,
                                       NotSerializableException,
                                       IntrospectionException
Turns a SOAPElement representing an I*E element back into a element. Odd overload.

Parameters:
elm - The SOAP element.
message - The associated SOAP message.
Returns:
The deserialized element.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

elementToAttribute

public static Attribute elementToAttribute(javax.xml.soap.SOAPElement elm,
                                           javax.xml.soap.SOAPMessage message)
                                    throws javax.xml.soap.SOAPException,
                                           ClassNotFoundException,
                                           IllegalAccessException,
                                           InstantiationException,
                                           InvocationTargetException,
                                           NotSerializableException,
                                           IntrospectionException
Turns a SOAPElement representing an I*E attribute back into a attribute.

Parameters:
elm - The SOAP element.
message - The associated SOAP message.
Returns:
The deserialized attribute.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

getMeta

public static void getMeta(Data ieobj,
                           javax.xml.soap.SOAPElement elm,
                           javax.xml.soap.SOAPMessage message)
                    throws javax.xml.soap.SOAPException,
                           ClassNotFoundException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException,
                           NotSerializableException,
                           IntrospectionException
Repopulates meta data on an I*E object from a SOAP element.

Parameters:
ieobj - The I*E data object to put meta back into.
elm - The SOAP element.
message - The associated SOAP message.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
IllegalAccessException
InstantiationException
InvocationTargetException
NotSerializableException
IntrospectionException

findChildByLocalName

public static javax.xml.soap.SOAPElement findChildByLocalName(javax.xml.soap.SOAPElement parent,
                                                              String localName)
                                                       throws javax.xml.soap.SOAPException
Searches an element for a child by its local name.

Parameters:
parent - The element to search.
localName - The name to search for.
Returns:
The found child or null.
Throws:
javax.xml.soap.SOAPException

setElementType

public void setElementType(javax.xml.soap.SOAPElement elm,
                           Object o)
                    throws javax.xml.soap.SOAPException
Sets the xsi:type on a SOAPElement to the appropriate value based on an object.

Parameters:
elm - The SOAPElement to define the type on. Cannot be null.
o - The object. Cannot be null. Cannot be an array.
Throws:
javax.xml.soap.SOAPException

serializeIEDataArray

private static javax.xml.soap.SOAPElement serializeIEDataArray(String eName,
                                                               int type,
                                                               Object[] objects,
                                                               javax.xml.soap.SOAPElement parent,
                                                               javax.xml.soap.SOAPMessage message,
                                                               String arrayMemberName)
                                                        throws javax.xml.soap.SOAPException,
                                                               ClassNotFoundException,
                                                               InstantiationException,
                                                               IllegalAccessException,
                                                               NotSerializableException,
                                                               IntrospectionException,
                                                               InvocationTargetException
Used internally to serialize arrays of I*E data structure objects. Since this is the lightweight version the objects must be from the com.infoengine.connector package.

Parameters:
eName - The array element name to create.
type - The type of object (must be one of SOAPUtils.TYPE_IE*).
objects - The array of objects.
parent - The parent element.
message - The SOAP message.
arrayMemberName - The name to use when creating array members.
Returns:
The SOAP array element.
Throws:
javax.xml.soap.SOAPException
ClassNotFoundException
InstantiationException
IllegalAccessException
NotSerializableException
IntrospectionException
InvocationTargetException

countChildElements

public static int countChildElements(javax.xml.soap.SOAPElement elm)
Counts the number of SOAPElement children within an element.

Parameters:
elm - The SOAPElement object to count the children of.
Returns:
The number of children.

writeTo

public static void writeTo(javax.xml.soap.SOAPMessage msg,
                           OutputStream os)
                    throws javax.xml.soap.SOAPException,
                           IOException
Throws:
javax.xml.soap.SOAPException
IOException

saveChanges

public static void saveChanges(javax.xml.soap.SOAPMessage msg)
                        throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

getSOAPBody

public static javax.xml.soap.SOAPBody getSOAPBody(javax.xml.soap.SOAPMessage msg)
                                           throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

getSOAPHeader

public static javax.xml.soap.SOAPHeader getSOAPHeader(javax.xml.soap.SOAPMessage msg)
                                               throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

getEnvelope

public static javax.xml.soap.SOAPEnvelope getEnvelope(javax.xml.soap.SOAPMessage msg)
                                               throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException