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
MaumanMauman 

SOAP Format Version Change?

I was 'rolling' my own SOAP messages (for use in .asp pages).  However I noticed today that the format in which data is returned as suddenly changed (see parts in bold)!

Old Format:

<?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>
  <queryResponse xmlns="urn:partner.soap.sforce.com">
   <result>
    <done>true</done>
    <queryLocator xsi:nil="true"/>
    <records>
     <ns1:type xmlns:ns1="urn:sobject.partner.soap.sforce.com">Lead</ns1:type>
     <ns2:Id xmlns:ns2="urn:sobject.partner.soap.sforce.com">LEADIDHERE</ns2:Id>
    </records>
    <records>
     <ns3:type xmlns:ns3="urn:sobject.partner.soap.sforce.com">Lead</ns3:type>
     <ns4:Id xmlns:ns4="urn:sobject.partner.soap.sforce.com">2NDLEADIDHERE</ns4:Id>
    </records>

    <size>2</size>
   </result>
  </queryResponse>
 </soapenv:Body>
</soapenv:Envelope>

New Format:

<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>
        <QUERYRESPONSE XMLNS="urn:partner.soap.sforce.com">
            <RESULT>
                <DONE>true</DONE>
                <QUERYLOCATOR XSI:NIL="true"></QUERYLOCATOR>

                <RECORDS XMLNS:SF="urn:sobject.partner.soap.sforce.com" XSI:TYPE="sf:sObject">
                    <SF:TYPE>Lead</SF:TYPE>
                    <SF:ID>LEADIDHERE</SF:ID>
                </RECORDS>
                <RECORDS XMLNS:SF="urn:sobject.partner.soap.sforce.com" XSI:TYPE="sf:sObject">
                    <SF:TYPE>Lead</SF:TYPE>
                    <SF:ID>2NDLEADIDHERE</SF:ID>
                </RECORDS>

                <SIZE>2</SIZE>
            </RESULT>
        </QUERYRESPONSE>
    </SOAPENV:BODY>
</SOAPENV:ENVELOPE>

I'm assuming this is part of the Spring '04 release.  Is there a way that I can use an older version (perhaps specify the version in the request message)?  Or will I need to update my processing everytime that a change is made on Salesforce.com???

DevAngelDevAngel

Hi Mauman,

No, you don't need to modify your code.  You will just need to pay attention to namespace declarations.  A good reason to use standard soap libraries.

MaumanMauman

I would use standard libraries, but for now that is not an option (long story). 

So I've changed my code to take the namespaces into consideration from now on and not assume that they will be the same. 

Thanks!