cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: MTOM threshold and WSDL
Date Tue, 26 Aug 2008 12:36:35 GMT
Another possibility would be to use an MTOM policy expression [1], oth the older version used
by CXF tests, and use the scheme
extension mechanism to add an additional cxf-specific configuration :

For ex :

<wsdl:service>
<wsp:Policy>
<msoma:Mtom xmlns:wsoma="http://www.w3.org/2007/08/soap12-mtom-policy">
   <cxf:mtom threshhold="1000"/>
</msoma:Mtom>
</wsp:Policy>
</wsdl:service>

This policy expression can be located in the cxf spring configuration file, but in this case
this policy expression would need to be
attached to a published wsdl - something which we can't do in CXF yet.

The policy aware runtime would recognize this expression, thus there won't be a need to duplicate
the same config info on the client
side. If it's CXF then it will also ensure that MTOM is used only when a threshhold condition
is met

Cheers, Sergey

[1] http://www.w3.org/TR/soap12-mtom-policy/


----- Original Message ----- 
From: "Daniel Kulp" <dkulp@apache.org>
To: <dev@cxf.apache.org>
Cc: "Benson Margulies" <bimargulies@gmail.com>
Sent: Monday, August 25, 2008 9:42 PM
Subject: Re: MTOM threshold and WSDL


> On Monday 25 August 2008 12:42:43 pm Benson Margulies wrote:
>> This whole question turns out to be the following: Is it a valid
>> JAX-WS/JAX-B thing to annotate a plain old String bean property for
>> MTOM, and expect MTOM to happen? If so, then I need to determine if
>> the failure to do so is us or JAX-B, and if the latter we have to
>> decide if we care enough to contemplate some sort of workaround.
>
> Depends on the annotations.   I THINK you can stick a
> XmlMimeType("text/plain") and possibly need a
> XmlSchemaType(name="base64bindery") on it or something.   In that case I
> think it is supposed to work.    HOWEVER, I think you then run into the bug
> that you already logged with the JAXB folks of the text/plain being mapped to
> a String doesn't actually even work.
>
>
> Dan
>
>
>> On Mon, Aug 25, 2008 at 10:17 AM, Daniel Kulp <dkulp@apache.org> wrote:
>> > I don't think there is a way to set the threshold in the wsdl.  You can
>> > turn it on with a ws-policy fragment, but you cannot set the threshold
>> > that way.
>> >
>> > If it's jaxws, the easiest way to go about it would be to add a:
>> > @MTOM(enabled = true, threshold = 1000)
>> > annotation onto the interface/impl.
>> >
>> > You can enable mtom via configuration.   Just set mtom-enabled property
>> > on the bean.   systests/src/test/resources/mtomTestBeans.xml
>> > I don't think you can control the threshold that way.   To control that,
>> > you probably need to create a JAXBDataBinding object and set the
>> > mtomThreshold property on that and set that into the service.
>> >
>> >
>> > Dan
>> >
>> > On Sunday 24 August 2008 10:03:20 pm Benson Margulies wrote:
>> >> What does one put in a WSDL to mark a service as MTOM and to set the
>> >> threshold? Or, if there isn't any, how does one push a relevant
>> >> property onto a CXF client proxy?
>> >>
>> >> I'm trying to mop of CXF-1395, and I think that the problem is that
>> >> the client isn't bothering to use MTOM at all, presumably because
>> >> there isn't 4K of text.
>> >
>> > --
>> > Daniel Kulp
>> > dkulp@apache.org
>> > http://www.dankulp.com/blog
>
>
>
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Mime
View raw message