I am currently receiving an error when doing a metadata deploy. I have the following zip file structure:

Zip (File)
  --> Classes (Folder)
      --> MyCustomWrapper.cls (Class File)
      --> MyCustomWrapper.cls-meta.xml (Class Metadata)
  --> package.xml (File)

My package.xml is structured as follows:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

This is what I get when I deploy the file via the Metadata Deploy in Workbench:

Metadata API Failure

Why is the deploy looking for a package.xml in the classes folder? Shouldn't it expect the package.xml to be in the root of the zip file?

1 Answer 1


You should contain the package within a single folder of the ZIP file, like this:

+ Zip File
|-- src
  |-- package.xml
  +-- classes
    |-- MyCustomWrapper.cls
    |-- MyCustomWrapper.cls-meta.xml

The system saw a single folder in the ZIP file, and assumed that that was the wrapper folder.

  • Thanks for the comment! Unfortunately I made two mistakes in my comment, I capitalized the package.xml in my question when it was not capitalized in my deployment and I overwrote my ApexClass with MyCustomWrapper rather than NetSuiteResult. Question has been updated. Commented Dec 15, 2015 at 18:29
  • @techbusinessman Everything should be in order if you did that. For completeness, did you try wrapping the entire file in a src folder?
    – sfdcfox
    Commented Dec 15, 2015 at 18:43
  • I did not. I had been thinking about that to see what would happen. I'll try and then let you know what happens. Commented Dec 15, 2015 at 18:49
  • You rock, needed to wrap it in a src folder. Thanks! Commented Dec 15, 2015 at 19:13
  • 1
    @techbusinessman I'll revise this answer to your findings. Glad I was able to help.
    – sfdcfox
    Commented Dec 15, 2015 at 19:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .