[prev in list] [next in list] [prev in thread] [next in thread]
List: openejb-development
Subject: Re: WS and MTOM
From: Dain Sundstrom <dain () iq80 ! com>
Date: 2008-09-12 22:34:30
Message-ID: 44F83D7C-6169-4FF4-A7AF-0FB675DB16E4 () iq80 ! com
[Download RAW message or body]
Here is the code I added to WsDeployer.
if
(SOAPBinding
.SOAP12HTTP_MTOM_BINDING.equals(portComponent.getProtocolBinding()) ||
SOAPBinding
.SOAP11HTTP_MTOM_BINDING.equals(portComponent.getProtocolBinding())) {
portComponent.setEnableMtom(true);
}
If you can, please give it a try and let me know if it works for you.
-dain
On Sep 12, 2008, at 1:14 PM, Dain Sundstrom wrote:
> I was really wondering if we could write a JUnit test to assure this
> issue doesn't regress sometime in the future.
>
> Regardless, I'll make the change you suggested later today.
>
> -dain
>
> On Sep 11, 2008, at 11:47 PM, Jean-Louis MONTEIRO wrote:
>
>>
>> Hi Dain,
>>
>> I activated logs and here is what I get when calling a method
>> having this
>> declaration :
>>
>> public DataHandler getFakeHandler() {
>> DataSource source = new
>> ByteArrayDataSource("tsztelak@gmail.com".getBytes(), "text/plain;
>> charset=UTF-8");
>> return new DataHandler(source);
>> }
>>
>> 1°) With the old openejb-cxf.jar:
>>
>> Encoding: UTF-8
>> Headers: {Date=[Thu, 11 Sep 2008 16:47:32 GMT], SOAPAction=[""],
>> transfer-encoding=[chunked], Server=[Apache-Coyote/1.1],
>> content-type=[text/xml;charset=UTF-8]}
>> Messages:
>> Message:
>>
>> Payload: <soap:Envelope
>> xmlns:soap="http://schemas.xmlsoap.org/soap/
>> envelope/"><soap:Body><ns1:getFakeHandlerResponse
>> xmlns:ns1="http://
>> cdlibrary.training/"><return>dHN6dGVsYWtAZ21haWwuY29t</return></
>> ns1:getFakeHandlerResponse></soap:Body></soap:Envelope>
>> --------------------------------------
>>
>>
>> 2°) With my modification:
>>
>> ------=_Part_0_4958072.1221150512336
>> Content-Type: application/xop+xml; charset=UTF-8;
>> type="application/soap+xml; charset=UTF-8"
>> Content-Transfer-Encoding: binary
>> Content-ID: <root.message@cxf.apache.org>
>>
>> <soap:Envelope
>> xmlns:soap="http://www.w3.org/2003/05/soap-
>> envelope"><soap:Body><ns1:getFakeHandlerResponse
>> xmlns:ns1="http://cdlibrary.training/"><return><xop:Include
>> xmlns:xop="http://www.w3.org/2004/08/xop/include"
>> href="cid:c8f4425a-1518-4c82-a0e5-e550f98b22d0@http%3A%2F%2Fcxf.apache.org%2F
>> "/></return></ns1:getFakeHandlerResponse></soap:Body></soap:Envelope>
>> ------=_Part_0_4958072.1221150512336
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: binary
>> Content-ID:
>> c8f4425a-1518-4c82-a0e5-e550f98b22d0@http%3A%2F%2Fcxf.apache.org%2F
>>
>>
>> As you can see, when MTOM is activated, the message is split up.
>>
>>
>> Regards,
>>
>>
>> Dain Sundstrom wrote:
>>>
>>> On Sep 9, 2008, at 1:00 PM, David Blevins wrote:
>>>
>>>> On Sep 8, 2008, at 6:36 AM, Monteiro Jean-Louis wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> With OpenEJB 3.0, it seems MTOM is never activated when I try a
>>>>> get
>>>>> an object from a web service.
>>>>>
>>>>> - I added the following line at the top of my web service
>>>>> implementation :
>>>>> @BindingType(value = SOAPBinding.SOAP12HTTP_MTOM_BINDING)
>>>>>
>>>>> - Here is my method:
>>>>> public DataHandler getFakeHandler() {
>>>>> DataSource source = new
>>>>> ByteArrayDataSource("tsztelak@gmail.com
>>>>> <mailto:tsztelak@gmail.com>".getBytes(), "text/plain;
>>>>> charset=UTF-8");
>>>>> return new DataHandler(source);
>>>>> }
>>>>>
>>>>> - In debug mode, in org.apache.openejb.server.cxf.CxfEndPoint:
>>>>> if (getBinding() instanceof SOAPBinding) {
>>>>> ((SOAPBinding)
>>>>> getBinding()).setMTOMEnabled(port.isMtomEnabled());
>>>>>
>>>>> port.isMtomEnabled is always false.
>>>>>
>>>>>
>>>>> I think a slight modification is needed inside
>>>>> org.apache.openejb.config.WsDeployer. Something like:
>>>>>
>>>>> //set mtom
>>>>> portComponent.setEnableMtom(JaxWsUtils.isMtomBinding(ejbClass));
>>>>>
>>>>> Has anybody had this problem ?
>>>>>
>>>>> If so, I can provide a fix, I already have something working.
>>>>
>>>> Not entirely my area of expertise, but it seems reasonable to me.
>>>
>>> That seems correct to me. Is there a way to write a test that
>>> MTOM is
>>> actually being used?
>>>
>>> -dain
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/WS-and-MTOM-tp19372229p19450449.html
>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic