Skip to content

Expose suppressNamespace and suppressXSIType as properties to CastorMarshaller [SWS-548] #672

@gregturn

Description

@gregturn

Arnaud Jeansen opened SWS-548 and commented

The CastorMarshaller class supports customization of the underlying org.exolab.castor.Marshaller with the customizeMarshaller method.

However, some properties are already directly exposed to spring's CastorMarshaller as settable fields. This lets users add properties in the spring configuration rather than subclass CastorMarshaller.

I am asking for the addition of two fields to the standard properties of CastorMarshaller, so that this subclassing is not needed anymore.

  • suppressXSIType
  • suppressNamespaces

This would mean adding two fields in CastorMarshaller, adding the two corresponding setters, and adding the following code at the beginning of the customizeMarshaller method:

protected void customizeMarshaller(Marshaller marshaller) {
	marshaller.setSuppressNamespaces(this.suppressNamespaces);
	marshaller.setSuppressXSIType(this.suppressXSIType);
            [....]
}

Proper defaults can be given to the two fields so that today's behaviour is not affected by this change unless the fields are set by the spring configuration.


Affects: 1.5.7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions