cancel
Showing results for 
Search instead for 
Did you mean: 

C# Application

tcardoso
Champ in-the-making
Champ in-the-making
I'm developing a C# application using the Alfresco Web Services, that's supposed to manage documents (write/read to/from) stored in the Alfresco server.

Since the documentation provided is more java-oriented, I'm having a little trouble associating it to C#.

Anyway - before anything else - how do I start a session using C# code, in order to begin managing the content in the server.

Thanks.
2 REPLIES 2

jpfi
Champ in-the-making
Champ in-the-making
Hi,

AuthenticationService authenticationService = new AuthenticationService();
authenticationService.Url = "http://localhost:8080/alfresco/api/AuthenticationService";
AuthenticationResult results = authenticationService.startSession(userName, password);
Cheers, jan

tcardoso
Champ in-the-making
Champ in-the-making
Hi. I appreciate the quick response, but I still seem to be having some problems.

At first, I added the following Web Service into my Visual Studio service reference: "http://localhost:8080/alfresco/wsdl/authentication-service.wsdl".

Using this URL, I could not access the "AuthenticationService" class that you pointed in your response.

So, I tried to add the Web Service provided by your URL ("http://localhost:8080/alfresco/api/AuthenticationService") with no success.

Maybe I should show the code I've written so far. I doubt this is what I'm supposed to do, though.

string username = "admin", password = "admin";
AuthenticationResult ar = new AuthenticationResult();

AuthenticationServiceSoapPortClient soap = new AuthenticationServiceSoapPortClient();

ar = soap.startSession(username, password);