Enterprise Query
Sample Request Message-query Call-Enterprise API
POST https://na1.salesforce.com/services/Soap/c/10.0 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol
1.1.4322.573)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 510
Expect: 100-continue
Host: na1.salesforce.com
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:query>
<urn:queryString>SELECT Id, Name, BillingStreet FROM Account WHERE Name LIKE '%a%'</urn:queryString>
</urn:query>
</soapenv:Body>
</soapenv:Envelope>
Sample Response Message-query Call-Enterprise API
HTTP/1.1 200 OK
Server: sfdc
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 29 May 2007 21:09:21 GMT
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:enterprise.soap.sforce.com">
<soapenv:Body>
<queryResponse>
<result xsi:type="QueryResult">
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:sObject">
<sf:type>Account</sf:type>
<sf:Id>001D000000HRzKCIA1</sf:Id>
<sf:Id>001D000000HRzKCIA1</sf:Id>
<sf:Name>salesforce.com</sf:Name>
<sf:BillingStreet>The Landmark @ One Market, Suite 300</sf:BillingStreet>
</records>
<records xsi:type="sf:sObject">
<sf:type>Account</sf:type>
<sf:Id>001D000000HRzKDIA1</sf:Id>
<sf:Id>001D000000HRzKDIA1</sf:Id>
<sf:Name>Acme Rocket Supply, Inc.</sf:Name>
<sf:BillingStreet>10 Main Rd.</sf:BillingStreet>
</records>
<records xsi:type="sf:sObject">
<sf:type>Account</sf:type>
<sf:Id>001D000000HRzKEIA1</sf:Id>
<sf:Id>001D000000HRzKEIA1</sf:Id>
<sf:Name>Global Media</sf:Name>
<sf:BillingStreet>150 Chestnut Street</sf:BillingStreet>
</records>
<size>3</size>
</result>
</queryResponse>
</soapenv:Body>
</soapenv:Envelope>