File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How-to Pass Images using Web services? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How-to Pass Images using Web services?" Watch "How-to Pass Images using Web services?" New topic
Author

How-to Pass Images using Web services?

arya putra
Greenhorn

Joined: Apr 27, 2004
Posts: 16
Hello folks,
I am using Tomcat and axis for web services.
I am taking some images using a webcam which my client program suppose to display. One of the problems am facing is how pass an Image taken by the webcam using SOAP to my client program. One possible solution that I thought of is to convert the Image to a byte array and pass it and then convert back to Image at the client side. But before doing so I would like to be sure.
Did any one handle this or similar kind of issue before? Or if someone has any other idea?
Please get back!!!
Thanks in return.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
A byte array will work - note that it will be base64 encoded because some bytes can't legally be part of XML messages.
Bill
arya putra
Greenhorn

Joined: Apr 27, 2004
Posts: 16
Hi Bill,
Thanks for getting back!!! I am a core C programmer and recently plunged to JAVA world!!! I just got this idea but I dont know how to go for it!! Any idea of any useful class which I could use for my objective!!!
Thanks a lot!!!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Someone recently posted about having uploaded a Base64 implementation as an open source project to sourceforge.net.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How-to Pass Images using Web services?