axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Woerner" <t...@twoerner.de>
Subject AW: Attachment contents access
Date Thu, 11 Apr 2002 13:56:19 GMT
I now use Xerces-J 2.0.1 (seems to be the latest)

Greetings,
Till

-- 
Caught in our narrowminded believe...
-------------------------------------
Till Woerner
Berlin, Germany
EMail:till@twoerner.de
ICQ#: 7162410

> -----Ursprüngliche Nachricht-----
> Von: Hozefa Botee [mailto:hoze@interlacesystems.com]
> Gesendet: Donnerstag, 11. April 2002 03:14
> An: till@twoerner.de
> Betreff: RE: Attachment contents access
> 
> 
> out of curiosity, which xerces are you now using?
> 
> H
> 
> > -----Original Message-----
> > From: Till Woerner [mailto:till@twoerner.de]
> > Sent: Wednesday, April 10, 2002 4:20 PM
> > To: axis-user@xml.apache.org
> > Subject: AW: Attachment contents access
> > 
> > 
> > Thank you!
> > 
> > I finally figured out the problem with my larger file. I first 
> > wondered why it worked on a machine with similar setup and I found 
> > out that I did not have the right version of xerces in the classpath

> > of the other system. It used the parser included in Java 1.4 (I 
> > think) and that led to the socket write error (this was not the most

> > helpful exception for me and did not give me any hint what was going

> > wrong :-( )
> > 
> > I do not know why it parsed the smaller file and part of the bigger 
> > before the service died, but the misssing xerces was definitely the 
> > source of problems...
> > 
> > Greetings,
> > Till
> > 
> > --
> > Caught in our narrowminded believe...
> > -------------------------------------
> > Till Woerner
> > Berlin, Germany
> > EMail:till@twoerner.de
> > ICQ#: 7162410
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Taras Shkvarchuk [mailto:tarass@grandcentral.com]
> > > Gesendet: Mittwoch, 10. April 2002 04:14
> > > An: 'axis-user@xml.apache.org'
> > > Betreff: RE: Attachment contents access
> > > 
> > > 
> > > I have not had any problems with even very large files, 50 meg
> > > attachments worked fine for me. Could you explain when exactly do 
> > > you get an error? What is the stacktrace? (if possible 
> both client
> > > and server side)
> > > 
> > > Just as a wild guess, there were a few problems with upload, and
> > > large message sizes in mod_jk for Apache. If you are having older 
> > > version of Apache handling your transport, you may want to get 
> > > latest mod_jk module.
> > > 
> > > -Taras
> > > 
> > > > -----Original Message-----
> > > > From: Till Woerner [mailto:till@twoerner.de]
> > > > Sent: Tuesday, April 09, 2002 5:30 PM
> > > > To: axis-user@xml.apache.org
> > > > Subject: AW: Attachment contents access
> > > > 
> > > > 
> > > > Thank!!! That worked!
> > > > 
> > > > But: Is there a size limit on attachments? On larger
> files I get a
> > > > SocketWrite exception on the server. The file I wanted to
> > attach is
> > > > about 300 KB... Smaller files work fine!
> > > > 
> > > > Greetings,
> > > > Till
> > > > 
> > > > --
> > > > Caught in our narrowminded believe...
> > > > -------------------------------------
> > > > Till Woerner
> > > > Berlin, Germany
> > > > EMail:till@twoerner.de
> > > > ICQ#: 7162410
> > > > 
> > > > > -----Ursprüngliche Nachricht-----
> > > > > Von: Taras Shkvarchuk [mailto:tarass@grandcentral.com]
> > > > > Gesendet: Montag, 8. April 2002 20:09
> > > > > An: 'axis-user@xml.apache.org'
> > > > > Betreff: RE: Attachment contents access
> > > > > 
> > > > > 
> > > > > Hope this helps,
> > > > > 
> > > > > 	Message res= mc.getResponseMessage();
> > > > > 	Attachments atts= res.getAttachments();
> > > > > 	System.out.println("\nAttchment count:"+
> > > > > atts.getAttachmentCount());
> > > > > 
> > > > > 	Part
> > atPart=atts.getAttachmentByReference("cid:large.dat"); //use
> > > > > cid: OR
> > > > > //	Part 
> > > atPart=atts.getAttachmentByReference("aLocationTag"); //use
> > > > > Content-Location
> > > > > 	DataHandler
> > > > > atData=AttachmentUtils.getActiviationDataHandler(atPart);
> > > > > 	InputStream in= atData.getInputStream();
> > > > > 	System.out.println("Available data in
> > Att:"+in.available());
> > > > > 	//use input stream as usual
> > > > > 
> > > > > -Taras
> > > > > 
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Wörner Till [mailto:Till.Woerner@t-systems.com]
> > > > > > Sent: Monday, April 08, 2002 8:29 AM
> > > > > > To: axis-user@xml.apache.org
> > > > > > Subject: AW: Attachment contents access
> > > > > > 
> > > > > > 
> > > > > > 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