Coding environment
- Alfresco 3.3 Community edition
- Visual Studio .Net 2005
- Windows XP Pro version 2002 SP3
List of the web service in alfresco
| Service Name | Purpose | URL |
|---|---|---|
| AccessControlService | Manage permissions | http://host:port/alfresco/api/AccessControlService?WSDL |
| ActionService | Execute custom actions and rules | http://host:port/alfresco/api/ActionService?WSDL |
| AdministrationService | Manage users and groups | http://host:port/alfresco/api/AdministrationService?WSDL |
| AuthenticationService | Login and access session tickets | http://host:port/alfresco/api/AuthenticationService?WSDL |
| AuthoringService | Allows collaboration between users | http://host:port/alfresco/api/AuthoringService?WSDL |
| ContentService | Read and write content | http://host:port/alfresco/api/ContentService?WSDL |
| ClassificationService | Manage categories | http://host:port/alfresco/api/ClassificationService?WSDL |
| DictionaryService | Manage content models | http://host:port/alfresco/api/DictionaryService?WSDL |
| RepositoryService | Navigate, search, and manipulate nodes. | http://host:port/alfresco/api/RepositoryService?WSDL |
I manage to add all the wsdl, but AccessControlService can not be call, I fail to update web reference also, maybe there are something wrong with it's schema.
Okay from here on, you need additional class to help you to communicate with the web service
- WebServiceFactory.cs
- AuthenticationUtils.cs
- Constants.cs
You would likely encounter this error when you call WebServiceFactory.addSecurityHeader
"cannot convert from 'Alfresco.RepositoryWebService.RepositoryService' to 'Microsoft.Web.Services3.WebServicesClientProtocol'"
To fix this you must change file Reference.cs for every WSDL that you add in your code, example
- public partial class ContentService : System.Web.Services.Protocols.SoapHttpClientProtocol
- public partial class ContentService : Microsoft.Web.Services3.WebServicesClientProtocol
It goes without saying you should add references Microsoft.Web.Services3
Still in WebServiceFactory don't forget to change this value and point it to your alfresco server
- private const string DEFAULT_ENDPOINT_ADDRESS = "http://localhost:8080/alfresco"