Reputation: 1907
I am using spring MVC RESTful service and I am catch large text message from front end which contains characters like \,& and my controller throws an error for large text messages I am getting below error
SEVERE: Servlet.service() for servlet [validate_webservice] in context with path [/validate_webservice] threw exception [Request processing failed; nested exception is ca.uhn.hl7v2.parser.EncodingNotSupportedException: Determine encoding for message. The following is the first 50 chars of the message for reference, although this may not be where the issue is: MSH|^~\\] with root cause
ca.uhn.hl7v2.parser.EncodingNotSupportedException: Determine encoding for message. The following is the first 50 chars of the message for reference, although this may not be where the issue is: MSH|^~\
How to successfully pass large complex string values?
Upvotes: 0
Views: 581
Reputation: 263
Try to put CDATA in your large text to avoid XML parsing in the content. Then you can use characters like "<" and "&"... in your content:
<![CDATA[ your large complex string values with & < and &.... ]]>
More info at http://www.w3schools.com/xml/xml_cdata.asp
Upvotes: 1