cancel
Showing results for 
Search instead for 
Did you mean: 

read an image using webservices ?

lalli
Champ in-the-making
Champ in-the-making
Hi,

my requirement is in my application i need to display the image stored in alfresco in a jsp.  does anybody have the code (webservices) to read the image.

Thanks in advance.

Regards,
lalli.
3 REPLIES 3

maheshlinga
Champ in-the-making
Champ in-the-making
Hi lalli,

If you were to be able to do this, pls post your approach here.

That will be helpfull to all the alfresco users.

lalli
Champ in-the-making
Champ in-the-making
MaheshLinga, can you pass me your email id.  I have few queries on Alfresco Webservices usage.  I would contact you once I get your email id here.

legba
Champ in-the-making
Champ in-the-making
Hi,
my approach has been to write a sort of "proxy" that expose the alfresco content.
Let's say that the image is located in

Company Home -> resources -> images

I wrote a servlet that intercepts all the requesto to, say, /resources/ and takes the rest of the URL (via the pathInfo) as the "address" of the resource inside alfresco; it then retrieves the image via the web services api and copies it back to the client.

In this way if I want to display the image inside the jsp (or in an html, that is) I just need to write a link of this type:

<img src="/resources/images/myimage" />

As an added feature I use OSCache to cache my contents in order to avuoid calling alfresco for each request.

I hope this answers your question, let me know if you need more details or some code to play with.

Regards,

Fabio