• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Services and Images

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic