cancel
Showing results for 
Search instead for 
Did you mean: 

Alf Web Services API with .NET

wanderer2019
Champ in-the-making
Champ in-the-making
Hi,

Im tryin to use web services API from .NET app. Using Framework 4.0 and WCF i got proper configs and classes generated with scvutil.
Done all the changes in config according to http://wiki.alfresco.com/wiki/Web_Service_Samples_for_.Net. Authorization service works fine - i am able to get ticket.
But RepositoryService rises exception - "The provided URI scheme 'http' is invalid; expected 'https'.
Parameter name: via" (for example when i try to call repoService.getStores():smileywink:.

Any idea what i do wrong? How could i run functionality proper? 

P.S. Alfresco version 3.2
7 REPLIES 7

brogits
Champ in-the-making
Champ in-the-making
i did use the chemistry web api and .net to connect to alfresco web services. one reason for me using chemistry is because of the issue you might be in now. and that is .net only allows UserNameTokens on https.

you can read it up here: http://chemistry.apache.org/java/examples/example-connect-dotnet.html

joss
Champ in-the-making
Champ in-the-making
Hi brogits,


Looks interesting I'm fighting with WCF/WSE and alfresco for the last few days.

Do you have an example of your implementation?

Would be extremely grateful!

Thanks,
Regards,
Josselin

brogits
Champ in-the-making
Champ in-the-making
Im sorry, for this late reply. It has been months that I had not work with Alfresco, but now that Im back on it I can again start contributing to this forum.

Should any one still needs the example code please post your email and ill send you my full visual studio project that does the web services call.

ernartey
Champ in-the-making
Champ in-the-making
Thanks Brogits . I am interested in the .net code . Kindly send me a copy to ernestnartey2000@yahoo.com . I really appreciate it .

billydoe
Champ in-the-making
Champ in-the-making
Security header problem with WCF ( Framework 4.0)
—————————————————————
Hi all,
Currently I use following web method to add security header of Repository Service API.

private static void addSecurityHeader(Microsoft.Web.Services3.WebServicesClientProtocol service)
        {
            UsernameToken userToken = new UsernameToken(AuthenticationUtils.UserName, AuthenticationUtils.Ticket, (PasswordOption)2);
            //service.RequestSoapContext.
         
            service.RequestSoapContext.Security.Timestamp.TtlInSeconds = (long)100;
            service.RequestSoapContext.Security.Tokens.Add(userToken);
        }

However it trows me error when I changed to WCF because of RequestSoapContext.Security is obsolete. If I remove that header I got an exception {"WSDoAllReceiver: security processing failed (actions mismatch)"}".
Is there any way to replace for the header?

anilkumarsahoo
Champ in-the-making
Champ in-the-making
Hi Brogits,

I am struggling before 15 days for Alfresco implementation in my .net project. So please help me and send your project copy to me where you implement Alfresco in my mail ID (anilkumarsahoo222@gmail.com)

I Would be extremely grateful!

Thanks,
Anil

cnarvaez
Champ in-the-making
Champ in-the-making
Hi team.

I´m working in a same proyect whit Alfresco 5 community…. and I try to upload and download documents from external desktop aplicaction, If somebody can share the code for establishin coneccion using webdav adn curl but I can´t beacause the version community cant share the group  thanks