AnsweredAssumed Answered

setting createFolder properties - Axis2 client

Question asked by nikes on Mar 1, 2010
Latest reply on Mar 8, 2010 by nikes
Dear friends,

I have developed Apache Axis2 client (ADB binding stubs) to talk to Alfresco using CMIS API.
I am able to fetch information from repository.

Now I am trying to create folder, document in alfresco, but dont know how to set properties for that.

Can anyone guide me for creating properties object.

Here is my incomplete code.


package cmis;


import java.math.BigInteger;
import java.util.Iterator;

import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.databinding.types.xsd.QName;
import org.apache.axis2.jaxws.description.xml.handler.ObjectFactory;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub.CmisPropertiesType;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub.CmisProperty;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub.CmisPropertyString;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub.CreateFolder;
import org.oasis_open.docs.ns.cmis.ws._200908.ObjectServiceStub.CreateFolderResponse;


import com.sun.org.apache.bcel.internal.Constants;

public class ObjectClient {
   
    public static void main(String[] args) throws Exception
    {
  
        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Softwares\\axis2-1.5.1-bin\\axis2-1.5.1\\repository","D:\\Softwares\\axis2-1.5.1-bin\\axis2-1.5.1\\repository\\modules\\client.axis2.xml");

        ObjectServiceStub stub = new ObjectServiceStub(ctx, "http://localhost:8080/alfresco/cmis/ObjectService");
      
        CreateFolder cf = new ObjectServiceStub.CreateFolder();
        cf.setRepositoryId("46f8b242-9f61-423b-b824-c6118f470f01");
        cf.setFolderId("workspace://SpacesStore/0fceb8de-fe45-439a-9ac4-30b32c7671e0");
       
        [b]// How to set property name and property values?[/b]
       
        CreateFolderResponse fr = stub.createFolder(cf);
          
    }//end main

}//end class

Thanks for any help.

Outcomes