cannot connect to http://localhost/alfresco/service/cmis

cancel
Showing results for 
Search instead for 
Did you mean: 
banishjha
Member II

cannot connect to http://localhost/alfresco/service/cmis

Hi , 

I am new to Alfresco . And i am trying to hit the api using the .NET framework . But somehow i am not able to hit the below URL : http://localhost/alfresco/service/cmis . I am using the DotCMIS.dll but somehow it responds me as sendFailed. Please find my code below : 

 Dictionary<string, string> parameters = new Dictionary<string, string>();

 parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;

 parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost/alfresco/service/cmis";

 parameters[DotCMIS.SessionParameter.User] = "admin";

parameters[DotCMIS.SessionParameter.Password] = "********";

 SessionFactory factory = SessionFactory.NewInstance();

  ISession session = factory.GetRepositories(parameters)[0].CreateSession();

I am getting the error as Send Failed . Can you please help me out if i am missing something . As i want to implement the search document api .

Any reference URL and help is appreciated .

Thanks !!

4 Replies
calvo
Senior Member

Re: cannot connect to http://localhost/alfresco/service/cmis

Hi,

I think the url should be something like this:

http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom

I mean, you must use the suitable port in your Alfresco.

Regards,

clv

banishjha
Member II

Re: cannot connect to http://localhost/alfresco/service/cmis

Hi ,

Thanks for your response . I have resolved the issue . Can you help me with the searching of pdf content . Please find the below code that I am using :

IItemEnumerable qr = session.Query("SELECT * FROM cmis:document where CONTAINS('dockertraining')",false);

But its not searching the content , I mean the result returned is zero .

Regards,

Banish Jha

calvo
Senior Member

Re: cannot connect to http://localhost/alfresco/service/cmis

Hi,

In your Alfresco, check the query using Node Browser, please. 

What's the results of Node Browser?

If there's no result, maybe this text: "dockertraining",  doesn't indexed (for example: scanned document whithout OCR).

Regards,

clv

banishjha
Member II

Re: cannot connect to http://localhost/alfresco/service/cmis

Hi Calvo ,

Thanks for your quick response . I have already solved it and the search is working fine for me .

Appreciate your work.

Regards,

Banish Jha