cancel
Showing results for 
Search instead for 
Did you mean: 

acp import problem

felipe
Champ in-the-making
Champ in-the-making
Hello,
I've created a simple model and I use it under the web client UI. The problem is I would like to create an ACP file in order to import simple objects (type cm:cmobject).
Is it possible?
If it is, why this doesn't work?

MODEL :

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="afm:ArchitectForumModel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> 
   <description>Architect forum model</description>
   <author>Philippe Carvalho</author>
   <version>1.0</version>
  
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <namespaces>
      <namespace uri="ArchitectForumModel" prefix="afm"/>
   </namespaces>
  
   <types>
      <type name="afm:Technology">
          <!– Samples : Java, .Net, PHP … –>
         <title>Technology</title>
         <parent>cm:cmobject</parent>
      </type>
     
      <type name="afm:ArchitectDocument">
         <title>Architect Document</title>
         <parent>cm:content</parent>
         <properties>
            <property name="afm:isOS">
               <type>d:boolean</type>
               <mandatory>true</mandatory>
               <default>false</default>
            </property>
         </properties>
        
         <associations>
            <association name="afm:technology">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>afm:Technology</class>
                  <mandatory>true</mandatory>
                  <many>true</many>
               </target>
            </association>   
         </associations>
        
         <mandatory-aspects>
            <aspect>cm:versionable</aspect>
         </mandatory-aspects>
      </type>
    </types>
</model>


ACP FILE :
<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
  <afm:Technology xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:afm="ArchitectForumModel" xmlns="">
    <viewSmiley Tongueroperties>
      <cm:name>Java</cm:name>
    </viewSmiley Tongueroperties>
  </afm:Technology>
</view:view>


THE ERROR GENERATED

org.alfresco.service.cmr.view.ImporterException: Failed to find xml meta-data file within .acp package

has somebody ant idea?

Thanks.
2 REPLIES 2

davidc
Star Contributor
Star Contributor
Hello,

An ACP file must be of zip format.

So, you should have a simple zip file containing one .xml file in the root.

e.g.

 import.acp
    import.xml

The reason it's a zip is to allow the inclusion of supplementary content files (e.g. word docs) which may also be imported with the meta-data.

felipe
Champ in-the-making
Champ in-the-making
OK, thanks,
I had made this hierarchy but into a folder, so!