+ Start a Discussion
Dimitri DDimitri D 

SOAP UPSERT Call error message

Hi

 

I have successfully imported the Entreprise WSDL into a new SOAP Project. I can LOGIN with success, use the GETSERVERTIMESTAMP successfully but I am unable to use the UPSERT call.

 

I have copy-pasted part of the sample available here : SOAP Sample Message

 

 

<urn:externalIDFieldName>CIEID__C</urn:externalIDFieldName>
   <urn:sObjects xsi:type="Account">
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name
      <NumberOfEmployees>340</NumberOfEmployees>
   </urn:sObjects>

 Error msg : The prefix "xsi" for attribute "xsi:type" associated with an element type "urn:sObjects" is not bound.

 

 

So, code was adapted :(xsi:type was removed) :

 

   <urn:sObjects ="Account">
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name>
      <NumberOfEmployees>340</NumberOfEmployees>
   </urn:sObjects>

 

Error msg : Element type "urn:sObjects" must be followed by either attribute specifications, ">" or "/>". (I also tried with <urn:sObjects =Account> with the same error msg).

 

Finally, code was adapted to :

 

 

   <urn:sObjects>Account</urn:sObjects>
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name>
      <NumberOfEmployees>340</NumberOfEmployees>
   <!--/urn:sObjects-->

 And error msg was : INVALID_TYPE: Must send a concrete entity type

 

Do someone have any idea how to successfully make such a call ??

 

Thank you in advance

 

Dimitri

 

Best Answer chosen by Admin (Salesforce Developers) 
jostmanjostman

Add  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to your namespace and will work!

 

E.g. 

 

 

<soapenv:Envelope  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:AllowFieldTruncationHeader>
         <urn:allowFieldTruncation>true</urn:allowFieldTruncation>
      </urn:AllowFieldTruncationHeader>

 

<soapenv:Envelope  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">   <soapenv:Header>      <urn:AllowFieldTruncationHeader>         <urn:allowFieldTruncation>true</urn:allowFieldTruncation>      </urn:AllowFieldTruncationHeader>

 

...

All Answers

Dimitri DDimitri D

Anyone, pleeeeeeeeeeeeeeeeeease ??

jostmanjostman

Add  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to your namespace and will work!

 

E.g. 

 

 

<soapenv:Envelope  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:AllowFieldTruncationHeader>
         <urn:allowFieldTruncation>true</urn:allowFieldTruncation>
      </urn:AllowFieldTruncationHeader>

 

<soapenv:Envelope  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">   <soapenv:Header>      <urn:AllowFieldTruncationHeader>         <urn:allowFieldTruncation>true</urn:allowFieldTruncation>      </urn:AllowFieldTruncationHeader>

 

...

This was selected as the best answer
Dimitri DDimitri D

Thank you very much !

 

It worked.

 

praveenkumarpraveenkumar

Great.. 

 

Thank you, It helped for me also...

 

-Praveen