Help Desk Ticket Reference: https://na7.salesforce.com/500A0000007CFSA Workaround Description: - Add the message content as byte[] representation instead of a String OR - Manually remove the BOM from the content before invoking other actions project_key: SOA Calling a SmooksAction or a ContentBasedRouter with XML data with a preceding BOM, causes it to fail with a 'Content is not allowed in prolog' error.
Attaching a test case which can be used to reproduce this issue. Note that - despite the same input data - the results are different depending on how the data is added to the message.
Attachment: Added: DslHelperBomUnitTest.java
Candidate for SOA 5.2.
Release Notes Docs Status: Added: Not Yet Documented Writer: Added: dlesage
Link: Added: This issue relates to JBESB-3649
Tom Fennelly thinks that an ESB fix in the SmooksAction will solve this
I think this needs to be handled outside Smooks (or other components - Smooks is not the only thing that's going to suffer at the hands of this). I think data buffers/streams containing a BOM need to preprocessed before passing into other components. Otherwise, we'll need to code BOM filtering logic into everything. Wouldn't it make more sense to provide an ESB Action that can perform preprocessing on the buffer/stream, stripping off the BOM?
Fixed in ESB
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue Release Notes Text: Added: https://issues.jboss.org/browse/SOA-3131 ContentBasedRouter failed when input data contained a byte-order mark (BOM). A fix has been applied to the enterprise service bus to ensure that byte-order marks can now be handled by the software so users will no longer see this failure.
This is still an issue. Attached a quickstart to reproduce. Simple run ant deploy, ant runtest
Attachment: Added: transform_XML2POJO.tar.bz2
Release Notes Text: Removed: https://issues.jboss.org/browse/SOA-3131 ContentBasedRouter failed when input data contained a byte-order mark (BOM). A fix has been applied to the enterprise service bus to ensure that byte-order marks can now be handled by the software so users will no longer see this failure. Added: https://issues.jboss.org/browse/SOA-3131 ContentBasedRouter failed when input data contained a byte-order mark (BOM). A new ESB BOMFilter action has been added to the enterprise service bus that is able ensure that byte-order marks can now be handled by the software so users will no longer see this failure. The BOMFilter action should be added to the action-chain in order to filter out byte order marks.
Talked to Martin about this one - the fix here was to add a BOMFilter ESB action that can filter out byte order marks, because BOMs are not a smooks-specific issue. Changed the release notes to reflect the actual fix here.
Unfortunatelly, the class for BOMFilter action is not present in product build. Originally I took it from a wrong place. Sorry for the confusion.
This is really verified in ER6.