|
Artix User APIs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.iona.jbus.util.XMLUtils
The XMLUtils class is a utility class
that is used to convert a Java Object into XML and
XML into a Java Object.
To carry out these conversions, the XMLUtils
class must have a knowledge of the object's members,
which it obtains from a type definition in a WSDL file.
Consequently, a schema describing the object must be
included in the types section of a WSDL file, and the
location of the WSDL file is passed as a parameter to
each of this class' public methods.
| Method Summary | |
static Object |
eprFromXML(String xml)
Converts XML into a WS-Addressing epr reference object. |
static String |
eprToXML(Object epr)
Converts a WS-Addressing epr reference object into XML. |
static Object |
fromXML(String xml,
QName qname,
Class cls,
String schemaPath)
Converts XML into an object. |
static Object |
fromXML(String xml,
QName elementQName,
QName typeQName,
Class cls,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
Converts XML into an object. |
static Object |
fromXML(String xml,
QName elementQName,
QName typeQName,
Class cls,
String schemaPath)
Converts XML into an object. |
static QName |
getObjectQName(Object obj)
Obtains the typeQName from an artix type. |
static Object |
referenceFromXML(String xml)
Converts XML into a reference object. |
static String |
referenceToXML(Object ref)
Converts a reference object into XML. |
static String |
toXML(Object obj,
String schemaPath)
Converts an object into XML. |
static String |
toXML(QName qname,
Object obj,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
Converts an object into XML. |
static String |
toXML(QName qname,
Object obj,
String schemaPath)
Converts an object into XML. |
static String |
toXML(QName elementQName,
QName typeQName,
Object obj,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
Converts an object into XML. |
static String |
toXML(QName elementQName,
QName typeQName,
Object obj,
String schemaPath)
Converts an object into XML. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String toXML(Object obj,
String schemaPath)
throws WriteException
obj - the object to be converted into XML.schemaPath - the url to the location of the WSDL/Schema file.
WriteException - If there is an error in the conversion.
public static String toXML(QName qname,
Object obj,
String schemaPath)
throws WriteException
qname - the qname of the schema type respresenting the object.obj - the object to be converted into XML.schemaPath - the url to the location of the WSDL/Schema.
WriteException - If there is an error in the conversion.
public static String toXML(QName qname,
Object obj,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
throws WriteException
qname - the qname of the schema type respresenting the object.obj - the object to be converted into XML.wsdlModel - the model of the WSDL/Schema.factory - the SchemaTypeFactory of the WSDL/Schema.
WriteException - If there is an error in the conversion.
public static String toXML(QName elementQName,
QName typeQName,
Object obj,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
throws WriteException
elementQName - the qname of the element representing the object.typeQName - the qname of the schema type respresenting the object.obj - the object to be converted into XML.wsdlModel - the model of the WSDL/Schema.factory - the SchemaTypeFactory of the WSDL/Schema.
WriteException - If there is an error in the conversion.
public static String toXML(QName elementQName,
QName typeQName,
Object obj,
String schemaPath)
throws WriteException
elementQName - the qname of the element representing the object.typeQName - the qname of the schema type respresenting the object.obj - the object to be converted into XML.schemaPath - the url to the location of the WSDL/Schema file.
WriteException - If there is an error in the conversion.
public static String referenceToXML(Object ref)
throws WriteException
ref - the reference object to be converted into XML.
WriteException - If there is an error in the conversion.
public static String eprToXML(Object epr)
throws WriteException
epr - the reference object to be converted into XML.
WriteException - If there is an error in the conversion.
public static Object eprFromXML(String xml)
throws ReadException
xml - the xml string representation of the reference object.
ReadException - If there is an error in the conversion.
public static Object fromXML(String xml,
QName qname,
Class cls,
String schemaPath)
throws ReadException
xml - the xml string representation of the object.qname - the qname of the schema type respresenting the object.cls - the class of the object.schemaPath - the url to the location of the WSDL/Schema file.
ReadException - If there is an error in the conversion.
public static Object fromXML(String xml,
QName elementQName,
QName typeQName,
Class cls,
com.iona.webservices.wsdl.model.Model wsdlModel,
com.iona.webservices.reflect.wsdl.SchemaTypeFactory factory)
throws ReadException
xml - the xml string representation of the object.elementQName - the qname of the element respresenting the object.typeQName - the qname of the schema type respresenting the object.cls - the class of the object.wsdlModel - the model of the WSDL/Schema.factory - the SchemaTypeFactory of the WSDL/Schema.
ReadException - If there is an error in the conversion.
public static Object fromXML(String xml,
QName elementQName,
QName typeQName,
Class cls,
String schemaPath)
throws ReadException
xml - the xml string representation of the object.elementQName - the qname of the element respresenting the object.typeQName - the qname of the schema type respresenting the object.cls - the class of the object.schemaPath - the url to the location of the WSDL/Schema file.
ReadException - If there is an error in the conversion.
public static Object referenceFromXML(String xml)
throws ReadException
xml - the xml string representation of the reference object.
ReadException - If there is an error in the conversion.public static QName getObjectQName(Object obj)
obj - the artix type
|
Artix User APIs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||