cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco API for .NET

santoshkarla
Champ in-the-making
Champ in-the-making
Hi,

I am a technical lead with Adaequare. We are exploring the options for Alfresco's support for .NET. Is there any .NET API or should we be using the webservices only. If there is an API then can you direct me to that location where i can find it?

Thanks,
Santosh Karla
12 REPLIES 12

mikeh
Star Contributor
Star Contributor
Hi

Currently the web service interface is the only API that supports .NET.

Having said that, the Office Add-Ins were written using .NET 2.0, as they interface with the Alfresco repository using Web Scripts hosted in an Internet Explorer instance. Depending on your requirements, this might also be a path to consider.

Thanks,
Mike

santoshkarla
Champ in-the-making
Champ in-the-making
Hey Mike,

Thank you for the quick reply. One quick question; where can I get the webservices API?

Thanks,
Santosh Karla

mikeh
Star Contributor
Star Contributor
You can get the wsdl files from tomcat\webapps\alfresco\wsdl\

Each one maps to http://localhost:8080/alfresco/api/

for example http://localhost:8080/alfresco/api/RepositoryService

Thanks,
Mike

amitolsys
Champ in-the-making
Champ in-the-making
Hey Mike,
When I am trying to add repository.wsdl file it throws an error saying "The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- The 'nillable' attribute is not supported in this context"

Please let me know how can it be resolved.
I am using .net 3.5 to develope webpage which access the alfresco repository.

Cheers!
AmitOlsys

mikeh
Star Contributor
Star Contributor
I don't think .NET likes the nillable attributes in .xsd files, in this case cml.xsd.

Just remove the nillable attributes and try again.

Mike

amitolsys
Champ in-the-making
Champ in-the-making
Thanks Mike for your reply,
But I wanted to fetch the 30 days trial version on
http://www.alfresco.com/products/ecm/hostedtrials/ 
which give me
http:\\hosted4.alfresco.com\alfresco
and I am trying to add WSDL of it with link
http:\\hosted4.alfresco.com\alfresco\wsdl\repository-service.wsdl
so how can I change the .xsd file from this server.
Please tell me if I save all these files and use the reference from my localhost then will it work for me.

Thanks and Regards
AmitOlsys


I don't think .NET likes the nillable attributes in .xsd files, in this case cml.xsd.

Just remove the nillable attributes and try again.

Mike

mikeh
Star Contributor
Star Contributor
Please tell me if I save all these files and use the reference from my localhost then will it work for me.
Yes, should do - although you'll obviously have to manually change the endpoint URL in the .NET generated classes.

Mike

amitolsys
Champ in-the-making
Champ in-the-making
Dear Mike,
There is also a problem of addSecurityHeader method used in WebServiceFactory Class file saying
Error   1   The best overloaded method match for 'WebServiceFactory.addSecurityHeader(Microsoft.Web.Services3.WebServicesClientProtocol)' has some invalid arguments   
Error   2   Argument '1': cannot convert from 'Alfresco.RepositoryWebService.RepositoryService' to 'Microsoft.Web.Services3.WebServicesClientProtocol'   

I am using .net 3.5 and alfresco on tomcat server on my localhost,
Please let me know how to resolve such an issue…….

Thanks
AmitOlsys

mikeh
Star Contributor
Star Contributor
Sorry, I can't help you further as I don't have a .NET 3.5 environment here.

Maybe someone else can jump in and help…?

Mike