Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The problem:
Axis2 uses StAXUtils to get XMLInputFactory and XMLOutputFactory instances. In general the user has no control over the properties that are set on these factories, though this would sometimes be desirable, e.g. to control how CDATA sections are handled (see e.g. SYNAPSE-280). Actually code using StAXUtils should not modify any properties on the factories: since they are cached, this could have undesirable side effects.
Proposed solution:
Let StAXUtils look for property files with well defined names (XMLInputFactory.properties and XMLOutputFactory.properties) in the classpath, using the same classloader as the one from which the factory is loaded (by default this is the context classloader). The content of these files would then be used to initialize the factory properties. This mechanism would allow the user to easily apply a custom factory configuration to a given instance of Axis2 or Synapse. Since StAXUtils caches created factories, the overhead introduced by this feature is minimal.
Attachments
Issue Links
- blocks
-
SYNAPSE-280 Synapse doesn't preserve CDATA sections
- Resolved