Author Topic: Why to create Folder(Java)?  (Read 4767 times)

rasonyang

  • Guest
Why to create Folder(Java)?
« on: November 16, 2007, 08:22:47 AM »
I want to create Folder by Configuration Platform 7.5,
but always found error message: "No permissions to create an object under this Folder".
Code is below:
                RequestCreateObject requestCreateObject = RequestCreateObject.create();
requestCreateObject.setObjectType(ObjectType.Folder.asInt());
String xml= "<ConfData>" +
"<CfgFolder>" +
"<name value=\"PFolder112\"/>" +
"<type value=\"3\"/>" +
"<CfgOwnerID>" +
"<CSID value=\"0\"/>"+
"<DBID value=\"101\"/>" +
"<type value=\"7\"/>" +
"</CfgOwnerID>" +
"<state value=\"1\"/>" +
"<objectIDs><CfgObjectID><CSID value=\"0\"/><DBID value=\"190\"/><type value=\"3\"/></CfgObjectID></objectIDs>"+
"<CfgParentID>" +
"<CSID value=\"0\"/>"+
"<DBID value=\"2560\"/>" +
"<type value=\"22\"/>" +
"</CfgParentID>" +
"<folderClass value=\"1\"/>" +
"</CfgFolder>" +
"</ConfData>";
requestCreateObject.setConfObject(MappingUtil.buildW3cDoc(xml));
Message response = ConfigTemplate.request(requestCreateObject);
logger.warn("response xml is:\n "+response);

//
Would you help me?

Offline sgjin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Why to create Folder(Java)?
« Reply #1 on: January 07, 2008, 02:48:22 AM »
  • Best Answer
  • Simple xml is ..

    String xml =
    "<ConfData>" +
    "<CfgFolder>" +
    <name value="NewFolder"/>
    <type value="folder_object_type"/>
    "<CfgOwnerID>" +
    <DBID value="owner_dbid"/>
    "</CfgOwnerID>" +
    "</CfgFolder>" +
    "</ConfData>";
    « Last Edit: January 07, 2008, 02:50:50 AM by sgjin »