• viodev
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I am using Apache Axis to access the Web Services API.  However, I believe my question is not specific to the Java API, and is applicable to all Web Service clients.

I am using the partner.wsdl Version 16.0.

Is there a way for a Web Service query() method call to return the metadata of the SOQL query?  Specifically, the fields that were requested in joined object.  My issue is that if the joined object has no rows, then all I get back in the SOAP message is an empty object.

For example:
    I have two Account objects: with name/billingcity "Acct A"/"Boston" and "Acct B"/"New York".
    And "Acct A" has two Contact objects, but "Acct B" has no Contact objects.

If I query for:
    select a.Name, a.BillingCity, (Select Email, LastName From Contacts) from Account a where a.Name = 'Acct A'
I will get back the Name and BillingCity of the Account, along with the Email and LastName of both the Contacts.  From this data, I can interpret that the SOQL query asked for these four fields.

However, If I query for:
    select a.Name, a.BillingCity, (Select Email, LastName From Contacts) from Account a where a.Name = 'Acct B'
I will get back the Name and BillingCity of the Account, along with an empty Contact XML node.  From this data, I have no way of knowing the SOQL query asked for Contact Email and LastName.

I need this metadata to present back to my client the list of fields that they requested, even if the object/fields are null.

Is there a way for me to get this metadata?

thanks!

I am using Apache Axis to access the Web Services API.  However, I believe my question is not specific to the Java API, and is applicable to all Web Service clients.

I am using the partner.wsdl Version 16.0.

Is there a way for a Web Service query() method call to return the metadata of the SOQL query?  Specifically, the fields that were requested in joined object.  My issue is that if the joined object has no rows, then all I get back in the SOAP message is an empty object.

For example:
    I have two Account objects: with name/billingcity "Acct A"/"Boston" and "Acct B"/"New York".
    And "Acct A" has two Contact objects, but "Acct B" has no Contact objects.

If I query for:
    select a.Name, a.BillingCity, (Select Email, LastName From Contacts) from Account a where a.Name = 'Acct A'
I will get back the Name and BillingCity of the Account, along with the Email and LastName of both the Contacts.  From this data, I can interpret that the SOQL query asked for these four fields.

However, If I query for:
    select a.Name, a.BillingCity, (Select Email, LastName From Contacts) from Account a where a.Name = 'Acct B'
I will get back the Name and BillingCity of the Account, along with an empty Contact XML node.  From this data, I have no way of knowing the SOQL query asked for Contact Email and LastName.

I need this metadata to present back to my client the list of fields that they requested, even if the object/fields are null.

Is there a way for me to get this metadata?

thanks!