Jason Boehle wrote:

You might want to take a look at

http://www.mail-archive.com/[EMAIL PROTECTED]/msg08732.html

The gist of the article is that you shouldn't bother trying to specify
attachments in the WSDL. The client must be told to via some other
mechanism than WSDL that attachments are required. From there it is a
fairly simple matter to send and extract attachments. This is the
approach that I've taken with a web service that I'm developing mainly
because of interoperability issues (with .NET).



I saw that article, but right now I am not specifying the attachments in my WSDL and Axis is still throwing up on the multipart mime message. Any ideas on what I need to change in my WSDL to get past that hurdle? It looks pretty straightforward to access the attachments if I could actually get my code called for the message.

-Jason


I'm not certain why you're getting the illegal argument exception. Have you looked at the logs?

Also, your WSDL has a ContentData memeber of type base64Binary. This implies that you eventually want to send the binary data in that element. That's not an attachment but part of the SOAP message. If you're planning on sending large files, this is not a good way to go.

I am by no means an expert in this yet but my suggestion would be to start with a very basic WSDL with, say, an operation that takes and returns a string. Once that's working, then call org.apache.axis.client.Stub.addAttachment() on the client and make sure that you can send the attachment to the server without error. On the server, follow the instructions in the article to extract the attachment. Once that's working, you can build up the WSDL to add the other information that you need to send/return.

Dan.
begin:vcard
fn:Dan Ciarniello
n:Ciarniello;Dan
org:CityXpress Corp
adr;dom:;;200 - 1727 West Broadway;Vancouver;BC;V6J 4W5
email;internet:[EMAIL PROTECTED]
title:Software Developer
tel;work:604-638-3800 ext. 322
x-mozilla-html:TRUE
url:http://www.cityxpress.com
version:2.1
end:vcard

Reply via email to