Support Article
Service Soap Throws Exception while parsing
SA-11483
Summary
Service Soap fails to parse "&" and "<". Special Characters "<" and "&" in Employer Name field under incoming Request is not accepted by schema and throws error .
Error Messages
2015-06-18 09:06:39,886 [fault (self-tuning)'] [ STANDARD] [ ] ( mapping.xml.XMLParserBase) ERROR user01|xx.xx.xx.xx - Caught exception parsing XML stream
org.xml.sax.SAXParseException: The reference to entity "BC" must end with the ';' delimiter.
Steps to Reproduce
In the incoming XML, pass "&" or "<" in the Request.
Root Cause
In XML, '&' is a special character. It's used to represent "entities" such as <. And for the '<' character which is also a special character). So for 'H&R' intends to be an entity like 'H&R;' - entities one must end it in a semi-colon.
Resolution
To include a plain ampersand character '&', replace it with '&'
<ces:employer-name>H&R Block</ces:employer-name>
<ces:employer-name>H&R Block</ces:employer-name>
Published July 29, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.