Class SoapRefRegistry
java.lang.Object
org.apache.cxf.aegis.type.encoded.SoapRefRegistry
SoapRefRegistry handles resolving all SOAP encoded references. After each object is unmarshalled if the
xml contained a SOAP id attribute it is registered with that attribute. As each object is unmarshalled if
any nested elements have a SOAP ref attribute it, the references is registered. If there is a object
instance already registered with the referenced id, the SOAP reference is immediately set. Otherwise, the
reference is set when an object instance is registered with the id. This allows for the objects to occur
in any order in the XML document.
Note: only the StructType and TraillingBlocks register objects with this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstance(String id, Object instance) Add an object instance to the registry.voidAdds a reference to the specified id.static SoapRefRegistryGet the SoapRefRegistry stored in the context, and if necessary create a new one.getIds()Gets the ids of the registered object instances.Gets the unresolved SOAP references by referenced id.
-
Constructor Details
-
SoapRefRegistry
public SoapRefRegistry()
-
-
Method Details
-
get
Get the SoapRefRegistry stored in the context, and if necessary create a new one.- Parameters:
context- the unmarshal context- Returns:
- the SoapRefRegistry; never null
-
addInstance
Add an object instance to the registry.- Parameters:
id- the unique identifier of the instanceinstance- the instance- Throws:
DatabindingException- if another object instance is already registered with the id
-
addRef
Adds a reference to the specified id. If an object is already registered with the specified id, the SOAP reference will immedately be set. Otherwise, the reference will be set when an object is registered with the specified id.- Parameters:
id- the id of the referenced object instancesoapRef- the reference to set
-
getIds
Gets the ids of the registered object instances.- Returns:
- the ids of the registered object instances
-
getUnresolvedRefs
Gets the unresolved SOAP references by referenced id.- Returns:
- the unresolved SOAP references by referenced id
-