• al
  • NEWBIE
  • 5 Points
  • Member since 2003

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies

Have played with this for a number of days now.

We are using XML-RPC with salesforce API 2.0.

We have tried Java and VisualBasic with the same results.

Note that we can perform the login and describe calls without problem.

When we try to query anything (not search), we get this error:

<?xml version="1.0" encoding="UTF-8" ?><methodResponse><fault><value><struct><member><name>faultString</name><value>missing scope in query call</value></member><member><name>faultCode</name><value><int>1100</int></value></member></struct></value></fault></methodResponse>

Here is one of our queries:

----------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>
<methodCall>
  <methodName>sfdc.query</methodName>
  <params><param><value><struct>
    <member>
      <name>version</name>
      <value><string>2.0</string></value>
    </member>
    <member>
      <name>type</name>
      <value><string>contact</string></value>
    </member>
    <member><name>filter</name>

    <value><array><value><struct>
    <member><name>operator</name><value>or</value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>TR</value></member></struct></value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>ET</value></member></struct></value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>EN</value></member></struct></value></member>

  </struct></value></array></value></member>

    <member>
      <name>select</name>
      <value><array>
        <value>accountID</value>
        <value>lastName</value>
        <value>firstName</value>
        <value>email</value>
      </array></value>
    </member>
  </struct></value></param></params></methodCall>

---------------------------------------------------

 

The fieldnames came from the describe call on the contacts.

There is no mention of 'scope' in the API manual, other than a reference to the type of data

we are querying (contact in this case).

We are sort of stuck.  Anyone have an idea? Anyone have a XML-RPC query that works?

 

Thanks for any assistance,

Al G

AlterPoint

  • July 03, 2003
  • Like
  • 0

We have a need to collect lists of information from Accounts and Contacts where a specific field is/is not empty (null, blank, "", etc.)

When using XML RPC, how do you query on a null, or not-null field?

We tried a few things, like having a 'value' element with no value, but we either got all records or no records.

Any ideas?

Al G

  • July 01, 2003
  • Like
  • 0

Where can I download the sforce implementation of XMLRPC.

I tried using the apache implementation.  Logging in worked okay, but I don't see where to add the session-id as a cookie.  An example would be appreciated.

Aaron

 

  • July 04, 2003
  • Like
  • 0

Hi everyone,

Is it possible to query the server through the XMLRPC to get an aggregate function such as "COUNT"?

In concrete, I would like to know the number of records in a given table by issuing a command.

I have not seen anything like that on the manual, so I am currently doing it by issuing a query of 1 field only, and counting the results (which is most definitely not recommended)

Thank you in advance, I appreciate your help.

 

Have played with this for a number of days now.

We are using XML-RPC with salesforce API 2.0.

We have tried Java and VisualBasic with the same results.

Note that we can perform the login and describe calls without problem.

When we try to query anything (not search), we get this error:

<?xml version="1.0" encoding="UTF-8" ?><methodResponse><fault><value><struct><member><name>faultString</name><value>missing scope in query call</value></member><member><name>faultCode</name><value><int>1100</int></value></member></struct></value></fault></methodResponse>

Here is one of our queries:

----------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>
<methodCall>
  <methodName>sfdc.query</methodName>
  <params><param><value><struct>
    <member>
      <name>version</name>
      <value><string>2.0</string></value>
    </member>
    <member>
      <name>type</name>
      <value><string>contact</string></value>
    </member>
    <member><name>filter</name>

    <value><array><value><struct>
    <member><name>operator</name><value>or</value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>TR</value></member></struct></value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>ET</value></member></struct></value></member>

 <member><name>value</name>
 <value><struct><member><name>operator</name>
 <value>starts with</value></member>
 <member><name>field</name><value>00N30000000bpgc</value></member>
 <member><name>value</name><value>EN</value></member></struct></value></member>

  </struct></value></array></value></member>

    <member>
      <name>select</name>
      <value><array>
        <value>accountID</value>
        <value>lastName</value>
        <value>firstName</value>
        <value>email</value>
      </array></value>
    </member>
  </struct></value></param></params></methodCall>

---------------------------------------------------

 

The fieldnames came from the describe call on the contacts.

There is no mention of 'scope' in the API manual, other than a reference to the type of data

we are querying (contact in this case).

We are sort of stuck.  Anyone have an idea? Anyone have a XML-RPC query that works?

 

Thanks for any assistance,

Al G

AlterPoint

  • July 03, 2003
  • Like
  • 0

We need to design Beans/Servlets with the SalesForce API (XMLRPC). One of the conditions is outbound and inbound ports to open with the firewall,  Has anybody done this.

Our Archtecture:

[Browser] --> [App Server] (JSP, Bean(SFAPI), Servlet(SFAPI))] -> SalesForce.com

What are the firewall rules that we need to setup.

  • July 03, 2003
  • Like
  • 0

We have a need to collect lists of information from Accounts and Contacts where a specific field is/is not empty (null, blank, "", etc.)

When using XML RPC, how do you query on a null, or not-null field?

We tried a few things, like having a 'value' element with no value, but we either got all records or no records.

Any ideas?

Al G

  • July 01, 2003
  • Like
  • 0

Hi,

I have been able to login to the RPC server (prior post), but I am unable to logout. The problem seems to be the session HTTP cookie. This is what I am doing:

xmlhttp.setRequestHeader "Cookie", "session_id=" & session_id

The error returned is: 1112, session id missing or invalid

Please help, thank you.