You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Monteiro Jean-Louis <je...@atosorigin.com> on 2008/09/08 15:36:54 UTC

WS and MTOM

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<ma...@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.


Kind regards,

________________________________

Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Re: WS and MTOM

Posted by David Blevins <da...@visi.com>.
Committed!  Thanks, Jean-Louis!

-David

On Feb 23, 2009, at 3:09 AM, Jean-Louis MONTEIRO wrote:

>
> Hi All,
>
> Can somebody make it committed ?
>
> Thanks in advance.
> JLouis
>
>
> Jean-Louis MONTEIRO wrote:
>>
>> Dain,
>>
>> a jira has been created: OPENEJB-972
>> The bug still exists for ejbModule.
>>
>> A patch is available if you need such ;-)
>>
>> Jean-Louis
>>
>>
>> Dain Sundstrom wrote:
>>>
>>> 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: <ro...@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
>>>>>>>> <ma...@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.
>>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/WS-and-MTOM-tp19372229p22159497.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
>


Re: WS and MTOM

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi All,

Can somebody make it committed ?

Thanks in advance.
JLouis


Jean-Louis MONTEIRO wrote:
> 
> Dain,
> 
> a jira has been created: OPENEJB-972
> The bug still exists for ejbModule.
> 
> A patch is available if you need such ;-)
> 
> Jean-Louis
> 
> 
> Dain Sundstrom wrote:
>> 
>> 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: <ro...@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
>>>>>>> <ma...@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.
>>>>
>>>
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WS-and-MTOM-tp19372229p22159497.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.


Re: WS and MTOM

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Dain,

a jira has been created: OPENEJB-972
The bug still exists for ejbModule.

A patch is available if you need such ;-)

Jean-Louis


Dain Sundstrom wrote:
> 
> 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: <ro...@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
>>>>>> <ma...@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.
>>>
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WS-and-MTOM-tp19372229p20958600.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.


Re: WS and MTOM

Posted by Dain Sundstrom <da...@iq80.com>.
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: <ro...@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
>>>>> <ma...@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.
>>
>


Re: WS and MTOM

Posted by Dain Sundstrom <da...@iq80.com>.
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: <ro...@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
>>>> <ma...@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.
>


Re: WS and MTOM

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
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: <ro...@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 
>>> <ma...@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.


Re: WS and MTOM

Posted by Dain Sundstrom <da...@iq80.com>.
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 
>> <ma...@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

Re: WS and MTOM

Posted by David Blevins <da...@visi.com>.
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 
> <ma...@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.

-David