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 Web Services and Images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Services and Images" Watch "Web Services and Images" New topic
Author

Web Services and Images

Scott Branchini
Greenhorn

Joined: Mar 01, 2006
Posts: 14
I have a Web Service (Axis) that takes in an object and will perform a function on that object. The object contains a String and a BufferedImage. The service will insert both things into a local database. Everything works fine when I set up my service to deal with an object that only contains primitive types (String, int, ...), but now that I changed it to take a BufferedImage, I get an error when I try to invoke the service:

Error: IllegalArgumentException: argument type mismatch

I check the deployed WSDL and everything looks good as far as I can see.

Any suggestions?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
SOAP wouldn't know what to do with a BufferedImage - it can only transfer certain predefined object types (like int and string). Either you need to provide serializer/deserializer classes for it, or send the image encoded as a BLOB. This recent thread links to articles explaining how to transfer files, which may or may not be an option in your case.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Services and Images
 
Similar Threads
OutOfMemoryError during Print Preview
error (405) Method not available
Need help Printing
DataObjects sent from client service web are null in the web service
how to call local webservice method?