You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Thilina Gunarathne <cs...@gmail.com> on 2005/06/15 08:24:47 UTC

Attachments support

Hi,
We headed to some problems when we are trying to implement attchements 
support (MTOM & SwA) for Axis2. 
We are planing to use Java Mail as the Mime parser for this. 
1 .First problem we headed is that the Servelet extracts all the http 
headers inlcuding the content type and boudary headers. But to use Java mail 
to parse the mime message we need to have them untoughed in the stream
2. Is there any mechanism in the servlet that we can use to extract mime 
body parts.
 3. how we have done this (parsing the mime message) in Axis 1.X 
 A help or a pointer to a usefull resource from somebody (specially somebody 
who dealt with this for Axis 1.x) will be greatly appreciated. 
 Thanks & Regards,
 ~Thilina


"May the SourcE be with u"

Re: Attachments support

Posted by Davanum Srinivas <da...@gmail.com>.
Axis 1.x's implementation is very convoluted. I'd recommend you look
at Cocoon's multi-part parser first
(http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/java/org/apache/cocoon/servlet/multipart/)

thanks,
dims

On 6/16/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> Hi, 
> We are planing to use JavaMail as the mime parser. When we instantiated a
> MimeMessage class with a InputStream which contains a Mime Message it'll
> parse the mime message. This InputStream needs to have boundary mime header.
> But according to my knowledge Servlet extracts all the http headers (which
> includes mime headers) form the request. Because of that the InputStream we
> are getting from the servlet request does not contain the Boundary mime
> header, cause it has been extracted already. Because of that we can't expect
> the Java Mail to parse our mime message by giving the InputStream which
> didn't contain the mime headers. This is the problem. We would be very happy
> to know how this problem is tackled in Axis 1.x, 
>   
> Thanks & regards, 
> ~Thilina  
> 
>  
>  
> On 6/15/05, Davanum Srinivas <da...@gmail.com> wrote: 
> > Please explain #1. i did not understand...
> > 
> > thanks,
> > dims
> > 
> > On 6/15/05, Thilina Gunarathne < csethil@gmail.com> wrote:
> > > Hi,
> > > We headed to some problems when we are trying to implement attchements
> > > support  (MTOM & SwA) for Axis2.
> > > We are planing to use Java Mail as the Mime parser for this. 
> > > 1 .First problem we headed is that the Servelet extracts all the http
> > > headers inlcuding the content type and boudary headers. But to use Java
> mail
> > > to parse the mime message we need to have them untoughed in the stream 
> > > 2. Is there any mechanism in the servlet that we can use to extract mime
> > > body parts.
> > >
> > > 3. how we have done this (parsing the mime message) in Axis 1.X
> > >
> > > A help or a pointer to a usefull resource from somebody (specially
> somebody 
> > > who dealt with this for Axis 1.x) will be greatly appreciated.
> > >
> > > Thanks & Regards,
> > >
> > > ~Thilina
> > >
> > >
> > > "May the SourcE be with u"
> > 
> > 
> > --
> > Davanum Srinivas - http://blogs.cocoondev.org/dims/
> > 
> 
> 
> 
> -- 
> 
> 
> "May the SourcE be with u" 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/

Re: Attachments support

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi, 
We are planing to use JavaMail as the mime parser. When we instantiated a 
MimeMessage class with a InputStream which contains a Mime Message it'll 
parse the mime message. This InputStream needs to have boundary mime header. 
But according to my knowledge Servlet extracts all the http headers (which 
includes mime headers) form the request. Because of that the InputStream we 
are getting from the servlet request does not contain the Boundary mime 
header, cause it has been extracted already. Because of that we can't expect 
the Java Mail to parse our mime message by giving the InputStream which 
didn't contain the mime headers. This is the problem. We would be very happy 
to know how this problem is tackled in Axis 1.x,
 Thanks & regards,
~Thilina 

 On 6/15/05, Davanum Srinivas <da...@gmail.com> wrote: 
> 
> Please explain #1. i did not understand...
> 
> thanks,
> dims
> 
> On 6/15/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> > Hi,
> > We headed to some problems when we are trying to implement attchements
> > support (MTOM & SwA) for Axis2.
> > We are planing to use Java Mail as the Mime parser for this.
> > 1 .First problem we headed is that the Servelet extracts all the http
> > headers inlcuding the content type and boudary headers. But to use Java 
> mail
> > to parse the mime message we need to have them untoughed in the stream
> > 2. Is there any mechanism in the servlet that we can use to extract mime
> > body parts.
> >
> > 3. how we have done this (parsing the mime message) in Axis 1.X
> >
> > A help or a pointer to a usefull resource from somebody (specially 
> somebody
> > who dealt with this for Axis 1.x) will be greatly appreciated.
> >
> > Thanks & Regards,
> >
> > ~Thilina
> >
> >
> > "May the SourcE be with u"
> 
> 
> --
> Davanum Srinivas -http://blogs.cocoondev.org/dims/
> 



-- 

"May the SourcE be with u"

Re: Attachments support

Posted by Davanum Srinivas <da...@gmail.com>.
Please explain #1. i did not understand...

thanks,
dims

On 6/15/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> Hi, 
> We headed to some problems when we are trying to implement attchements
> support  (MTOM & SwA) for Axis2. 
> We are planing to use Java Mail as the Mime parser for this.   
> 1 .First problem we headed is that the Servelet extracts all the http
> headers inlcuding the content type and boudary headers. But to use Java mail
> to parse the mime message we need to have them untoughed in the stream 
> 2. Is there any mechanism in the servlet that we can use to extract mime
> body parts. 
>   
> 3. how we have done this (parsing the mime message) in Axis 1.X 
>   
> A help or a pointer to a usefull resource from somebody (specially somebody
> who dealt with this for Axis 1.x) will be greatly appreciated. 
>   
> Thanks & Regards, 
>   
> ~Thilina 
> 
> 
> "May the SourcE be with u" 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/