Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connecting to Microsoft Dynamics CRM 2011 SDK from Python
- from suds.client import Client
- import logging
- logging.basicConfig(level=logging.INFO)
- url = 'https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc?wsdl'
- client = Client(url)
- req = client.factory.create('ns3:RetrieveOrganizationsRequest')
- accessTypes = client.factory.create('ns3:AccessType')
- orgRel = client.factory.create('ns3:OrganizationRelease')
- req.AccessType = accessTypes.Default
- req.Release = orgRel.Current
- headers = dict()
- headers['Content-Type'] = 'application/soap+xml'
- client.set_options(headers=headers)
- resp = client.service.Execute(req)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement