Oracle Aqua logic ESB and Alfresco document management integration
Alfresco provides SOAP API for integration of document management services. The SOAP web services are secured using username token profile standard. In lay man terms this means each web service calls requires authentication ticket in SOAP headers.
To insert a document in alfresco document management service, insure a store exists and a user has rights to it, following that follow steps below
1) Use authentication service to Authenticate and retrieve a token
2) Use the token from step 1 and pass to any subsequent web service calls, in this case create service (to store document)
Alfresco Authentication service from ESB
Insure alfresco is running, if not start alfresco using shortcut in start menu
1) Import the WSDL. The WSDL file could be found in WSDL folder example C:\Alfresco\tomcat\webapps\alfresco\wsdl
2) Create business service using the business service in step 1
3) Call the start session operation, passing the username and password.
This will result in service returning:
admin
TICKET_d1b09a6cf0a6083e1079be6dff9a09ff1300fd95
636589202940FF49CF5A2705FBA7AB9A
Ticket returned in the response needs to be passed along to subsequent calls in SOAP header
Content service in alfresco
When calling write operation in create service, authentication information is required in soap header example:
2008-09-25T13:32:32.203Z
2009-09-29T19:13:32.203Z
ticket
TICKET_bcf645c4cbf5b5a43eba43ca65147ab0f202c179
JrKZdUBVLTODE7Hayc+35A==
2008-09-25T13:32:32.203Z
workspace
SpacesStore
/app:company_home/app:guest_home/cm:TestUpload2.txt
{http://www.alfresco.org/model/content/1.0}content
aGVsbG8gdGhpcyBpcyB0ZXN0
text/html
utf-8
Content
The content passed in write operation needs to be in base64 format. There are various methods of encoding a file into base64 format. To get started one could use online services. Programmatically ESB provides function to convert text to base64 format. In POC it was converted using JAX-WS based web service.
Mime type
Correct mime type of the content needs to be passed along so that when reading browser could render the content. List of mime types could be found here
Password Text
Password text field contains the Ticket retrieved from authentication service.
Once the document has been uploaded into the repository end session operation of authentication service is called along with ticket
Copy the DLL for CIFS to work
From
C:\Alfresco\extras\bin
To
C:\WINDOWS\system32