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("[EMAIL PROTECTED]".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: <[EMAIL PROTECTED]>

<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:
[EMAIL PROTECTED]


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("[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>".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.


Reply via email to