• 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

AXIS attachments

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to send back both a string and a zip file from a webservice built using axis1_2RC1. here's the entry in the wsdl:


I can build and deploy and call the service but it fails with this message:


Here's the line that creates the datahandler:

DataHandler dh = new DataHandler(zipBytes,"multipart/*");

zipBytes is a byte[] and I wasn't sure what to use for the mime type so I used multipart/*, but that doesn't seem to work.

Are there any suggestions on how to send the attachment correctly?

Thank you
 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This page talks about different ways of attaching your attachments. It doesn't
have an exact example of the way you are calling DataHandler,
it shows how to use the ctor which takes a url instead.
[ April 01, 2005: Message edited by: William Barnes ]
 
B Rook
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a good article about adding attachments if you want to use the javax.xml.soap.* package. However, AXIS wraps most of these classes for you. I was hoping to get a more AXIS specific message. I may have to try the AXIS mailing list.

Thank you,
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic