function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BXBX 

Soap Fault String: The Reference to entity "Type" must end...

Here is my soap command:
<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/' xmlns='urn:partner.soap.sforce.com'><s:Header><SessionHeader><sessionId>sid_here</sessionId></SessionHeader></s:Header><s:Body><create><sObjects><type xmlns='urn:sobject.partner.soap.sforce.com'>My_Custom_Object__c</type><Contact__c>ContactIDHERE</Contact__c><Name>Name Here</Name><Page_s__c>Page Info Here</Page_s__c><OwnerId>00530000000p0TkAAI</OwnerId></sObjects></create></s:Body></s:Envelope>
 
Here is the error it generates:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>The reference to entity &quot;Type&quot; must end with the &apos;;&apos; delimiter.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
 
Any ideas?
 
Regards,
BX
SuperfellSuperfell
I would guess one of your elements has a &type content in it (like the name), and you're not correctly encoding the &
BXBX
That was it!!  Many thanks!