You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Yashwanth Rajaram -X (yrajaram - ZENSAR TECHNOLOGIES INC at Cisco)" <yr...@cisco.com> on 2012/12/11 21:32:46 UTC

MIMEBoundary after enabling MTOM for requests with or without attachments

Hi All:

I have this question on attachments in Axis2; I had asked this a while ago but didn't get any responses. We are stuck with this and so would greatly appreciate your thoughts/pointers/answers.

Until recently our Axis based service implementation was not supporting attachments. We now enabled attachments support by enabling MTOM/SwA in our service.xml. After this we see that whether our clients send attachments or not in the requests they always get the response along with a new MIME boundary header like the one below which seems to break their code that was build earlier when we were not supporting attachments:

> --MIME_boundary
> message data
> --MIME_boundary
> message data
> --MIME_boundary--

According to http://www.ws-i.org/profiles/attachmentsprofile-1.0-2004-08-24.html#Messages_with_No_Attachments if the requests do not have attachments then the response should not contain mime boundary. So how to support attachments so that if the requests do not have attachments then the responses won't have mime boundaries?

Sincerely,
Yashwanth
Technical Architect, EBIS


AW: MIMEBoundary after enabling MTOM for requests with or without attachments

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Yashwanth

 

I think there are samples in the axis binary distribution which you
should work through. 

I did the same for my MTOM based Web File Service.

 

The next resource which is always very helpful is.

do a svn checkout of the axis2 source code

install maven and 

build axis2 from scratch

observe the axis2 mtom/SwA testing

 

and be confident, there are so many Junit and surefire tests done
against the MTOM/SwA capability of axis2

 

 

maybe a final type:

Your observation is my similar observation too. 

Whenever I turned on MTOM/SwA support in the axis2.xml I got very
similar problems.

So I stopped configuring too much on a somewhat global basis at
axis2.xml or service.xml and started to configure more by using
appropriate calls from the code side, client or server.

 

And for that to understand it is always good working using debuggers and
dive sometimes deep into axis2-code; It's well commented and you learn
more than reading a lot manuals.

This in conjunction with the code samples provided is very instructive.

 

As I am not a mime specialist I hoped that someone from axis2-devs would
once address this issue too.

Hope this gets you a bit further.

 

Josef

 

Von: Yashwanth Rajaram -X (yrajaram - ZENSAR TECHNOLOGIES INC at Cisco)
[mailto:yrajaram@cisco.com] 
Gesendet: Dienstag, 11. Dezember 2012 21:33
An: java-dev@axis.apache.org; java-user@axis.apache.org
Betreff: MIMEBoundary after enabling MTOM for requests with or without
attachments

 

Hi All:

 

I have this question on attachments in Axis2; I had asked this a while
ago but didn't get any responses. We are stuck with this and so would
greatly appreciate your thoughts/pointers/answers.

 

Until recently our Axis based service implementation was not supporting
attachments. We now enabled attachments support by enabling MTOM/SwA in
our service.xml. After this we see that whether our clients send
attachments or not in the requests they always get the response along
with a new MIME boundary header like the one below which seems to break
their code that was build earlier when we were not supporting
attachments:

 

> --MIME_boundary

> message data

> --MIME_boundary

> message data

> --MIME_boundary--

 

According to
http://www.ws-i.org/profiles/attachmentsprofile-1.0-2004-08-24.html#Mess
ages_with_No_Attachments if the requests do not have attachments then
the response should not contain mime boundary. So how to support
attachments so that if the requests do not have attachments then the
responses won't have mime boundaries?

 

Sincerely,

Yashwanth

Technical Architect, EBIS