Skip to content

Any plans on supporting the metadata API? #8

Description

@GoogleCodeExporter
This is a great library.  Any plans on supporting the metadata API?

I tried to hack it up myself, but the trick is that the metadata WSDL does not 
define login/logout methods, so you have to connect with either the partner or 
enterprise WSDL.  I would like to avoid merging the login/logout definitions.  
Instead, I tried to login with the partner WSDL, then change the WSDL to 
metadata WSDL, buy overwriting the underlying Client object, but it didn't 
work. 

sf = SforceBaseClient(parterWsdlFile)    
result = sf.login(username, password, sectoken)
if '://' not in metaWsdlFile:
  if os.path.isfile(metaWsdlFile):
    metaWsdl = 'file://' + os.path.abspath(metaWsdlFile)
sf._sforce = Client(metaWsdl)
sf._sforce.set_options(location = result.metadataServerUrl)

header = sf.generateHeader('SessionHeader')
header.sessionId = result['sessionId']
sf.setSessionHeader(header)
sf._sessionId = result['sessionId']

Original issue reported on code.google.com by cw10...@gmail.com on 7 Feb 2011 at 3:34

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions