Hi.
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,
 Angelo.

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

>From      : "Qinjian Jian" [EMAIL PROTECTED]
To          : [email protected]
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 [mailto:[EMAIL PROTECTED]
> 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 by
> using the wsdl2java tool. Well i need now to add some attachments to the
> Call..how can i do? I have seen the Locator class and other classes but
> 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.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS
> );
>     _call.setOperationName(new javax.xml.namespace.QName(
>         "http://siporservice.sipor.it/";, "execute"));
>
>     setRequestHeaders(_call);
>     setAttachments(_call);
>
> but how can i specify the Attachment to the _call object? How can this
> code undertand what files to add?
>
> Thanks to all.
> Angelo.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> 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 703.740.9300.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to