History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-180
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Colin Crist
Reporter: Chris
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

org.xml.sax.SAXParseException: Content is not allowed in prolog.

Created: 05/Jan/12 09:38 AM   Updated: 06/Jul/12 05:56 AM
Component/s: FIX
Affects Version/s: 1.14
Fix Version/s: 1.15

Environment: Test

 Description  « Hide
When attempting to send an XML message, Hermes is adding spaces in front of the XML message. It shouldn't be doing that. There is an additional space after the </JMS> tag and the start of the message.

for example.
<jms><Dst>queue:///REQUESTQueue&lt;/Dst&gt;&lt;Rto&gt;queue:///REPLYQueue&lt;/Rto&gt;&lt;Tms&gt;1325773595411&lt;/Tms&gt;&lt;Cid&gt;78ec3513-361a-4a65-bd57-b78ad4d95ef2&lt;/Cid&gt;&lt;Dlv&gt;2&lt;/Dlv&gt;&lt;/jms> <?xml version="1.0" encoding="UTF-8" ?><message><resultStatus completionCode="8" reasonCode="0"><resultMessage>org.xml.sax.SAXParseException: Content is not allowed in prolog.

 All   Comments   Change History      Sort Order:
Colin Crist [09/Jan/12 03:29 AM]
Can you explain how you do the upload? Is the XML from a file, do you use the message creation dialog and paste it in? Which exact buttons do you click?

I've just tested with some XML in a file and I don't get any additional spaces. When just uploading a file the contents is not relevant, its just treated as text.

What is the jms tag you mention?

Chris [12/Jan/12 01:24 PM]
Hey man, I figured out the issue... It was an encoding issue. When I right clicked on a queue which was defined, I selected a new message and I then either copy & pasted or inserted the xml from the file. In both cases I got the same error message. I ended up writing my own MQ client in Java and when I compared the JMS header I realized the only difference was the encoding. I guess by default the message is encoded in UTF-8 which writes\removes on read the additional characters in front of the message. However, my MQ listener is a vendor application which can only handle messages if they are encoded using ISO-8859-1.

I figured out the problem but how do you change the encoding being used by HermesJMS ?

Colin Crist [06/Jul/12 05:56 AM]
You can now set the character set to use when you insert a file when creating a TextMessage in the Send Message... dialog.