Class TrailingBlocks
java.lang.Object
org.apache.cxf.aegis.type.encoded.TrailingBlocks
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
ConstructorsConstructorDescriptionTrailingBlocks(ObjectType objectType) TrailingBlocks(TypeMapping typeMapping) -
Method Summary
Modifier and TypeMethodDescriptionGets the ObjectType used to read and write the trailing block instances.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.writeBlocks(MessageWriter writer, Context context) Writes all of the unmarshalled objects in the MarshalRegistry.
-
Constructor Details
-
TrailingBlocks
public TrailingBlocks() -
TrailingBlocks
-
TrailingBlocks
-
-
Method Details
-
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
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
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
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
-