I am not sure if attachment can be added to generated classes. But it can be vary well added to the response. You can have a look into SOAP with Attachment (SWA) specifications or MTOM. Both of them are supported by AXIS2.
Sending a SOAP message with attachments to a web service and a web service that sends a SOAP repsonse with attachments are two different things.
In the first case, adding the attachement is relatively simple. In the second case, with Axis 1.4, adding the attachment to the web service SOAP response is not possible. There is no way to get to the generated SOAP message.
As per SWA spec attachment will not be part of SOAP message. SOAP message will just have reference of attachment. SOAP message will go as root part of mime type multipart/related while attachment will go in next part. There is another way though it will increase the size of attachment by 1.3 times. Have a base64binary type of element to carry attachment. And do encoding and decoding of your attachment.
As per SWA spec attachment will not be part of SOAP message. SOAP message will just have reference of attachment. SOAP message will go as root part of mime type multipart/related while attachment will go in next part.
Yes, this is correct. It does not have anything to do with what I just mentioned however.
However, the author in this article attempts to shows how to create a web service that can process incoming attachments from the client. As mentioned already a few times, this is not what this post is about.
The article does not demonstrate a web service sending outgoing attachments.
I know this thread is a little old but i am in the exact same situation as Jimmy.We are stuck with Axis 1.4 and we need a web service that has an invoice number (int) in request and the spits out a response with a pdf file as an attachment.
As others i have gone over tons of examples on the web with some built in axis 2 and others which send attachments as part of the request(like a resume upload service).If some one can point me the right direction or provide some code i can run to see how sending an attachment as part of the response works it will be really helpful.Thanks