axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Ciarniello <>
Subject Re: having problems with SOAP attachments
Date Fri, 22 Oct 2004 17:24:14 GMT
Jason Boehle wrote:

>>You might want to take a look at
>>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.
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.


View raw message