I'm developing an app that uses APEX + SOAP API to retrieve and deploy metadata (specifically - objects). I'm using apex-mdapi to get it done with SOAP. I want to retrieve deployment's details when it fails.

I'm using checkDeployStatus method to check if deployment is done and to get it's status:

    public static void checkDeployAsyncRequest(String asyncResultId){
        MetadataService.MetadataPort service = createService();
        MetadataService.DeployResult deployResult = service.checkDeployStatus(asyncResultId, true);


errorMessage and errorStatusCode are null:

enter image description here

Anyway I can get the details in Setup and using Rest API as well:

enter image description here enter image description here

How can I achieve this using SOAP?

1 Answer 1


The error message should be in:


The topLevel errorMessage and errorStatusCode are for payload problems (e.g. invalid XML or a missing file). Once it starts processing, you need to check componentFailures for error messages.

  • Why didn't I think of the fact that the soap result might have the same structure as the rest? I have no idea! Thanks, @sfdcfox :) Jun 15 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.