T - Class we are serializing.public class JaxBSerializer<T> extends Object
| Constructor and Description |
|---|
JaxBSerializer(Class<T> clazz,
QName qname)
Constructs a JAX-WS serializer for the specified class.
|
| Modifier and Type | Method and Description |
|---|---|
String |
serialize(T object)
Serializes the object.
|
String |
serialize(T object,
boolean includeXmlDeclaration)
Serializes the object with the option to include or exclude the XML declaration.
|
public JaxBSerializer(Class<T> clazz, QName qname)
clazz - Class to serialize.qname - A QName representing the local name for the class - this will be used as the root
tag name.org.apache.commons.lang.SerializationException - if unable to construct the serializer.Copyright © 2018. All Rights Reserved.