Spring Web Services Framework

org.springframework.oxm.support
Class MarshallingSource

java.lang.Object
  extended by javax.xml.transform.sax.SAXSource
      extended by org.springframework.oxm.support.MarshallingSource
All Implemented Interfaces:
Source

public class MarshallingSource
extends SAXSource

Source implementation that uses a Marshaller.Can be constructed with a Marshaller and an object to be marshalled.

Even though StaxSource extends from SAXSource, calling the methods of SAXSource is not supported. In general, the only supported operation on this class is to use the XMLReader obtained via SAXSource.getXMLReader() to parse the input source obtained via SAXSource.getInputSource(). Calling SAXSource.setXMLReader(org.xml.sax.XMLReader) or SAXSource.setInputSource(org.xml.sax.InputSource) will result in UnsupportedOperationExceptions.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
Transformer

Field Summary
 
Fields inherited from class javax.xml.transform.sax.SAXSource
FEATURE
 
Constructor Summary
MarshallingSource(Marshaller marshaller, Object content)
          Creates a new MarshallingSource with the given marshaller and content.
 
Method Summary
 Object getContent()
          Returns the object to be marshalled.
 Marshaller getMarshaller()
          Returns the Marshaller used by this MarshallingSource.
 
Methods inherited from class javax.xml.transform.sax.SAXSource
getInputSource, getSystemId, getXMLReader, setInputSource, setSystemId, setXMLReader, sourceToInputSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallingSource

public MarshallingSource(Marshaller marshaller,
                         Object content)
Creates a new MarshallingSource with the given marshaller and content.

Parameters:
marshaller - the marshaller to use
content - the object to be marshalled
Method Detail

getMarshaller

public Marshaller getMarshaller()
Returns the Marshaller used by this MarshallingSource.


getContent

public Object getContent()
Returns the object to be marshalled.


Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.