You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christopher Moesel <Ch...@avid.com> on 2007/04/17 15:50:29 UTC

MTOM enabling a service

I am attempting to MTOM-enable my CXF service.

I am using the CXFServlet and Spring configuration.

I have added the following as a child of the <jaxws:endpoint> element in
the spring config file:

<jaxws:properties>
  <entry key="mtom_enabled" value="true"/>
</jaxws:properties>

Although my service seems to accept MTOM/XOP requests just fine, it
doesn't seem to be using MTOM for the reponses.  Is the spring
configuration above enough, or do I need to do something else?  Is there
a size threshold that needs to be exceeded in order for the response to
use MTOM?

I looked in the samples, but the sample MTOM project does not use Spring
configuration.

Thanks,
Chris

RE: MTOM enabling a service

Posted by Christopher Moesel <Ch...@avid.com>.
Ah-- thanks for the tip.  I got that configuration from the WIKI:

http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html

I'll go ahead and edit the page to reflect "-" instead of "_" and leave
the rest (value as a String) since it will be fixed.

-Chris

-----Original Message-----
From: Dan Diephouse [mailto:dan@envoisolutions.com] 
Sent: Tuesday, April 17, 2007 1:30 PM
To: cxf-user@incubator.apache.org
Subject: Re: MTOM enabling a service

I think I see where the issue might be - we're assuming that the
mtom-enabled property is a Boolean, not a String. As a temporary
workaround
you can try this:

<jaxws:properties>
  <entry key="mtom-enabled">
    <bean class="java.lang.Boolean
"><constructor-arg><value>true</value></constructor-arg></bean>
  </entry>
</jaxws:properties>

I'll fix this in SVN as well! (BTW its a "-" not a "_" in the
mtom-enabled
property)

- Dan

On 4/17/07, Christopher Moesel <Ch...@avid.com> wrote:
>
> I am attempting to MTOM-enable my CXF service.
>
> I am using the CXFServlet and Spring configuration.
>
> I have added the following as a child of the <jaxws:endpoint> element
in
> the spring config file:
>
> <jaxws:properties>
>   <entry key="mtom_enabled" value="true"/>
> </jaxws:properties>
>
> Although my service seems to accept MTOM/XOP requests just fine, it
> doesn't seem to be using MTOM for the reponses.  Is the spring
> configuration above enough, or do I need to do something else?  Is
there
> a size threshold that needs to be exceeded in order for the response
to
> use MTOM?
>
> I looked in the samples, but the sample MTOM project does not use
Spring
> configuration.
>
> Thanks,
> Chris
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: MTOM enabling a service

Posted by Dan Diephouse <da...@envoisolutions.com>.
I think I see where the issue might be - we're assuming that the
mtom-enabled property is a Boolean, not a String. As a temporary workaround
you can try this:

<jaxws:properties>
  <entry key="mtom-enabled">
    <bean class="java.lang.Boolean
"><constructor-arg><value>true</value></constructor-arg></bean>
  </entry>
</jaxws:properties>

I'll fix this in SVN as well! (BTW its a "-" not a "_" in the mtom-enabled
property)

- Dan

On 4/17/07, Christopher Moesel <Ch...@avid.com> wrote:
>
> I am attempting to MTOM-enable my CXF service.
>
> I am using the CXFServlet and Spring configuration.
>
> I have added the following as a child of the <jaxws:endpoint> element in
> the spring config file:
>
> <jaxws:properties>
>   <entry key="mtom_enabled" value="true"/>
> </jaxws:properties>
>
> Although my service seems to accept MTOM/XOP requests just fine, it
> doesn't seem to be using MTOM for the reponses.  Is the spring
> configuration above enough, or do I need to do something else?  Is there
> a size threshold that needs to be exceeded in order for the response to
> use MTOM?
>
> I looked in the samples, but the sample MTOM project does not use Spring
> configuration.
>
> Thanks,
> Chris
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog