Quote:
I can see a few different solutions to this situation, but I am not quite clear on the implementation you have in mind. Is the image being generated and then stored somewhere on the server, waiting for the user to request it, or is the image to be generated dynamically at the time the user requests it?
In either case, honestly I think the actual image would exist outside the web service as a distinct entity on the server, either as a static file or an image generation program. The web service would simply give the client a link to request the image. The server would then deliver the static image or generate and deliver a live image.
|
Hi
Thanks a lot for your reply. Here is one solution that I managed to implement :
I generated the image within my java code when the web service method was called (there are some parameters that I need to customize the image with - hence the dynamic generation.) I saved the image xml in a string and returned the string. Then on the mobile client using the image I converted the string to a byteInputStream and displayed it.
I think if I just create a file on my server and send it across, it should by default go as a stream of bytes - but am not too sure how to do that. And as of now, I don't see any effeciency gain in creating a file over a simple string object.
Quote:
|
The web service would simply give the client a link to request the image. The server would then deliver the static image or generate and deliver a live image.
|
Can you please elaborate on returning a link to request the image ? What I am doing is directly returning the image as a stream of bytes from the web service.
Moreover, I need to generate dynamic graphs for my web service. Do you have any suggestions on how this could be done effeciently without having to create the whole image every single request ? Like does svg support something like parameters to modify charts ?
Thank you for your help
Sparsh