Types Derived By Restriction or Extension
For complex types derived by restriction or extension, HydraExpress generates a class that inherits from the class that represents the base type.
For types derived by restriction, the derived class overrides the marshal and unmarshal methods to marshal only the elements and attributes present in the derived type.
For types derived by extension, the derived class holds the data that is not present in the base type. The derived class overrides the marshal and unmarshal methods to correctly marshal the derived type.
The accessors for methods that return polymorphic types return the base type. The
getTypeId() returns the name of the type. To ensure that your logic behaves properly according to the actual type of the object, invoke the method
getTypeId() before casting the object to the derived type. See
Accessing the Address for an example.