com.google.api.ads.common.lib.soap.jaxb
Class JaxBSerializer<T>

java.lang.Object
  extended by com.google.api.ads.common.lib.soap.jaxb.JaxBSerializer<T>
Type Parameters:
T - Class we are serializing.

public class JaxBSerializer<T>
extends Object

Serializes a JAX-WS generated class to XML.

Author:
Kevin Winter

Constructor Summary
JaxBSerializer(Class<T> clazz, QName qname)
          Constructs a JAX-WS serializer for the specified class.
 
Method Summary
 String serialize(T object)
          Serializes the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxBSerializer

public JaxBSerializer(Class<T> clazz,
                      QName qname)
Constructs a JAX-WS serializer for the specified class.

Parameters:
clazz - Class to serialize.
qname - A QName representing the local name for the class - this will be used as the root tag name.
Method Detail

serialize

public String serialize(T object)
Serializes the object.

Throws:
org.apache.commons.lang.SerializationException - if we cannot serialize the object.


Copyright © 2012. All Rights Reserved.