You need to sign in to do that
Don't have an account?
Use of Metadata API
Hi,
I am using the declarative approach for creating the custom Objects in force.com through Metadata API's. Am facing an unique problem, In declarative approach entire object details will be in an XML file and we need to create a "Zip" package and pass this Zip Package file as input to "Deploy()" method. creation of Zip file can be done in 2 ways,
1. by using the "WinZip" tool.
2. Programmatically by using "Java.util.Zip" package.
If the zip file is created manually using the WinZip tool and if that file is passed as input parm to "Deploy()" method then object creation is successful. if we pass in the Zip file that is created programmatically to "Deploy()" method, method returns true which indicates that operation is successful, but custom objects are not getting created on the force.com.
There is no way to check if the web service method "Deploy()" has successfully processed the request or not. Any thoughts/solutions for this problem.
Regards
Sara
http://www.salesforce.com/us/developer/docs/api_meta/index_CSH.htm#meta_checkdeploystatus.htm
We are using CheckDeploystatus() and CheckStatus() to check the deployment status, CheckDeployStatus() as well as CheckStatus() returns true, but when we verify the same on the force.com site, custom objects were not created. Even we tried printing the Error message, but no errors were returned as part of Deploy() web service call.
Same code works fine if the Zip file is created through winZip utilityand objects are getting created.
I have attached the code for refrence.
arrAsyncRes[0] = binding.deploy(byte1, depOptions);
for(int i= 0;i<arrAsyncRes.length;i++)
{
ID = arrAsyncRes[i].getId();
ID1 = new String[1];
ID1[0] = ID;
arrAsyncRes_ChkStatus = binding.checkStatus(ID1);
DeployResult dplyresult = binding.checkDeployStatus(ID1[i]);
System.out.println("success "+dplyresult.isSuccess());
DeployMessage[] DM =dpr.getMessages();
System.out.println(DM[i].getProblem());
System.out.println("Isdone "+ arrAsyncRes_ChkStatus.isDone());
}
Hi Sara,
arrAsyncRes[0] = binding.deploy(byte1, depOptions);
Hi All,
I am facing exactly the same issue. The zip file gets deployed if zipped using winzip but not from java.zip.util. Is there any solution to this?
I am using partner wsdl to login, and the checkstatus shows that the file is successfuly deployed but nothing happens in salesforce.
Please help,
/G
Hi Simon,
Yes i did tried comparing the 2 and both looks identitical. Might be some difference between the compression method and level which i am not able to figure out.
Even if i create a zip file using java.util.zip then unzip and zip the same file using winzip/7zip and deployed to salesforce and it works. This shows that winzip is adding something to the zip file which makes it work.
I have been spending 2 days around this with all sorts of experiments i could do, hope you can help me on this.
/G
Any updates on this? I am facing the same issue, I dont know why the status is completed, but the zip file never got deploy to the org.
The Force.com IDE and the Force.com Migration Tool both zip files in Java and work fine.
I am wondering if you're doing something wrong with the relative paths while creating ZipEntries that get added to the zip in Java.
how did you compare the 2 zips?
also, are you setting the time and size for the ZipEntry in your Java program?
I can give you the zip file I created in java, they are exactly the same as created by winzip. I tried to deploy the zip file both using metadata api and ant deployment tool. It both fails.
I dont set the size and time in the Zipentry,
Here is the code:
Do I need to do that?