+ Start a Discussion
Code MonkeeCode Monkee 

Code no longer working


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:

<?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
   <version type="string">1.9</version>
   <session_id type="string">R9aOZgwrWl5i0PY36o.3JFIrDJDj_dy6NvHz96Bgw_fLgpkl62C
  <tns:query xmlns:tns="sfconnector:SalesforceConnector" type="methodCall">
   <type type="string">lead</type>
   <maxRows type="int">1</maxRows>
  <select type="array">
   <field type="string">id</field>
  <filter type="array">
   <item type="map">
    <field type="string">email</field>
    <value type="string">joe@joe.com</value>
    <operator type="string">contains</operator>

<?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">
   <faultstring>select list not specified in query</faultstring>

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.

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>

Should be:

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

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.


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


Thanks so much, everything is much better now.