You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2005/11/07 10:12:36 UTC
svn commit: r331245 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
Constants.java context/MessageContextConstants.java
transport/http/HTTPTransportUtils.java
Author: chinthaka
Date: Mon Nov 7 01:12:27 2005
New Revision: 331245
URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
Log:
Fixing MTOM so that now we can force the message to be sent as multipart related.
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Mon Nov 7 01:12:27 2005
@@ -195,6 +195,9 @@
public static final String ATTACHMENT_TEMP_DIR = "attachmentDIR";
public static final String CACHE_ATTACHMENTS = "cacheAttachments";
public static final String FILE_SIZE_THRESHOLD = "sizeThreshold";
+
+ // we need to some times send the message as multipart/related, even if there is no MTOM stuff in the envelope.
+ public static final String FORCE_MIME = "ForceMimeBoundary";
}
public static final String VALUE_TRUE = "true";
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java Mon Nov 7 01:12:27 2005
@@ -21,5 +21,6 @@
public interface MessageContextConstants {
// this will contain the keys of all the properties that will be in the message context
+
public static final String TRANSPORT_URL = "TransportURL";
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Mon Nov 7 01:12:27 2005
@@ -452,12 +452,13 @@
msgContext.getProperty(
Constants.Configuration.ENABLE_MTOM));
}
- boolean envelopeContainsOptimise =
- HTTPTransportUtils.checkEnvelopeForOptimise(
+
+ boolean forceMIME = Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
+ if(forceMIME) return true;
+
+ boolean envelopeContainsOptimise = HTTPTransportUtils.checkEnvelopeForOptimise(
msgContext.getEnvelope());
- boolean doMTOM = enableMTOM && envelopeContainsOptimise;
- msgContext.setDoingMTOM(doMTOM);
- return doMTOM;
+ return enableMTOM && envelopeContainsOptimise;
}
public static boolean isDoingREST(MessageContext msgContext) {
Re: svn commit: r331245 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
Constants.java context/MessageContextConstants.java
transport/http/HTTPTransportUtils.java
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Mon, 2005-11-07 at 23:07 +0600, Thilina Gunarathne wrote:
> I'm 0- on this change....
> Are we going to introduce inefficiencies cause Indigo has them. Anyway
> it's better we put it as a option. But do we really need to do this...
It is an option .. basically what Indigo is doing apparently is using a
policy assertion to require that the MTOM packaging be used. So if
that's there, the client MUST send MTOMized stuff or its not accepted.
In order to be able to do it, we need to be allow the stub to request
this feature .. hence the property.
It will NOT be turned out unless needed for a scenario like this. I
agree with you the whole thing is crappy; the policy assertion should
say "MTOM is supported" not "MTOM is required" but until that's changed
the policy is what it is. In any case, this does not introduce any
inefficiency.
Sanjiva.
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Thilina Gunarathne <cs...@gmail.com>.
cool... +1
We'll have it as MTOM is required... :D
Dims,
I read your blog entry and know what you are talking about ;-).
Thanks,
~Thilina
On 11/8/05, Davanum Srinivas <da...@gmail.com> wrote:
>
> thilina,
>
> i was kidding :)
>
> -- dims
>
> On 11/7/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> > I'm 0- on this change....
> > Are we going to introduce inefficiencies cause Indigo has them. Anyway
> it's
> > better we put it as a option. But do we really need to do this...
> >
> > ~Thilina
> >
> >
> >
> > On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > Can we use "OptimizedMimeSerialization" as the parameter name :)
> > >
> > > -- dims
> > >
> > > On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > > > Author: chinthaka
> > > > Date: Mon Nov 7 01:12:27 2005
> > > > New Revision: 331245
> > > >
> > > > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > > > Log:
> > > > Fixing MTOM so that now we can force the message to be sent as
> multipart
> > related.
> > > >
> > > > Modified:
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -195,6 +195,9 @@
> > > > public static final String ATTACHMENT_TEMP_DIR =
> > "attachmentDIR";
> > > > public static final String CACHE_ATTACHMENTS =
> > "cacheAttachments";
> > > > public static final String FILE_SIZE_THRESHOLD =
> > "sizeThreshold";
> > > > +
> > > > + // we need to some times send the message as multipart/related,
> > even if there is no MTOM stuff in the envelope.
> > > > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > > > }
> > > >
> > > > public static final String VALUE_TRUE = "true";
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -21,5 +21,6 @@
> > > > public interface MessageContextConstants {
> > > >
> > > > // this will contain the keys of all the properties that will be in
> > the message context
> > > >
> > > >
> > > >
> > > > +
> > > >
> > > > public static final String TRANSPORT_URL = "TransportURL";
> > > >
> > > > }
> > > >
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -452,12 +452,13 @@
> > > > msgContext.getProperty(
> > > >
> > Constants.Configuration.ENABLE_MTOM));
> > > > }
> > > > - boolean envelopeContainsOptimise =
> > > > -
> > HTTPTransportUtils.checkEnvelopeForOptimise(
> > > > +
> > > > + boolean forceMIME =
> > Constants.VALUE_TRUE.equals(msgContext.getProperty(
> Constants.Configuration.FORCE_MIME));
> > > > + if(forceMIME) return true;
> > > > +
> > > > + boolean envelopeContainsOptimise =
> > HTTPTransportUtils.checkEnvelopeForOptimise(
> > > > msgContext.getEnvelope());
> > > > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > > > - msgContext.setDoingMTOM(doMTOM);
> > > > - return doMTOM;
> > > > + return enableMTOM && envelopeContainsOptimise;
> > > > }
> > > >
> > > > public static boolean isDoingREST(MessageContext msgContext) {
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas : http://wso2.com/blogs/
> > >
> >
> >
> >
> > --
> > "May the SourcE be with u"
> > http://webservices.apache.org/~thilina/
> > http://thilinag.blogspot.com/
> > http://www.bloglines.com/blog/Thilina
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Thilina Gunarathne <cs...@gmail.com>.
cool... +1
We'll have it as MTOM is required... :D
Dims,
I read your blog entry and know what you are talking about ;-).
Thanks,
~Thilina
On 11/8/05, Davanum Srinivas <da...@gmail.com> wrote:
>
> thilina,
>
> i was kidding :)
>
> -- dims
>
> On 11/7/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> > I'm 0- on this change....
> > Are we going to introduce inefficiencies cause Indigo has them. Anyway
> it's
> > better we put it as a option. But do we really need to do this...
> >
> > ~Thilina
> >
> >
> >
> > On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > Can we use "OptimizedMimeSerialization" as the parameter name :)
> > >
> > > -- dims
> > >
> > > On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > > > Author: chinthaka
> > > > Date: Mon Nov 7 01:12:27 2005
> > > > New Revision: 331245
> > > >
> > > > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > > > Log:
> > > > Fixing MTOM so that now we can force the message to be sent as
> multipart
> > related.
> > > >
> > > > Modified:
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > >
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -195,6 +195,9 @@
> > > > public static final String ATTACHMENT_TEMP_DIR =
> > "attachmentDIR";
> > > > public static final String CACHE_ATTACHMENTS =
> > "cacheAttachments";
> > > > public static final String FILE_SIZE_THRESHOLD =
> > "sizeThreshold";
> > > > +
> > > > + // we need to some times send the message as multipart/related,
> > even if there is no MTOM stuff in the envelope.
> > > > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > > > }
> > > >
> > > > public static final String VALUE_TRUE = "true";
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -21,5 +21,6 @@
> > > > public interface MessageContextConstants {
> > > >
> > > > // this will contain the keys of all the properties that will be in
> > the message context
> > > >
> > > >
> > > >
> > > > +
> > > >
> > > > public static final String TRANSPORT_URL = "TransportURL";
> > > >
> > > > }
> > > >
> > > >
> > > > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > > URL:
> >
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> > > >
> >
> ==============================================================================
> > > > ---
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > (original)
> > > > +++
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > Mon Nov 7 01:12:27 2005
> > > > @@ -452,12 +452,13 @@
> > > > msgContext.getProperty(
> > > >
> > Constants.Configuration.ENABLE_MTOM));
> > > > }
> > > > - boolean envelopeContainsOptimise =
> > > > -
> > HTTPTransportUtils.checkEnvelopeForOptimise(
> > > > +
> > > > + boolean forceMIME =
> > Constants.VALUE_TRUE.equals(msgContext.getProperty(
> Constants.Configuration.FORCE_MIME));
> > > > + if(forceMIME) return true;
> > > > +
> > > > + boolean envelopeContainsOptimise =
> > HTTPTransportUtils.checkEnvelopeForOptimise(
> > > > msgContext.getEnvelope());
> > > > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > > > - msgContext.setDoingMTOM(doMTOM);
> > > > - return doMTOM;
> > > > + return enableMTOM && envelopeContainsOptimise;
> > > > }
> > > >
> > > > public static boolean isDoingREST(MessageContext msgContext) {
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas : http://wso2.com/blogs/
> > >
> >
> >
> >
> > --
> > "May the SourcE be with u"
> > http://webservices.apache.org/~thilina/
> > http://thilinag.blogspot.com/
> > http://www.bloglines.com/blog/Thilina
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Davanum Srinivas <da...@gmail.com>.
thilina,
i was kidding :)
-- dims
On 11/7/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> I'm 0- on this change....
> Are we going to introduce inefficiencies cause Indigo has them. Anyway it's
> better we put it as a option. But do we really need to do this...
>
> ~Thilina
>
>
>
> On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
> > Can we use "OptimizedMimeSerialization" as the parameter name :)
> >
> > -- dims
> >
> > On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > > Author: chinthaka
> > > Date: Mon Nov 7 01:12:27 2005
> > > New Revision: 331245
> > >
> > > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > > Log:
> > > Fixing MTOM so that now we can force the message to be sent as multipart
> related.
> > >
> > > Modified:
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> Mon Nov 7 01:12:27 2005
> > > @@ -195,6 +195,9 @@
> > > public static final String ATTACHMENT_TEMP_DIR =
> "attachmentDIR";
> > > public static final String CACHE_ATTACHMENTS =
> "cacheAttachments";
> > > public static final String FILE_SIZE_THRESHOLD =
> "sizeThreshold";
> > > +
> > > + // we need to some times send the message as multipart/related,
> even if there is no MTOM stuff in the envelope.
> > > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > > }
> > >
> > > public static final String VALUE_TRUE = "true";
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> Mon Nov 7 01:12:27 2005
> > > @@ -21,5 +21,6 @@
> > > public interface MessageContextConstants {
> > >
> > > // this will contain the keys of all the properties that will be in
> the message context
> > >
> > >
> > >
> > > +
> > >
> > > public static final String TRANSPORT_URL = "TransportURL";
> > >
> > > }
> > >
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> Mon Nov 7 01:12:27 2005
> > > @@ -452,12 +452,13 @@
> > > msgContext.getProperty(
> > >
> Constants.Configuration.ENABLE_MTOM));
> > > }
> > > - boolean envelopeContainsOptimise =
> > > -
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > > +
> > > + boolean forceMIME =
> Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
> > > + if(forceMIME) return true;
> > > +
> > > + boolean envelopeContainsOptimise =
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > > msgContext.getEnvelope());
> > > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > > - msgContext.setDoingMTOM(doMTOM);
> > > - return doMTOM;
> > > + return enableMTOM && envelopeContainsOptimise;
> > > }
> > >
> > > public static boolean isDoingREST(MessageContext msgContext) {
> > >
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas : http://wso2.com/blogs/
> >
>
>
>
> --
> "May the SourcE be with u"
> http://webservices.apache.org/~thilina/
> http://thilinag.blogspot.com/
> http://www.bloglines.com/blog/Thilina
--
Davanum Srinivas : http://wso2.com/blogs/
Re: svn commit: r331245 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
Constants.java context/MessageContextConstants.java
transport/http/HTTPTransportUtils.java
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Mon, 2005-11-07 at 23:07 +0600, Thilina Gunarathne wrote:
> I'm 0- on this change....
> Are we going to introduce inefficiencies cause Indigo has them. Anyway
> it's better we put it as a option. But do we really need to do this...
It is an option .. basically what Indigo is doing apparently is using a
policy assertion to require that the MTOM packaging be used. So if
that's there, the client MUST send MTOMized stuff or its not accepted.
In order to be able to do it, we need to be allow the stub to request
this feature .. hence the property.
It will NOT be turned out unless needed for a scenario like this. I
agree with you the whole thing is crappy; the policy assertion should
say "MTOM is supported" not "MTOM is required" but until that's changed
the policy is what it is. In any case, this does not introduce any
inefficiency.
Sanjiva.
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Davanum Srinivas <da...@gmail.com>.
thilina,
i was kidding :)
-- dims
On 11/7/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> I'm 0- on this change....
> Are we going to introduce inefficiencies cause Indigo has them. Anyway it's
> better we put it as a option. But do we really need to do this...
>
> ~Thilina
>
>
>
> On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
> > Can we use "OptimizedMimeSerialization" as the parameter name :)
> >
> > -- dims
> >
> > On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > > Author: chinthaka
> > > Date: Mon Nov 7 01:12:27 2005
> > > New Revision: 331245
> > >
> > > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > > Log:
> > > Fixing MTOM so that now we can force the message to be sent as multipart
> related.
> > >
> > > Modified:
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> Mon Nov 7 01:12:27 2005
> > > @@ -195,6 +195,9 @@
> > > public static final String ATTACHMENT_TEMP_DIR =
> "attachmentDIR";
> > > public static final String CACHE_ATTACHMENTS =
> "cacheAttachments";
> > > public static final String FILE_SIZE_THRESHOLD =
> "sizeThreshold";
> > > +
> > > + // we need to some times send the message as multipart/related,
> even if there is no MTOM stuff in the envelope.
> > > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > > }
> > >
> > > public static final String VALUE_TRUE = "true";
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> Mon Nov 7 01:12:27 2005
> > > @@ -21,5 +21,6 @@
> > > public interface MessageContextConstants {
> > >
> > > // this will contain the keys of all the properties that will be in
> the message context
> > >
> > >
> > >
> > > +
> > >
> > > public static final String TRANSPORT_URL = "TransportURL";
> > >
> > > }
> > >
> > >
> > > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> > >
> ==============================================================================
> > > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> (original)
> > > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> Mon Nov 7 01:12:27 2005
> > > @@ -452,12 +452,13 @@
> > > msgContext.getProperty(
> > >
> Constants.Configuration.ENABLE_MTOM));
> > > }
> > > - boolean envelopeContainsOptimise =
> > > -
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > > +
> > > + boolean forceMIME =
> Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
> > > + if(forceMIME) return true;
> > > +
> > > + boolean envelopeContainsOptimise =
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > > msgContext.getEnvelope());
> > > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > > - msgContext.setDoingMTOM(doMTOM);
> > > - return doMTOM;
> > > + return enableMTOM && envelopeContainsOptimise;
> > > }
> > >
> > > public static boolean isDoingREST(MessageContext msgContext) {
> > >
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas : http://wso2.com/blogs/
> >
>
>
>
> --
> "May the SourcE be with u"
> http://webservices.apache.org/~thilina/
> http://thilinag.blogspot.com/
> http://www.bloglines.com/blog/Thilina
--
Davanum Srinivas : http://wso2.com/blogs/
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Thilina Gunarathne <cs...@gmail.com>.
I'm 0- on this change....
Are we going to introduce inefficiencies cause Indigo has them. Anyway it's
better we put it as a option. But do we really need to do this...
~Thilina
On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
>
> Can we use "OptimizedMimeSerialization" as the parameter name :)
>
> -- dims
>
> On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > Author: chinthaka
> > Date: Mon Nov 7 01:12:27 2005
> > New Revision: 331245
> >
> > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > Log:
> > Fixing MTOM so that now we can force the message to be sent as multipart
> related.
> >
> > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> Mon Nov 7 01:12:27 2005
> > @@ -195,6 +195,9 @@
> > public static final String ATTACHMENT_TEMP_DIR = "attachmentDIR";
> > public static final String CACHE_ATTACHMENTS = "cacheAttachments";
> > public static final String FILE_SIZE_THRESHOLD = "sizeThreshold";
> > +
> > + // we need to some times send the message as multipart/related, even
> if there is no MTOM stuff in the envelope.
> > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > }
> >
> > public static final String VALUE_TRUE = "true";
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> Mon Nov 7 01:12:27 2005
> > @@ -21,5 +21,6 @@
> > public interface MessageContextConstants {
> >
> > // this will contain the keys of all the properties that will be in the
> message context
> >
> >
> >
> > +
> >
> > public static final String TRANSPORT_URL = "TransportURL";
> >
> > }
> >
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> Mon Nov 7 01:12:27 2005
> > @@ -452,12 +452,13 @@
> > msgContext.getProperty(
> > Constants.Configuration.ENABLE_MTOM));
> > }
> > - boolean envelopeContainsOptimise =
> > - HTTPTransportUtils.checkEnvelopeForOptimise(
> > +
> > + boolean forceMIME = Constants.VALUE_TRUE.equals(msgContext.getProperty
> (Constants.Configuration.FORCE_MIME));
> > + if(forceMIME) return true;
> > +
> > + boolean envelopeContainsOptimise =
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > msgContext.getEnvelope());
> > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > - msgContext.setDoingMTOM(doMTOM);
> > - return doMTOM;
> > + return enableMTOM && envelopeContainsOptimise;
> > }
> >
> > public static boolean isDoingREST(MessageContext msgContext) {
> >
> >
> >
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Thilina Gunarathne <cs...@gmail.com>.
I'm 0- on this change....
Are we going to introduce inefficiencies cause Indigo has them. Anyway it's
better we put it as a option. But do we really need to do this...
~Thilina
On 11/7/05, Davanum Srinivas <da...@gmail.com> wrote:
>
> Can we use "OptimizedMimeSerialization" as the parameter name :)
>
> -- dims
>
> On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> > Author: chinthaka
> > Date: Mon Nov 7 01:12:27 2005
> > New Revision: 331245
> >
> > URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> > Log:
> > Fixing MTOM so that now we can force the message to be sent as multipart
> related.
> >
> > Modified:
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> >
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> Mon Nov 7 01:12:27 2005
> > @@ -195,6 +195,9 @@
> > public static final String ATTACHMENT_TEMP_DIR = "attachmentDIR";
> > public static final String CACHE_ATTACHMENTS = "cacheAttachments";
> > public static final String FILE_SIZE_THRESHOLD = "sizeThreshold";
> > +
> > + // we need to some times send the message as multipart/related, even
> if there is no MTOM stuff in the envelope.
> > + public static final String FORCE_MIME = "ForceMimeBoundary";
> > }
> >
> > public static final String VALUE_TRUE = "true";
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> Mon Nov 7 01:12:27 2005
> > @@ -21,5 +21,6 @@
> > public interface MessageContextConstants {
> >
> > // this will contain the keys of all the properties that will be in the
> message context
> >
> >
> >
> > +
> >
> > public static final String TRANSPORT_URL = "TransportURL";
> >
> > }
> >
> >
> > Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> > URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> >
> ==============================================================================
> > ---
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> (original)
> > +++
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> Mon Nov 7 01:12:27 2005
> > @@ -452,12 +452,13 @@
> > msgContext.getProperty(
> > Constants.Configuration.ENABLE_MTOM));
> > }
> > - boolean envelopeContainsOptimise =
> > - HTTPTransportUtils.checkEnvelopeForOptimise(
> > +
> > + boolean forceMIME = Constants.VALUE_TRUE.equals(msgContext.getProperty
> (Constants.Configuration.FORCE_MIME));
> > + if(forceMIME) return true;
> > +
> > + boolean envelopeContainsOptimise =
> HTTPTransportUtils.checkEnvelopeForOptimise(
> > msgContext.getEnvelope());
> > - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> > - msgContext.setDoingMTOM(doMTOM);
> > - return doMTOM;
> > + return enableMTOM && envelopeContainsOptimise;
> > }
> >
> > public static boolean isDoingREST(MessageContext msgContext) {
> >
> >
> >
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Davanum Srinivas <da...@gmail.com>.
Can we use "OptimizedMimeSerialization" as the parameter name :)
-- dims
On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> Author: chinthaka
> Date: Mon Nov 7 01:12:27 2005
> New Revision: 331245
>
> URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> Log:
> Fixing MTOM so that now we can force the message to be sent as multipart related.
>
> Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Mon Nov 7 01:12:27 2005
> @@ -195,6 +195,9 @@
> public static final String ATTACHMENT_TEMP_DIR = "attachmentDIR";
> public static final String CACHE_ATTACHMENTS = "cacheAttachments";
> public static final String FILE_SIZE_THRESHOLD = "sizeThreshold";
> +
> + // we need to some times send the message as multipart/related, even if there is no MTOM stuff in the envelope.
> + public static final String FORCE_MIME = "ForceMimeBoundary";
> }
>
> public static final String VALUE_TRUE = "true";
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java Mon Nov 7 01:12:27 2005
> @@ -21,5 +21,6 @@
> public interface MessageContextConstants {
>
> // this will contain the keys of all the properties that will be in the message context
>
>
>
> +
>
> public static final String TRANSPORT_URL = "TransportURL";
>
> }
>
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Mon Nov 7 01:12:27 2005
> @@ -452,12 +452,13 @@
> msgContext.getProperty(
> Constants.Configuration.ENABLE_MTOM));
> }
> - boolean envelopeContainsOptimise =
> - HTTPTransportUtils.checkEnvelopeForOptimise(
> +
> + boolean forceMIME = Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
> + if(forceMIME) return true;
> +
> + boolean envelopeContainsOptimise = HTTPTransportUtils.checkEnvelopeForOptimise(
> msgContext.getEnvelope());
> - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> - msgContext.setDoingMTOM(doMTOM);
> - return doMTOM;
> + return enableMTOM && envelopeContainsOptimise;
> }
>
> public static boolean isDoingREST(MessageContext msgContext) {
>
>
>
--
Davanum Srinivas : http://wso2.com/blogs/
Re: svn commit: r331245 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: Constants.java context/MessageContextConstants.java transport/http/HTTPTransportUtils.java
Posted by Davanum Srinivas <da...@gmail.com>.
Can we use "OptimizedMimeSerialization" as the parameter name :)
-- dims
On 11/7/05, chinthaka@apache.org <ch...@apache.org> wrote:
> Author: chinthaka
> Date: Mon Nov 7 01:12:27 2005
> New Revision: 331245
>
> URL: http://svn.apache.org/viewcvs?rev=331245&view=rev
> Log:
> Fixing MTOM so that now we can force the message to be sent as multipart related.
>
> Modified:
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Mon Nov 7 01:12:27 2005
> @@ -195,6 +195,9 @@
> public static final String ATTACHMENT_TEMP_DIR = "attachmentDIR";
> public static final String CACHE_ATTACHMENTS = "cacheAttachments";
> public static final String FILE_SIZE_THRESHOLD = "sizeThreshold";
> +
> + // we need to some times send the message as multipart/related, even if there is no MTOM stuff in the envelope.
> + public static final String FORCE_MIME = "ForceMimeBoundary";
> }
>
> public static final String VALUE_TRUE = "true";
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java Mon Nov 7 01:12:27 2005
> @@ -21,5 +21,6 @@
> public interface MessageContextConstants {
>
> // this will contain the keys of all the properties that will be in the message context
>
>
>
> +
>
> public static final String TRANSPORT_URL = "TransportURL";
>
> }
>
>
> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=331245&r1=331244&r2=331245&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
> +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Mon Nov 7 01:12:27 2005
> @@ -452,12 +452,13 @@
> msgContext.getProperty(
> Constants.Configuration.ENABLE_MTOM));
> }
> - boolean envelopeContainsOptimise =
> - HTTPTransportUtils.checkEnvelopeForOptimise(
> +
> + boolean forceMIME = Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
> + if(forceMIME) return true;
> +
> + boolean envelopeContainsOptimise = HTTPTransportUtils.checkEnvelopeForOptimise(
> msgContext.getEnvelope());
> - boolean doMTOM = enableMTOM && envelopeContainsOptimise;
> - msgContext.setDoingMTOM(doMTOM);
> - return doMTOM;
> + return enableMTOM && envelopeContainsOptimise;
> }
>
> public static boolean isDoingREST(MessageContext msgContext) {
>
>
>
--
Davanum Srinivas : http://wso2.com/blogs/