|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.ogsa.utils.AnyHelper
The AnyHelper
is a utility that simplifies the serialization
and deserialization of objects (e.g. Java Beans), strings and DOM Elements
inside of types containing the XML Schema any element type, for example
ExtensibilityType
. This class
should only be used in conjunction with sending or receiving a SOAP message.
If out-of-band serialization is needed (e.g. in a background thread), then
the ObjectSerializer
should be used instead. Also note that all the objects used with this API
must either be types generated from an XML Schema definition, or have a
standard or custom typemapping.
Constructor Summary | |
AnyHelper()
|
Method Summary | |
static boolean |
contains(org.apache.axis.encoding.AnyContentType any,
java.lang.Class javaClass)
Checks to see whether type containing any element contains elements of type javaClass. |
static org.w3c.dom.Element[] |
getAsElement(org.apache.axis.encoding.AnyContentType any)
Converts type containing any element to an array of DOM Elements. |
static org.w3c.dom.Element |
getAsElement(WSDLReferenceType reference)
Returns a DOM Element representation of a WSDLReferenceType, often contained inside of a LocatorType |
static java.lang.Object[] |
getAsObject(org.apache.axis.encoding.AnyContentType extensibility)
Converts type containing any element to an array of java objects. |
static java.lang.Object[] |
getAsObject(org.apache.axis.encoding.AnyContentType extensibility,
java.lang.Class javaClass)
Converts type containing any element to an array of java objects. |
static org.w3c.dom.Element |
getAsParentElement(org.apache.axis.encoding.AnyContentType any)
Converts type containing any element to a single DOM Element, representing the parent MessageElement. |
static java.lang.String |
getAsParentString(org.apache.axis.encoding.AnyContentType any)
Converts type containing any element to a String, representing the parent MessageElement. |
static java.lang.String |
getAsRawString(org.apache.axis.encoding.AnyContentType extensibility)
Converts type containing any element to a String (not formatted) |
static ServiceDataAttributes[] |
getAsServiceData(org.apache.axis.encoding.AnyContentType serviceData)
Converts type containing any element to service data attributes. |
static ServiceDataAttributes[] |
getAsServiceData(org.apache.axis.encoding.AnyContentType serviceData,
java.lang.Class javaClass)
Converts type containing any element to service data attributes. |
static ServiceDataValuesType |
getAsServiceDataValues(org.apache.axis.encoding.AnyContentType extensibility)
Converts type containing any element to a ServiceDataValuesType. |
static org.w3c.dom.Element |
getAsSingleElement(org.apache.axis.encoding.AnyContentType any)
Converts type containing any element to a single DOM Element. |
static java.lang.Object |
getAsSingleObject(org.apache.axis.encoding.AnyContentType extensibility)
Converts type containing any element to a java object. |
static java.lang.Object |
getAsSingleObject(org.apache.axis.encoding.AnyContentType extensibility,
java.lang.Class javaClass)
Converts type containing any element to a java object. |
static ServiceDataAttributes |
getAsSingleServiceData(org.apache.axis.encoding.AnyContentType serviceData)
Converts type containing any element to service data attributes, wrapping a single element. |
static ServiceDataAttributes |
getAsSingleServiceData(org.apache.axis.encoding.AnyContentType serviceData,
java.lang.Class javaClass)
Converts type containing any element to service data attributes, wrapping a single element. |
static java.lang.String |
getAsString(org.apache.axis.encoding.AnyContentType extensibility)
Converts type containing any element to a String, formatted pretty for output. |
static ExtensibilityType |
getExtensibility(java.lang.Object obj)
Converts an arbitrary object to an Extensibility type. |
static ExtensibilityType |
getExtensibility(java.lang.Object obj,
javax.xml.namespace.QName qname)
Converts an arbitrary object to an Extensibility type. |
static ExtensibilityType |
getServiceDataValues(java.lang.Object obj)
Converts an arbitrary object to an Extensibility type. |
static org.apache.axis.message.MessageElement |
toAny(java.lang.Object obj)
Populates a SOAP MessageElement with an arbitrary object. |
static org.apache.axis.message.MessageElement[] |
toAny(java.lang.Object[] obj)
Populates a SOAP MessageElement array with an array of arbitrary objects. |
static org.apache.axis.message.MessageElement |
toAny(java.lang.Object obj,
javax.xml.namespace.QName qname)
Populates a SOAP MessageElement with an arbitrary object. |
static org.apache.axis.message.MessageElement |
toAnyTypeElement(java.lang.Object obj)
Populates a SOAP MessageElement with an arbitrary object, and wraps it inside of a value element with an xsi:type attribute. |
static org.w3c.dom.Element |
toElement(org.apache.axis.message.MessageElement element)
Converts a SOAP MessageElement to a DOM Element representation |
static org.w3c.dom.Element[] |
toElement(org.apache.axis.message.MessageElement[] element)
Array version of toElement |
static java.lang.Object |
toObject(org.apache.axis.message.MessageElement element)
Converts a SOAP MessageElement to a typed Java object representation. |
static java.lang.Object[] |
toObject(org.apache.axis.message.MessageElement[] element)
Array version of toObject |
static java.lang.Object[] |
toObject(org.apache.axis.message.MessageElement[] element,
java.lang.Class javaClass)
Array version of toObject |
static java.lang.Object |
toObject(org.apache.axis.message.MessageElement element,
java.lang.Class javaClass)
Converts a SOAP MessageElement to a typed Java object representation. |
static ServiceDataAttributes |
toServiceData(org.apache.axis.message.MessageElement element)
Converts a SOAP MessageElement to a typed Java object representation, and wraps it inside of a ServiceDataAttribute object holding attributes that the element might have been decorated with. |
static ServiceDataAttributes[] |
toServiceData(org.apache.axis.message.MessageElement[] element)
Array version of toServiceData |
static ServiceDataAttributes[] |
toServiceData(org.apache.axis.message.MessageElement[] element,
java.lang.Class javaClass)
Array version of toServiceData |
static ServiceDataAttributes |
toServiceData(org.apache.axis.message.MessageElement element,
java.lang.Class javaClass)
Converts a SOAP MessageElement to a typed Java object representation, and wraps it inside of a ServiceDataAttribute object holding attributes that the element might have been decorated with. |
static java.lang.String |
toString(org.apache.axis.message.MessageElement element)
Converts a SOAP MessageElement to an XML String representation |
static java.lang.String[] |
toString(org.apache.axis.message.MessageElement[] element)
Array version of toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnyHelper()
Method Detail |
public static org.apache.axis.message.MessageElement[] toAny(java.lang.Object[] obj) throws GridServiceException
obj
- array of objects to be serialized in the any element
GridServiceException
- if the object cannot be put
in a MessageElementpublic static org.apache.axis.message.MessageElement toAnyTypeElement(java.lang.Object obj)
obj
- object to be serialized in the any element
public static org.apache.axis.message.MessageElement toAny(java.lang.Object obj) throws GridServiceException
obj
- object to be serialized in the any element
GridServiceException
- if the object cannot be put
in a MessageElementpublic static org.apache.axis.message.MessageElement toAny(java.lang.Object obj, javax.xml.namespace.QName qname) throws GridServiceException
obj
- object to be serialized in the any elementqname
- name of element the value should be wrapped inside, if null
value element wrapping will be used
GridServiceException
- if the object cannot be put
in a MessageElementpublic static org.w3c.dom.Element toElement(org.apache.axis.message.MessageElement element) throws GridServiceException
element
- SOAP MessageElement to be converted
GridServiceException
- if the DOM Element could not be createdpublic static java.lang.String toString(org.apache.axis.message.MessageElement element)
element
- SOAP MessageElement to be converted
public static java.lang.Object toObject(org.apache.axis.message.MessageElement element) throws GridServiceException
element
- SOAP MessageElement to be converted
GridServiceException
- if the input could not be deserialized into
a java type, for example because of missing type mappingspublic static java.lang.Object toObject(org.apache.axis.message.MessageElement element, java.lang.Class javaClass) throws GridServiceException
element
- SOAP MessageElement to be convertedjavaClass
- Class containing meta data about how to deserialize
the object.
GridServiceException
- if the input could not be deserialized into
a java type, for example because of missing meta data in the javaClass
input type.public static ServiceDataAttributes toServiceData(org.apache.axis.message.MessageElement element) throws GridServiceException
element
- SOAP MessageElement to be converted
GridServiceException
- if the input could not be deserialized into
a java type, for example because of missing type mappingspublic static ServiceDataAttributes toServiceData(org.apache.axis.message.MessageElement element, java.lang.Class javaClass) throws GridServiceException
element
- SOAP MessageElement to be convertedjavaClass
- Class containing meta data about how to deserialize
the object.
GridServiceException
- if the input could not be deserialized into
a java type, for example because of missing meta data in the javaClass
input type.public static java.lang.String[] toString(org.apache.axis.message.MessageElement[] element)
toString
public static org.w3c.dom.Element[] toElement(org.apache.axis.message.MessageElement[] element) throws GridServiceException
toElement
GridServiceException
public static java.lang.Object[] toObject(org.apache.axis.message.MessageElement[] element) throws GridServiceException
toObject
GridServiceException
public static java.lang.Object[] toObject(org.apache.axis.message.MessageElement[] element, java.lang.Class javaClass) throws GridServiceException
toObject
GridServiceException
public static ServiceDataAttributes[] toServiceData(org.apache.axis.message.MessageElement[] element) throws GridServiceException
toServiceData
GridServiceException
public static ServiceDataAttributes[] toServiceData(org.apache.axis.message.MessageElement[] element, java.lang.Class javaClass) throws GridServiceException
toServiceData
GridServiceException
public static ServiceDataAttributes[] getAsServiceData(org.apache.axis.encoding.AnyContentType serviceData) throws GridServiceException
GridServiceException
toServiceData(MessageElement element)
public static ServiceDataAttributes[] getAsServiceData(org.apache.axis.encoding.AnyContentType serviceData, java.lang.Class javaClass) throws GridServiceException
GridServiceException
toServiceData(MessageElement element, Class javaClass)
public static ServiceDataAttributes getAsSingleServiceData(org.apache.axis.encoding.AnyContentType serviceData) throws GridServiceException
GridServiceException
toServiceData(MessageElement element)
public static ServiceDataAttributes getAsSingleServiceData(org.apache.axis.encoding.AnyContentType serviceData, java.lang.Class javaClass) throws GridServiceException
GridServiceException
toServiceData(MessageElement element, Class javaClass)
public static java.lang.Object[] getAsObject(org.apache.axis.encoding.AnyContentType extensibility) throws GridServiceException
GridServiceException
toObject(MessageElement element)
public static java.lang.Object[] getAsObject(org.apache.axis.encoding.AnyContentType extensibility, java.lang.Class javaClass) throws GridServiceException
GridServiceException
toObject(MessageElement element, Class javaClass)
public static java.lang.Object getAsSingleObject(org.apache.axis.encoding.AnyContentType extensibility) throws GridServiceException
GridServiceException
toObject(MessageElement element)
public static ServiceDataValuesType getAsServiceDataValues(org.apache.axis.encoding.AnyContentType extensibility) throws GridServiceException
GridServiceException
toObject(MessageElement element)
public static java.lang.Object getAsSingleObject(org.apache.axis.encoding.AnyContentType extensibility, java.lang.Class javaClass) throws GridServiceException
GridServiceException
toObject(MessageElement element, Class javaClass)
public static org.w3c.dom.Element getAsElement(WSDLReferenceType reference) throws GridServiceException
LocatorType
GridServiceException
public static org.w3c.dom.Element getAsSingleElement(org.apache.axis.encoding.AnyContentType any) throws GridServiceException
GridServiceException
toElement(MessageElement element)
public static org.w3c.dom.Element[] getAsElement(org.apache.axis.encoding.AnyContentType any) throws GridServiceException
GridServiceException
toElement(MessageElement element)
public static org.w3c.dom.Element getAsParentElement(org.apache.axis.encoding.AnyContentType any) throws GridServiceException
GridServiceException
toElement(MessageElement element)
public static boolean contains(org.apache.axis.encoding.AnyContentType any, java.lang.Class javaClass)
public static java.lang.String getAsParentString(org.apache.axis.encoding.AnyContentType any) throws GridServiceException
GridServiceException
toString(MessageElement element)
public static java.lang.String getAsString(org.apache.axis.encoding.AnyContentType extensibility) throws GridServiceException
getAsRawString()
.
GridServiceException
toString(MessageElement element)
public static java.lang.String getAsRawString(org.apache.axis.encoding.AnyContentType extensibility)
toString(MessageElement element)
public static ExtensibilityType getExtensibility(java.lang.Object obj) throws GridServiceException
toAny
GridServiceException
public static ExtensibilityType getExtensibility(java.lang.Object obj, javax.xml.namespace.QName qname) throws GridServiceException
toAny
GridServiceException
public static ExtensibilityType getServiceDataValues(java.lang.Object obj) throws GridServiceException
GridServiceException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |