problem accessing content after logging using webservices

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2006 08:33 AM
I am using Alfresco V1.4 and working with webservice api.
From Alfresco Web Client, I created a user "lalli" and same password using admin rights.
Now in my application I try to access a node after starting the session as below :
AuthenticationUtils.startSession("lalli", "lalli");
I am successfully logged in and when I try to access any node (eg :http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3... – this user has access to read this file), It is again promting me to login.
I am not sure why its asking for logging even after logging thru my application ? Even when i log in thru admin
AuthenticationUtils.startSession("lalli", "lalli");, accessing that node is asking me for a login.
In my servlet (in tomcat), i am using
response.sendRedirect(URL) to open my document in new window. Here URL http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3...
Is there any problem doing response.sendRedirect()?
Need this info urgently.
thanx in advance.
From Alfresco Web Client, I created a user "lalli" and same password using admin rights.
Now in my application I try to access a node after starting the session as below :
AuthenticationUtils.startSession("lalli", "lalli");
I am successfully logged in and when I try to access any node (eg :http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3... – this user has access to read this file), It is again promting me to login.
I am not sure why its asking for logging even after logging thru my application ? Even when i log in thru admin
AuthenticationUtils.startSession("lalli", "lalli");, accessing that node is asking me for a login.
In my servlet (in tomcat), i am using
response.sendRedirect(URL) to open my document in new window. Here URL http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3...
Is there any problem doing response.sendRedirect()?
Need this info urgently.
thanx in advance.
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2006 10:27 AM
Hi,
You need to put ?ticket=<ticketid> at the end of the download URL.
The ticket is in the response to the start session web service call.
Cheers,
Roy
You need to put ?ticket=<ticketid> at the end of the download URL.
The ticket is in the response to the start session web service call.
Cheers,
Roy

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2006 11:06 PM
Hi,
Thanx for the instant response.
I have one more query.
I open this http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3...<ticketID>
and in this a.doc, I have a link to another document which is also in the same space and accessible to the logged in user.
Now the link has URL (http://localhost:8080/alfresco/download/direct/workspace/SpacesStore/9a79396f-8e82-11db-8023-cb60758...) and when I click on this link, it does not open the document and asks me for logging, but i have already logged in.
How do I append the ticket to this link which is in the document ?
I need this info urgently.
Regards,
Lalli.
Thanx for the instant response.
I have one more query.
I open this http://127.0.0.1:8080/alfresco/download/direct/workspace/SpacesStore/36136779-8421-11db-a9f8-cb5a7c3...<ticketID>
and in this a.doc, I have a link to another document which is also in the same space and accessible to the logged in user.
Now the link has URL (http://localhost:8080/alfresco/download/direct/workspace/SpacesStore/9a79396f-8e82-11db-8023-cb60758...) and when I click on this link, it does not open the document and asks me for logging, but i have already logged in.
How do I append the ticket to this link which is in the document ?
I need this info urgently.
Regards,
Lalli.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2007 07:03 AM
any answer for my above question.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2007 04:49 AM
Hi,
As far as I know, which is not too much unfortunately, the ticket is valid for as long as the session is up… so the user should be logged as long as the ticket is valid…
Take a look at sam69 comments about "opened web service transaction" on this thread.
Maybe your problem is that you close the session after getting the ticket…
Regards.
As far as I know, which is not too much unfortunately, the ticket is valid for as long as the session is up… so the user should be logged as long as the ticket is valid…
Take a look at sam69 comments about "opened web service transaction" on this thread.
Maybe your problem is that you close the session after getting the ticket…
Regards.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2007 11:41 PM
Hi,
I solved the above problem where it was asking me to login inspite of logging thru webservices in my application.
The problem was the first document which I accessed used to return me the URL with the hostname (eg : http://abc.def.com:8080/…. ) instead of the IP (eg : http://10.1.1.1:8080/…) as my alfresco is running in Linux m/c. Now in the first document, i had link pointing to the sec one which was absolute path (http://10.1.1.1:8080/.../b.html).
Now i converted the hostname to the IP and my problem is solved 🙂
thanks.
I solved the above problem where it was asking me to login inspite of logging thru webservices in my application.
The problem was the first document which I accessed used to return me the URL with the hostname (eg : http://abc.def.com:8080/…. ) instead of the IP (eg : http://10.1.1.1:8080/…) as my alfresco is running in Linux m/c. Now in the first document, i had link pointing to the sec one which was absolute path (http://10.1.1.1:8080/.../b.html).
Now i converted the hostname to the IP and my problem is solved 🙂
thanks.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2007 12:09 PM
Hi lally:
I have the same problem with the hostname and IP name, how did you do to solve this problem?
Thanks in advance
I have the same problem with the hostname and IP name, how did you do to solve this problem?
Thanks in advance
