[SWS-434] JibxMarshaller - marshalSaxHandlers Created: 01/Oct/08  Updated: 04/May/12  Resolved: 12/Dec/08

Status: Closed
Project: Spring Web Services
Component/s: OXM
Affects Version/s: 1.5.4
Fix Version/s: 1.5.6

Type: Bug Priority: Major
Reporter: Aschauer Maria Assignee: Tareq Abedrabbo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File SWS-434.patch    
Issue Links:
Duplicate
is duplicated by SWS-455 Mangled predefined xml 'special chara... Closed
is duplicated by SWS-445 CLONE -JibxMarshaller - marshalSaxHan... Closed

 Description   

JiBX does not support SAX natively, so there is written to a buffer first:

ByteArrayOutputStream os = new ByteArrayOutputStream();
marshalOutputStream(graph, os);
ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());

the character < results in &<; and not in < as expected.

http://forum.springframework.org/showthread.php?t=55407&highlight=SAXResult



 Comments   
Comment by Arjen Poutsma [ 03/Oct/08 ]

Sadly, this seems to be a JiBX bug, and there is very little I can do about it.

Comment by Aschauer Maria [ 06/Oct/08 ]

I don't think it's a jibx bug because the following code line

marshalOutputStream(graph, os);

writes the correct result to 'os'. later on after the transformation the behavior mentioned above occurs.

Transformer transformer = transformerFactory.newTransformer();
SAXResult saxResult = new SAXResult(contentHandler);
saxResult.setLexicalHandler(lexicalHandler);
transformer.transform(new StreamSource(is), saxResult);

maybe it's a transformation problem?

Comment by Tareq Abedrabbo [ 12/Dec/08 ]

The problem lies in how AxiomHandler processes predefined entity reference. The patch adds a test for those references in the startEntity method.

Comment by Arjen Poutsma [ 12/Dec/08 ]

Fixed. Thanks for the patch, Tareq!

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Mon Dec 18 03:14:32 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.