Class TrailingBlocks
- java.lang.Object
-
- org.apache.cxf.aegis.type.encoded.TrailingBlocks
-
public class TrailingBlocks extends Object
TrailingBlocks reads and writes the extra objects referenced but not written in the main message parts. These objects are commonly refered to as serialization (SOAP spec) roots and trailing blocks (JaxRpc spec). This class uses ObjectType to perform the actual reading and writting, so each block will (and must) contain an xsi type element. Typically, all message parts are read or written using the SoapRefType and before closing the SOAP body element the trailing blocks are read or written using this class.
-
-
Constructor Summary
Constructors Constructor Description TrailingBlocks()TrailingBlocks(ObjectType objectType)TrailingBlocks(TypeMapping typeMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectTypegetObjectType()Gets the ObjectType used to read and write the trailing block instances.List<Object>readBlocks(MessageReader reader, Context context)Reads all remailing elements in the reader and registers them with the SoapRefRegistry in the context.voidsetObjectType(ObjectType objectType)Sets the ObjectType used to read and write the trailing block instances.List<Object>writeBlocks(MessageWriter writer, Context context)Writes all of the unmarshalled objects in the MarshalRegistry.
-
-
-
Constructor Detail
-
TrailingBlocks
public TrailingBlocks()
-
TrailingBlocks
public TrailingBlocks(TypeMapping typeMapping)
-
TrailingBlocks
public TrailingBlocks(ObjectType objectType)
-
-
Method Detail
-
getObjectType
public ObjectType getObjectType()
Gets the ObjectType used to read and write the trailing block instances.- Returns:
- the ObjectType used to read and write the trailing block instances.
-
setObjectType
public void setObjectType(ObjectType objectType)
Sets the ObjectType used to read and write the trailing block instances.- Parameters:
objectType- the ObjectType used to read and write the trailing block instances.
-
readBlocks
public List<Object> readBlocks(MessageReader reader, Context context) throws DatabindingException
Reads all remailing elements in the reader and registers them with the SoapRefRegistry in the context.- Parameters:
reader- the stream to readcontext- the unmarshal context- Returns:
- a list containing the object instances read
- Throws:
DatabindingException- if a trailing block element does not contain a soap id attribute
-
writeBlocks
public List<Object> writeBlocks(MessageWriter writer, Context context)
Writes all of the unmarshalled objects in the MarshalRegistry.- Parameters:
writer- the stream to write the objectscontext- the marshal context- Returns:
- a list containing the object instances written
-
-