aspose file tools*
The moose likes Web Services and the fly likes AXIS attachments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "AXIS attachments" Watch "AXIS attachments" New topic
Author

AXIS attachments

B Rook
Greenhorn

Joined: Dec 27, 2003
Posts: 13
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

Joined: Mar 16, 2001
Posts: 984

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 ]

Please ignore post, I have no idea what I am talking about.
B Rook
Greenhorn

Joined: Dec 27, 2003
Posts: 13
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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AXIS attachments
 
Similar Threads
XML Schema Problem
XML Schema Problem
Axis generating Elements instead of Attributes
WSDL2Java Error
java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.