Spring Web Services Framework

org.springframework.ws.client.core
Interface SourceExtractor<T>


public interface SourceExtractor<T>

Callback interface for extracting a result object from a Source instance.

Used for output object creation in WebServiceTemplate. Alternatively, output sources can also be returned to client code as-is. In case of a source as execution result, you will almost always want to implement a SourceExtractor, to be able to read the message content in a managed fashion, with the connection still open while reading the message.

Implementations of this interface perform the actual work of extracting results, but don't need to worry about exception handling, or resource handling.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
WebServiceTemplate

Method Summary
 T extractData(Source source)
          Process the data in the given Source, creating a corresponding result object.
 

Method Detail

extractData

T extractData(Source source)
              throws IOException,
                     TransformerException
Process the data in the given Source, creating a corresponding result object.

Parameters:
source - the message payload to extract data from
Returns:
an arbitrary result object, or null if none (the extractor will typically be stateful in the latter case)
Throws:
IOException - in case of I/O errors
TransformerException

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.