0

While creating a Request in SOAP UI I am getting an error. The prefix "xsi" for attribute "xsi:type" associated with an element type "urn:sObjects" is not bound. Not sure how to fix this issue.

REQUEST:

<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">
   <soapenv:Header>
 
      <urn:SessionHeader>
       <urn:sessionId>REDACTED</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="Áccount" xmls:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <Name>Arvind External Systems Account</Name>
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

ERROR:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
         <faultstring>The prefix "xsi" for attribute "xsi:type" associated with an element type "urn:sObjects" is not bound.</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
1
  • Please do not include session Ids. I've redacted it, but it is still visible in your edit history. Please invalidate/log out of the session as soon as possible to avoid security problems.
    – sfdcfox
    May 25, 2021 at 3:36

1 Answer 1

0

Per the documentation, you must bind it to urn1, as defined at the top of the SOAP message:

     <urn:sObjects xsi:type="urn1:Áccount">
        <Name>Arvind External Systems Account</Name>
     </urn:sObjects>

See Scenario 2 on the sample API page.

1
  • <urn:sObjects xsi:type="Student__c" xmlns:xsi="w3.org/2001/XMLSchema-instance"> <Student_Name_c>Arvind External Systems Account</Student_Name_c> </urn:sObjects> The above code worked for me. But only for custom objects. I couldn't make it work for standard object Account. May 25, 2021 at 4:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .