2

そのため、Mule を使用してフォルダーにドロップされたファイルを取得し、それらのファイルを CMIS コネクタ経由で Alfresco にプッシュしたいと考えています。Alfresco を起動して実行していますが、ファイルを移動しようとすると Mule でエラーが発生し続けます。以下は私の流れです:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:cmis="http://www.mulesoft.org/schema/mule/cmis" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd 
http://www.mulesoft.org/schema/mule/cmis http://www.mulesoft.org/schema/mule/cmis/current/mule-cmis.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
   <cmis:config name="CMIS" username="*****" password="*****" repositoryId="6ddd8d97-e591-4327-bdaf-3e7be8604273" baseUrl="http://localhost:8080/alfresco/service/api/cmis" 
   doc:name="CMIS"/>
   <flow name="createDocumentFlow" doc:name="createDocumentFlow">
    <file:inbound-endpoint path="/home/administrator/Downloads/Output" responseTimeout="10000" doc:name="File"/>
       <cmis:create-document-by-path filename="#[header:originalFilename]"  folderPath="/Sites" 
       mimeType="application/pdf" objectType="cmis:document" versioningState="NONE" config-ref="CMIS" doc:name="CMIS"/>
   </flow>
</mule>

ここで何が間違っていますか?

4

2 に答える 2

1

これはうまくいきました。File-to-byte-array-transformer の代わりに Object-to-byte-array-transformer を使用しました。

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
    xmlns:cmis="http://www.mulesoft.org/schema/mule/cmis" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd 
http://www.mulesoft.org/schema/mule/cmis http://www.mulesoft.org/schema/mule/cmis/current/mule-cmis.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd ">
   <cmis:config name="CMIS" username="*****" password="*****" repositoryId="6ddd8d97-e591-4327-bdaf-3e7be8604273" baseUrl="http://localhost:8080/alfresco/service/api/cmis" 
   doc:name="CMIS"/>
   <flow name="createDocumentFlow" doc:name="createDocumentFlow">
    <file:inbound-endpoint path="/home/administrator/Downloads/Output" responseTimeout="10000" doc:name="File" />
       <object-to-byte-array-transformer mimeType="application/pdf" doc:name="Object to Byte Array"/>        
       <cmis:create-document-by-path filename="#[header:originalFilename]"  folderPath="/OCR" 
       mimeType="application/pdf" objectType="cmis:document" versioningState="NONE" config-ref="CMIS" doc:name="CMIS"/>
   </flow>
</mule>
于 2012-10-24T01:40:04.607 に答える
0

cmis syncを試す cmissync.com/

私にとっては問題なく動作し、常にシステムと同期します。利用可能なオプション: バージョニング、チェックアウト、チェックイン、アスペクトの編集、メタデータなど..

于 2016-03-06T03:57:00.387 に答える