uk.ac.ncl.cs.instantsoap.test
Class JaxbBaseTest

java.lang.Object
  extended by uk.ac.ncl.cs.instantsoap.test.JaxbBaseTest

public abstract class JaxbBaseTest
extends Object

Helpful test functionality for jaxb serialization.

Author:
Matthew Pocock

Field Summary
protected  DocumentBuilderFactory dbFactory
           
protected  DocumentBuilder dBuilder
           
protected  JAXBContext jContext
           
protected  Marshaller marshaller
           
protected  Unmarshaller unmarshaller
           
 
Constructor Summary
JaxbBaseTest()
           
 
Method Summary
protected abstract  Class[] jaxbClasses()
           
protected
<T> void
marshalUnmarshalValue(T val)
           
protected
<T> Document
marshalValue(T val)
           
protected  Document parseXML(String xml)
           
 void setUpJAXB()
           
 void setUpXML()
           
protected
<T> T
unmarshalValue(Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jContext

protected JAXBContext jContext

marshaller

protected Marshaller marshaller

unmarshaller

protected Unmarshaller unmarshaller

dbFactory

protected DocumentBuilderFactory dbFactory

dBuilder

protected DocumentBuilder dBuilder
Constructor Detail

JaxbBaseTest

public JaxbBaseTest()
Method Detail

jaxbClasses

protected abstract Class[] jaxbClasses()

setUpJAXB

public void setUpJAXB()
               throws JAXBException
Throws:
JAXBException

setUpXML

public void setUpXML()
              throws ParserConfigurationException
Throws:
ParserConfigurationException

marshalValue

protected <T> Document marshalValue(T val)
                         throws JAXBException
Throws:
JAXBException

marshalUnmarshalValue

protected <T> void marshalUnmarshalValue(T val)
                              throws JAXBException
Throws:
JAXBException

unmarshalValue

protected <T> T unmarshalValue(Document doc)
                    throws JAXBException
Throws:
JAXBException

parseXML

protected Document parseXML(String xml)
                     throws IOException,
                            SAXException
Throws:
IOException
SAXException


Copyright © 2006-2008. All Rights Reserved.