axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon McMahon" <>
Subject RE: [Axis 1.2.1] Adding Attachment
Date Wed, 28 Jun 2006 05:36:56 GMT
I need to do this too.
How does the server side get the attachment?

I use Axis 1.3 for both client & server.

Simon McMahon
Work: (07) 31311420
Mobile: (043) 2294180

>>> 06/27/06 11:21pm >>>
First of all thanks for your help.
I have done in this way and it works...but for doing this i must change
the java classes generated by wsdl2java...i'ld like to know if there is
a way to avoid this modifications.
Thanks to all,

---------- Initial Header -----------

>From      : "Qinjian Jian" 
To          : 
Cc          :
Date      : Tue, 27 Jun 2006 09:16:48 -0400
Subject : RE: [Axis 1.2.1] Adding Attachment

> Do something like this:
> String filePath="C:\\temp\\example.txt";
> DataHandler dh = new DataHandler(new FileDataSource(filePath));
>         AttachmentPart part = new
> org.apache.axis.attachments.AttachmentPart();
>         part.setDataHandler(dh);
>         call.addAttachmentPart(part);
> Hope this helps
> Thanks
> Tim Jian
> Momentum systems, Inc.
> -----Original Message-----
> From: Angelo Immediata [] 
> Sent: Tuesday, June 27, 2006 7:22 AM
> To: Axis Axis
> Subject: [Axis 1.2.1] Adding Attachment
> Hi all. I use Axis 1.2.1; i have generated some Web service clients
> using the wsdl2java tool. Well i need now to add some attachments to
> can i do? I have seen the Locator class and other classes
> i'm not able to understand how to set the attachments... i have seen
> that in the stub class usually there is this a similar code:
>     if (super.cachedEndpoint == null) {
>       throw new org.apache.axis.NoEndPointException();
>     }
>     org.apache.axis.client.Call _call = createCall();
>     _call.setOperation(_operations[0]);
>     _call.setEncodingStyle(null);
>     _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
> Boolean.FALSE);
>     _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
>                       Boolean.FALSE);
> );
>     _call.setOperationName(new javax.xml.namespace.QName(
>         "", "execute"));
>     setRequestHeaders(_call);
>     setAttachments(_call);
> but how can i specify the Attachment to the _call object? How can
> code undertand what files to add?
> Thanks to all.
> Angelo.
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
> NOTICE: This message (including any attachments) from Momentum
Systems, Inc. contains information that is PRIVILEGED and CONFIDENTIAL. 
If you are not an intended recipient, you are hereby notified that any
dissemination of this message is strictly prohibited.  If you have
received this message in error, please do not read, copy or forward this
message.  Please permanently delete all copies and any attachments and
notify the sender immediately by reply email or by calling our Office at
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 

To unsubscribe, e-mail: 
For additional commands, e-mail: 

This email, including any attachments sent with it, is
confidential and for the sole use of the intended recipient(s).
This confidentiality is not waived or lost, if you receive it and
you are not the intended recipient(s), or if it is transmitted/
received in error.

Any unauthorised use, alteration, disclosure, distribution or
review of this email is strictly prohibited.  The information
contained in this email, including any attachment sent with
it, may be subject to a statutory duty of confidentiality if it
relates to health service matters.

If you are not the intended recipient(s), or if you have
received this email in error, you are asked to immediately
notify the sender by telephone collect on Australia
+61 1800 198 175 or by return email.  You should also
delete this email, and any copies, from your computer
system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy,
distribute or take any action(s) that relies on it; any form of
disclosure, modification, distribution and/or publication of this
email is also prohibited.

Although Queensland Health takes all reasonable steps to
ensure this email does not contain malicious software,
Queensland Health does not accept responsibility for the
consequences if any person's computer inadvertently suffers
any disruption to services, loss of information, harm or is
infected with a virus, other malicious computer programme or
code that may occur as a consequence of receiving this

Unless stated otherwise, this email represents only the views
of the sender and not the views of the Queensland Government.

View raw message