+ Start a Discussion
Code MonkeeCode Monkee 

Code no longer working

Help!!!

My Java code no longer functions correctly, or rather no longer returns successful results. I'm querying to determine if a lead already exists. The code hasn't changed in a couple of weeks, assumming the API chage might be the culprit. My query request dump looks like this:

Request->
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:tns="salesforce" xmlns:types="salesforce/encodedTypes" xmlns:xsd="http://www
.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" so
ap-env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <soap-env:Header>
  <headerStruct>
   <version type="string">1.9</version>
   <session_id type="string">R9aOZgwrWl5i0PY36o.3JFIrDJDj_dy6NvHz96Bgw_fLgpkl62C
ZrfXUjGE2lQsP.36b7mOoCg5OIizEGqIvEPbtzKggVlhL</session_id>
  </headerStruct>
 </soap-env:Header>
 <soap-env:Body>
  <tns:query xmlns:tns="sfconnector:SalesforceConnector" type="methodCall">
   <type type="string">lead</type>
   <maxRows type="int">1</maxRows>
  </tns:query>
  <select type="array">
   <field type="string">id</field>
  </select>
  <filter type="array">
   <item type="map">
    <field type="string">email</field>
    <value type="string">joe@joe.com</value>
    <operator type="string">contains</operator>
   </item>
  </filter>
 </soap-env:Body>
</soap-env:Envelope>

Response->
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap
enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="salesforce" xmlns:typ
es="salesforce/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc
e" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <soap:Header/>
 <soap:Body>
  <soap:Fault>
   <faultcode>1100</faultcode>
   <faultstring>select list not specified in query</faultstring>
  </soap:Fault>
 </soap:Body>
</soap:Envelope>

bdaintonbdainton
I just encountered this exact same issue.  I'll be monitoring this thread constantly to hear the latest news on when this is expected to be fixed.
DevAngelDevAngel

Hi CodeMonkey,

What are you using to generate your soap messages?  The message you posted does not look right.  It should look more like this:

You posted:

  <select type="array">
   <field type="string">id</field>
  </select>

Should be:

    <select soapenc:arrayType="xsd:string[1]">
      <Item>id</Item>
    </select>

Likewise, your filter structure looks incorrect.

I'm not sure why it was working and not working, looks like it should never have worked, but I'll try to find out.

DevAngelDevAngel

Hi CodeMonkey,

I know why the specific request that you posted is not working.  You have both the select list and the filter outside of the query namespace.  Although sforce previously accepted this message, it actually is not a valid soap call.  The parts that define a message call need to be in the method namespace, which in your message is tns:query.

 

 

Code MonkeeCode Monkee

D'oh!!!

Thanks so much, everything is much better now.