How Do I Fix a Salesforce SOAP Entity Not Recognized Error?
If you have a security gateway that manipulates XML returned from Salesforce before passing it along to CopyStorm, you may see a Salesforce SOAP Entity Not Recognized error like:
- ConnectionException: Found invalid XML. could not resolve entity named ‘deg’ (position: START_TAG seen …1133;敌湈त 2;喚솕驘&# 20077;°… @122:9536)
This error means that your gateway has converted a standard XML character representation (e.g. “°”) into its equivalent HTML entity (in this case “°”). XML parsers are not required to understand the hundreds of entity tags used by HTML (and many, including the one used by the core WSC Salesforce libraries, do not).
Due to this issue, starting with version 8.37.1, CopyStorm has augmented the standard WSC parser to understand nearly all HTML entity tags. If you encounter an entity tag missed by CopyStorm, this article explains how to fix the issue.
Add an Entity to the Core Salesforce XML Parser
To add a new entity to the core Salesforce XML parser:
- Create a text file named “HTMLEntityResolver.xml”.
- Put the following text into the file:
<Entity name=”deg” value=”°” />
- Add as many Entity tags as necessary. Each will either override or supplement the entity tags built into CopyStorm.
- Put the file in the “config” subdirectory of the CopyStorm installation directory.
Finally, send an email to firstname.lastname@example.org to tell us you had to add a new entity. We will add it to our built-in list.
Our standard list includes all of the entities defined on this Wiki page.