Sure, it's simply a Python-wrapped visualization app that I want to interact
with remotely -- I send Python cmds to the app from a client, they get
executed, an image is generated and returned. Because I want it to be
*interactive*, I'd don't want to write a jpeg file to disk, but simply keep it
in memory and return the binary stream.
I realize a big question is - what sort of protocol *should* be used. The
answer is not a simple one, due in part to other groups/apps I'm trying to
interface with. FWIW, I've used CORBA til now, but am dumping it, again, for
various reasons.
thanks for asking,
--Randy
On Jan 16, 11:34am, Aaron Held wrote:
> Subject: Re: [Webware-discuss] Java xmlrpc client; binary data
> Just out of curiosity can you describe that app again?
> If all you want it to pull a jpeg it may be just easier to setup a
> servelet that returns a jpeg based on HTTP request params.
>
> In java its something like -( untested made up code):
> import java.net.*;
> import java.io.*;
>
> public class URLReader {
> public static void main(String[] args) throws Exception {
> URL Webjpeg = new URL(
> "http://localhost/webKit/getImage?type=123&what=ever");
> bis = new BufferedInputStream(
> new InputStreamReader(
> Webjpeg.openStream()));
>
> byte[] buff = new byte[2048];
> int bytesRead;
>
> while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
> I forgot what to do here);
> }
> }
>
> Or in Python/Jthon a much more reasonable:
>
> import urllib
> Url="http://localhost/webKit/getImage?type=123&what=ever"
> q = urllib.urlopen(Url)
> retpage = q.read()
>
> Or if its for a web page I'm sure it will be fewer lines of JavaScript
>
> -Aaron
>
> Randy Heiland wrote:
> > Any examples of sending/receiving binary data, e.g., a jpeg?
> >
> > --Randy
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: Thawte.com
> > Understand how to protect your customers personal information by
implementing
> > SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
> > Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
> > _______________________________________________
> > Webware-discuss mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>-- End of excerpt from Aaron Held
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss