cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect from c# to Alfresco webservice

paola72
Champ in-the-making
Champ in-the-making
Can anybody help me to connect with Alfresco from my C# Application through webservice?
I have done the login successfully but then I got stuck to access the rest of the methods.
Its showing "WSDoAllReceiver: Request does not contain required Security header".
Please help me out of this problem.
Thank you in advance.
:cry:
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
The easy way to contact Alfresco is to use the REST api or CMIS, why are you using the Alfresco Web Services API?

The Alfresco Web Services API is used when you are developing an ESB architecture and when you need to invoke multiple standard operation in an unique request (a SOAP message) that returns an unique multiple response (another SOAP message).
Typically it is used when you have to work with messaging on an Enterprise Service Bus to allow you to manage operation arrays against the repository.
So the Alfresco Web Services API is only used for Business Orchestration.

I published a post in the following threads about this:
https://forums.alfresco.com/en/viewtopic.php?f=27&t=21600

https://forums.alfresco.com/en/viewtopic.php?f=27&t=37656

This error was returned because Alfresco uses the WS-Security standard that means you need to implement by yourself the header part of the SOAP message.
By default the WSDL in Alfresco doesn't include this security check, only if you are using Java, Alfresco provides a Web Services client that is conformed with the security standard.
You can take a look at the Java code in the Alfresco Web Services Client to understand how to implement the same security check in C#.

You will need to implement a section to manage the UsernameToken:
http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#UsernameToken

Anyway I suggest you to use the CMIS AtomPub binding or the REST API to work with Alfresco remotely.
Hope this helps.