Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AXIS attachments

 
B Rook
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
  • 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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic