• Baloodevil
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Can anyone provide an example of the Metadata API using REST?  For both a retrieve and deploy?

Thanks in advance.

I am trying to get the sample code here working.

 

The section in the source code that says...

 

 

 

 

      /*  Once the client application has logged in successfully, we use 
       *  the results of the login call to reset the endpoint of the service  
       *  to the virtual server instance that is servicing your organization.  
       *  To do this, the client application sets the ENDPOINT_ADDRESS_PROPERTY 
       *  of the binding object using the URL returned from the LoginResult. We
       *  use the metadata binding from this point forward as we are invoking
       *  calls in the metadata WSDL.
       */  
    
      metadataConnection = new MetadataConnection(config);
      /*
      metadataConnection._setProperty(MetadataBindingStub.ENDPOINT_ADDRESS_PROPERTY,
              loginResult.getMetadataServerUrl());
              */  

 

Doesn't seem to be correct.  From the error "No operation available for request {http://soap.sforce.com/2006/04/metadata} retrieve" I've found that none of the operations associated with a MetadataConnection work.  And I found that because the bottom part of the code above is commented out, the ServiceEndpoint for the MetadataConnection is the same as the ServiceEndpoint of the Connection (used for synchronous stuff).  I'm guessing this is incorrect.  It seems that the two endpoints should be different, but according to the sample code listed on salesforce's website, they are the same.  

 

If I try to uncomment the above code, it throws errors because MetadataBindingStub is not found (presumably it should be in the jars generated from the WSDLs for which I used WSC).  Other articles talk about setting the metadata service endpoint from a field on the LoginResult of the same name, but perhaps that is from older versions of the API, or another jar from WSDL generator?  Would using the JAX-WS instead of WSC solve this?  I'm lost here.

 

 

 

I am trying to work with the salesforce metadata programmatically.  I created a new java project with the sample code listed here.

I downloaded the Enterprise WSDL and Metadata WSDL, then used WSC to create java proxy classes.  Then I included those jars in my project using Eclipse (SpringSource Tool Suite to be precise).  Including those resolved *almost* all the import references in the sample code, except...

 

 

import com.sforce.ws.ConnectorConfig;
import com.sforce.ws.ConnectionException;
I tried downloading the delegated authentication WSDL as well, but that didn't resolve these imports.  Where are these classes coming from?  A WSDL or something else?
Thanks in advance.

 

I have an application I would like to build that accepts an incoming feed.  Has anyone attempted this on the Force.com platform?  The data feed coming in contains an xml message.  I will parse it and take an action although I am happy just saving it in a business object and parsing it later.

 

Thanks

I would like to include in my application the ability to have automated outbound calls... not for phone solicitations!  Just for appointment reminders.  Can salesforce or a partner app do that?

How to insert/update from Microsoft SQL database server to Salesforce ?

HI,

 

Is it possible to use the new REST API from a standalone java application?

The example used on the site refers to a web app. 

 

Also can we use this REST api from a J2ME enabled phone?

 

Thanks

-Kedar