Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having issues with metadata API #620

Open
max1204 opened this issue Feb 9, 2023 · 4 comments
Open

Having issues with metadata API #620

max1204 opened this issue Feb 9, 2023 · 4 comments

Comments

@max1204
Copy link

max1204 commented Feb 9, 2023

I'm trying to retrieve the metadata from the metadata API and in simple_salesforce deploy function is available in class Salesforce but not retrieve if if I try to use the retrieve function in metadata module it needs a async process ID but I thought that will be generate after I put the request for retrieve but it doesn't work I also tried to pass an empty value in that but I get error

File "/usr/local/lib/python3.10/site-packages/simple_salesforce/metadata.py", line 214, in __getattr__ self._client.get_type('ns0:' + item), File "/usr/local/lib/python3.10/site-packages/zeep/client.py", line 174, in get_type return self.wsdl.types.get_type(name) File "/usr/local/lib/python3.10/site-packages/zeep/xsd/schema.py", line 138, in get_type return self._get_instance(qname, "get_type", "type") File "/usr/local/lib/python3.10/site-packages/zeep/xsd/schema.py", line 236, in _get_instance raise last_exception File "/usr/local/lib/python3.10/site-packages/zeep/xsd/schema.py", line 231, in _get_instance return method(qname) File "/usr/local/lib/python3.10/site-packages/zeep/xsd/schema.py", line 501, in get_type return self._get_component(qname, self._types, "type") File "/usr/local/lib/python3.10/site-packages/zeep/xsd/schema.py", line 530, in _get_component raise exceptions.LookupError( zeep.exceptions.LookupError: No type 'get_retrieved_file' in namespace http://soap.sforce.com/2006/04/metadata. Available types are: {http://soap.sforce.com/2006/04/metadata}CancelDeployResult, {http://soap.sforce.com/2006/04/metadata}DeployResult, {http://soap.sforce.com/2006/04/metadata}DeployDetails, {http://soap.sforce.com/2006/04/metadata}DeployMessage, {http://soap.sforce.com/2006/04/metadata}DeployProblemType, {http://soap.sforce.com/2006/04/metadata}RetrieveResult, {http://soap.sforce.com/2006/04/metadata}FileProperties, {http://soap.sforce.com/2006/04/metadata}ManageableState, {http://soap.sforce.com/2006/04/metadata}RetrieveMessage, {http://soap.sforce.com/2006/04/metadata}RetrieveStatus, {http://soap.sforce.com/2006/04/metadata}RunTestsResult,

@hkajiwara
Copy link
Contributor

It looks like async_process_id param is not needed for SfdcMetadataApi.retrieve(). In addition, deployRequest + async_process_id should be removed from the metadata endpoint for retrieve. I'll submit a PR later.

@max1204
Copy link
Author

max1204 commented Feb 13, 2023

@hkajiwara I have the code changes ready on my local I tested the retrieval of a couple of components from salesforce sandbox I can create a PR.

@max1204
Copy link
Author

max1204 commented Feb 13, 2023

Thanks but I already made the changes and then deployed and retrieved from sandox and created a PR

@yippie
Copy link

yippie commented Apr 5, 2023

How does nobody need retrieve? If there is deploy, there should be retrieve.

I can clearly see that retrieve is not exposed on the main object and even if it was, the async_process_id is wrong and breaks it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants