Before we work on your code, can you give a brief summary of what you are trying to do? I'll go ahead and take a swing at it based on what's in your message, but a little bit of context would help…This looks like Java code and you are using the CMIS ATOM Pub binding, so I am assuming you are in a remote Java application that needs to create a folder in the Alfresco repository. If that is the case, you might want to simplify your life by using a higher-level API. I'd strongly suggest looking at the OpenCMIS Java client API. If you use that, all you'd need is the service URL for the repository, which in your case would be http://localhost:11080/alfresco/service/api/cmis, and then you can use domain objects like "Session", "Document", and "Folder". For example, using OpenCMIS, the call to create a folder looks like this:Folder root = session.getRootFolder();
// properties
// (minimal set: name and object type id)
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder");
properties.put(PropertyIds.NAME, "a new folder");
// create the folder
Folder newFolder = root.createFolder(properties);
If OpenCMIS doesn't meet your needs and you insist on moving your own XML back and forth, you should probably grab the Apache Chemistry CMIS Workbench. Then you can watch the traffic and see how exactly what the client is posting. And definitely read the spec. It's a short read and it describes exactly what the XML should be. I notice you are missing a cmisrabject element, for example.On the other hand, if what you are doing is writing a Web Script controller in Java, you don't need to make remote calls to create objects in the repository at all. Instead, you can use the Java Foundation API. Using the Java Foundation API you can use things like the NodeService and the FileFolderService to work with objects in the repository from within your Java-based web script controller. A wiki search should turn up some examples around that.Jeff