You need to sign in to do that
Don't have an account?
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
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>
...
All Answers
Anyone, pleeeeeeeeeeeeeeeeeease ??
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>
...
Thank you very much !
It worked.
Great..
Thank you, It helped for me also...
-Praveen