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
bobyrnebobyrne 

API 1.9 still available

Since the release of API 2.0 previous code written and tested with API 1.9 is failing, even with the version argument set as 1.9.  Is API 1.9 unavailable following this latest release?

The error is that the response SOAPElement seems not to have a type attribute in response to either the query or describe requests.

Any pointers are very welcome...

 

Thanks,

Brian.

 

bobyrnebobyrne

I think I have it.

The server is now returning XML with the attribute names and values fully-qualified with namespaces.

The attribute that was called 'type' is now 'xsi:type'.  It's value was 'string' or 'map', it is now 'xsd:string' or 'tns:map'.  The code I was using to match these attribute names and values does not recognise them any more.

I am modifying the java toolkit sample code to cater for the changed returns, and will post again when it starts working.

Brian.

 

DevAngelDevAngel

Great work Brian!

 

Thanks

fouloxfoulox
Is the 1.9 API no longer available?
mobileTestmobileTest

Hi Lou,

1.9 is still available.  Just specify 1.9 as the version for all your calls.

bobyrnebobyrne

It is a bit rough, but I have posted modified java toolkit source on my website at http://www.statesoft.ie/sforce_toolkit_modified.jar

Note that I have made a few changes not related to the problem at hand, and the SForce.class does not behave as it used to (but it does work...)

Brian.

 

Code MonkeeCode Monkee

Brian,

Thanks for the updated source, I'd be lost without it!

I was trying to modify the app to search with a filter but am having no luck when I try to add an operator.

Basically this code works by returning the matching individual record:

   List filter = new ArrayList();
      String[] criteria = new String[2];
      criteria[0] = "email";
      criteria[1] = name@tld.com;
      filter.add(criteria);
      List q = client.query(LEAD,list,filter,maxRows);

Which produces a request including:

  <filter type="array">
   <item type="map">
    <field type="string">email</field>
    <value type="string">name@tld.com</value>
   </item>
  </filter>

When I try this it returns no matches:

                String[] criteria = new String[3];
                criteria[0] = "email";
                criteria[1] = "inetprofit.com";
                criteria[2] = "contains";

Code MonkeeCode Monkee

Whoops, premature Submit.

The request looks in part like:

  <filter type="array">
   <item type="map">
    <field type="string">email</field>
    <value type="string">tld.com</value>
    <opeator type="string">contains</opeator>
   </item>
  </filter>

And returns no matches. I suspect that the operator is in the wrong place but am struggling with the solution.

Any help would be appreciated.

DevAngelDevAngel

If this is a cut and paste then you have a spelling problem.

  <filter type="array">
   <item type="map">
    <field type="string">email</field>
    <value type="string">tld.com</value>
    <opeator type="string">contains</opeator>
   </item>
  </filter>

 

Code MonkeeCode Monkee

D'oh!!!

Thank you, that's it by jingo.  Maybe now I can go grab a beer.