cancel
Showing results for 
Search instead for 
Did you mean: 

Call authenticate web service from .NET VC++

kannank
Champ in-the-making
Champ in-the-making
I want to call authenticate web service from .NET VC++ code - Similar to WebServiceSample1  in the sample folder - Can anyone give some code how to use authenticate webservice from .NET VC++.

Thanks,

KannanK
5 REPLIES 5

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

Have a look at projects\extensions\dotNET2\Alfresco\AuthenticationUtils.cs which can be found in the source download.

It's a util class that encapsulates access to the Authentication Web Service from .NET using C#.

Hope this helps,
Roy

kannank
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your immediate response and for your answer - I have seen that folder mentioned by you (dotNET2) - I have build that sample in VS2005 and run that sample - It is working fine and thanks once again.

Actually alfresco is not running in my local machine and it is running in our network machine - So I initially had "null exception error" when I entered user name & password and submit the user form - Then I have done the following to connect the alfresco running in remote server.

I have changed the 'localhost:8080' to 'IP Address:8080' in the following files,

1.Modified in app.config file.
2.Modified in authentication-service.wsdl file located in 'dotNET2/Alfresco/Web References/AuthenticationWebService'
3.Modified in content-service.wsdl file located in 'dotNET2/Alfresco/Web References/ContentWebService'
4.Modified in repository-service.wsdl file located in 'dotNET2/Alfresco/Web References/RepositoryWebService'
5.Modified in Settings.settings file located in 'dotNET2/Alfresco/Properties'

Now I am able to access the alfresco running in remote machine with the above changes.

Thanks,

KannanK

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

Yes, well spotted.  In fact by coinsidence I added a simple WebServiceFactory class to the .NET sample yesterday which means the server details only need to be changed in one location. (eventually it will come from a config file).

I'll let you know when I've checked this in.

Cheers,
Roy

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

WebServiceFactory has been checked into SVN now.

r2535 | royw | 2006-03-09 15:22:29 +0000 (Thu, 09 Mar 2006) | 2 lines
Changed paths:
   M /alfresco/HEAD/root/projects/extensions/dotNET2/Alfresco/Alfresco.csproj
   M /alfresco/HEAD/root/projects/extensions/dotNET2/Alfresco/AuthenticationUtils.cs
   A /alfresco/HEAD/root/projects/extensions/dotNET2/Alfresco/WebServiceFactory.cs
   M /alfresco/HEAD/root/projects/extensions/dotNET2/Samples/Browse.cs
   M /alfresco/HEAD/root/projects/extensions/dotNET2/dotNET2.suo


Thanks,
Roy

kannank
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your immediate response.

Where can I download the latest source for this dotnet2 folder (so that I use server reference (localhost or IP address) in configuration file).

Looking for your source download link for this.

Also please give me some clue or some reference to get the authentication / repository web service using VC++.NET - Thanks.

Regards,

K.Kannan.