You need to sign in to do that
Don't have an account?

INVALID_TYPE: Must send a concrete entity type.
I'm using ColdFusion 9 and a SalesForce cfc that I updated to work with version 22. Everything had been working fine for a while but this week, all of a sudden, I'm getting the above "invalid_type" error when trying to create a lead. I'm sending to Enterprise API, btw.
Here is a sample soap request:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com"
xmlns:urn1="urn:sobject.enterprise.soap.sforce.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>(removed for clarity)</urn:sessionId>
</urn:SessionHeader>
<urn:AssignmentRuleHeader>
<urn:useDefaultRule>true</urn:useDefaultRule>
</urn:AssignmentRuleHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<urn:sObjects xsi:type="urn1:Lead">
<COMPANY>TestCo</COMPANY>
<DESCRIPTION>Signed up at: Referring IP: 127.0.0.1 </DESCRIPTION>
<HOW_DID_YOU_HEAR_ABOUT_US__C>general event</HOW_DID_YOU_HEAR_ABOUT_US__C>
<LEADSOURCE>Web Trial</LEADSOURCE>
<STATUS>Incomplete Registration</STATUS>
<OWNER>Jimbo Smith</OWNER>
<INDUSTRY>Computing</INDUSTRY>
<PHONE>310-555-1212</PHONE>
<FIRSTNAME>Joe</FIRSTNAME>
<DATE_OF_INQUIRY__C>2011-07-25</DATE_OF_INQUIRY__C>
<EMAIL>test@here.com</EMAIL>
<OTHER__C>Aug 4th Japan style inflation</OTHER__C>
<TYPE__C>Lead</TYPE__C>
<LASTNAME>Blow</LASTNAME>
<TITLE>Chief Janitor</TITLE>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>
In case anyone else happens to get here. I figured out my own problem. I was attempting to send a simple value for "Owner" when that field is a complex type. This really seems like a crappy error to get for this type of problem but it is what it is. If anyone else wants to know the work around, here is the 'working' soaprequest:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com"
xmlns:urn1="urn:sobject.enterprise.soap.sforce.com
"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>(removed for clarity)</urn:sessionId>
</urn:SessionHeader>
<urn:AssignmentRuleHeader>
<urn:useDefaultRule>true</urn:useDefaultRule>
</urn:AssignmentRuleHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<urn:sObjects xsi:type="urn1:Lead">
<COMPANY>TestCo</COMPANY>
<DESCRIPTION>Signed up at: Referring IP: 127.0.0.1 </DESCRIPTION>
<HOW_DID_YOU_HEAR_ABOUT_US__C>general event</HOW_DID_YOU_HEAR_ABOUT_US__C>
<LEADSOURCE>Web Trial</LEADSOURCE>
<STATUS>Incomplete Registration</STATUS>
<OWNER xsi:type="urn1:User">
<username>email@domain.com</username>
</OWNER>
<INDUSTRY>Computing</INDUSTRY>
<PHONE>310-555-1212</PHONE>
<FIRSTNAME>Joe</FIRSTNAME>
<DATE_OF_INQUIRY__C>2011-07-25</DATE_OF_INQUIRY__C>
<EMAIL>test@here.com</EMAIL>
<OTHER__C>Aug 4th Japan style inflation</OTHER__C>
<TYPE__C>Lead</TYPE__C>
<LASTNAME>Blow</LASTNAME>
<TITLE>Chief Janitor</TITLE>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>
All Answers
In case anyone else happens to get here. I figured out my own problem. I was attempting to send a simple value for "Owner" when that field is a complex type. This really seems like a crappy error to get for this type of problem but it is what it is. If anyone else wants to know the work around, here is the 'working' soaprequest:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com"
xmlns:urn1="urn:sobject.enterprise.soap.sforce.com
"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>(removed for clarity)</urn:sessionId>
</urn:SessionHeader>
<urn:AssignmentRuleHeader>
<urn:useDefaultRule>true</urn:useDefaultRule>
</urn:AssignmentRuleHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<urn:sObjects xsi:type="urn1:Lead">
<COMPANY>TestCo</COMPANY>
<DESCRIPTION>Signed up at: Referring IP: 127.0.0.1 </DESCRIPTION>
<HOW_DID_YOU_HEAR_ABOUT_US__C>general event</HOW_DID_YOU_HEAR_ABOUT_US__C>
<LEADSOURCE>Web Trial</LEADSOURCE>
<STATUS>Incomplete Registration</STATUS>
<OWNER xsi:type="urn1:User">
<username>email@domain.com</username>
</OWNER>
<INDUSTRY>Computing</INDUSTRY>
<PHONE>310-555-1212</PHONE>
<FIRSTNAME>Joe</FIRSTNAME>
<DATE_OF_INQUIRY__C>2011-07-25</DATE_OF_INQUIRY__C>
<EMAIL>test@here.com</EMAIL>
<OTHER__C>Aug 4th Japan style inflation</OTHER__C>
<TYPE__C>Lead</TYPE__C>
<LASTNAME>Blow</LASTNAME>
<TITLE>Chief Janitor</TITLE>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>
Hi,
thanx.. your pointer helped me as well