axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wörner Till <Till.Woer...@t-systems.com>
Subject AW: Attachment contents access
Date Mon, 08 Apr 2002 15:29:09 GMT
Thanks for your reply, but perhaps I did not describe my problem clear enough...

I think what you send is how to add an attachment to a message, but I want to read the contents
of an attachment and write it to a file, for example.

This is my example:
I get a message with an attachment which contains a bunge of byte values on the client. All
I want to do is is to read the bytes and put them somewhere else. I am searching for a method
like attachmentPart.getContent() or something like that, but I cannot find anything like that.
Perhaps I am just blind???

Greetings,
Till


> -----Ursprüngliche Nachricht-----
> Von: Ramon Turnes [mailto:ramon.turnes-perez@hermes.si]
> Gesendet: Montag, 8. April 2002 16:34
> An: 'axis-user@xml.apache.org'
> Betreff: RE: Attachment contents access
> 
> 
> 
> Use this:
> 
>         Message rsp =
> MessageContext.getCurrentContext().getResponseMessage();
> 
>         try{
>             org.apache.axis.attachments.Attachments attachments =
> rsp.getAttachments();
>             if(null == attachments)
>                 throw new RuntimeException("No support for 
> attachments");
> 
>             attachments.addAttachmentPart(ap);
>         }catch(org.apache.axis.AxisFault ex){
>             throw  new RuntimeException(ex.getMessage());
>         }
> 
> Regards.
> 
> Ramón.
> 
> > -----Original Message-----
> > From: Wörner Till [mailto:Till.Woerner@t-systems.com]
> > Sent: Monday, April 08, 2002 4:30 PM
> > To: Axis User List (E-Mail)
> > Subject: Attachment contents access
> > 
> > 
> > Hello!
> > 
> > Does anyone have an example of how to access the contents on 
> > an attachment if I have following line of code in my client:
> > 
> > -----
> > org.apache.axis.Message msg = 
> > call.getMessageContext().getResponseMessage();
> > -----
> > 
> > How to access the attachment content of message msg???
> > 
> > Thanks,
> > Till
> > 
> > 
> > -- 
> > T-Systems GEI GmbH
> > 
> > Hausanschrift: Eichhornstraße 3, D-10785 Berlin
> > Postanschrift: D-10875 Berlin
> > Telefon: +49 (30) 2554 3254
> > E-Mail: Till.Woerner@t-systems.com 
> > 
> 

Mime
View raw message