cancel
Showing results for 
Search instead for 
Did you mean: 

Create WCF Web Services for Alfresco.

bilalsaeed
Confirmed Champ
Confirmed Champ

I need to create soap based web services for Alfresco in order to integrate with third party web application.

Required web services are as follow:

Service 1:

Input: custom metadata field

output: List of documents contain such metadata field.

Service 2:

Input: Document Id

Output: Base64 data of document.

Service 3:

Upload document web service.

Any suggestions? I am already exploring CMIS to achieve such requirements, any help for this approach would be appreciated.

1 ACCEPTED ANSWER

openpj
Elite Collaborator
Elite Collaborator

You can create your own SOAP stub using internally the CMIS protocol, the following references can be used also to test your CMIS client:

CMIS Server | Content Management Interoperability Services | Alfresco

Consider that Alfresco implements both of the CMIS bindings: REST and SOAP. But I suggest you to use the REST binding.

This means that you can implement you own wrapper that exposes SOAP messages but internally talks to Alfresco using CMIS-REST binding.

Considering CMIS you can match each service as the following:

  • for the Service 1, you can use the Discovery Services
  • for the Service 2, you can get the specific Stream for the content
  • for the Service 3, you can use the Object Service

Please see the example in the official Chemistry project with also considering different languages:

Apache Chemistry - Creating and updating CMIS objects

Hope this helps.

View answer in original post

2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator

You can create your own SOAP stub using internally the CMIS protocol, the following references can be used also to test your CMIS client:

CMIS Server | Content Management Interoperability Services | Alfresco

Consider that Alfresco implements both of the CMIS bindings: REST and SOAP. But I suggest you to use the REST binding.

This means that you can implement you own wrapper that exposes SOAP messages but internally talks to Alfresco using CMIS-REST binding.

Considering CMIS you can match each service as the following:

  • for the Service 1, you can use the Discovery Services
  • for the Service 2, you can get the specific Stream for the content
  • for the Service 3, you can use the Object Service

Please see the example in the official Chemistry project with also considering different languages:

Apache Chemistry - Creating and updating CMIS objects

Hope this helps.

bilalsaeed
Confirmed Champ
Confirmed Champ

So here's what I did. For Service 1 I used CMIS to query the document.

For Service 2) I created a POST based webscript to upload file Alfresco as I needed to create folders based on requested URL parameter and also needed to compress files before upload.

For Service 3) I used Alfresco API to provide me a stream which I converted to base64 later.