Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Any plans on supporting the metadata API? #8

Open
@GoogleCodeExporter

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions