Hi,

Thilina Gunarathne wrote:
Hi,

Thilina recently helped me out on how to enforce the output encoding to
be MTOM if input is also MTOM, using this kind of code:
This is little bit more easy with the 1.3 release.. You can change the
enableMTOM parameter as follows to get the behaviour you wanted..
<parameter name="enableMTOM">optional</parameter>
But unfortunately Axis2 1.3 release seems to have a problem with
interoperating MTOM with .net. That issue is fixed in the nightly
builds..

I'm not sure whether the above would work for faults though...

after checking several combination of settings and source code modifications I would say it does not work for faults. Setting enableMTOM to false or optional has no effect.

What is the behaviour you get if you set the parameter to "true"..
Does it send the faults using MTOM encoding..

If enableMTOM is set to true, it sends the AxisFault as MTOM mime multipart message. But then it does this always, even for clients and that do not send and are not able to process MTOM messages. Hence this is not a viable way for us.

Anyhow, the only drawback is that the true error message is not propagated to the end user. We can still log it internally, and after all, I think that WSE3 is not acting properly. I do not see much sense in sending and error message as MTOM.

All I said refers to Axis2-1.3. I did not check the nightly build.

Greetings,
-Rainer

thanks,
Thilina

            MessageContext        inMessageContextL    =
MessageContext.getCurrentMessageContext();
            OperationContext    operationContextL    =
inMessageContextL.getOperationContext();
            MessageContext        outMessageContextL    =
operationContextL.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            boolean                isInputMtomL        =
inMessageContextL.isDoingMTOM();

 outMessageContextL.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);
The problem I now encounter is that WSE3 also expects AxisFaults to be
dummy-encoded in MTOM. In ...MessageReceiverInOut.java I have tried to
use code similar to the above like

            MessageContext        inMessageContextL    =
MessageContext.getCurrentMessageContext();
            OperationContext    operationContextL    =
inMessageContextL.getOperationContext();
            MessageContext        outMessageContextL    =
operationContextL.getMessageContext(WSDLConstants.MESSAGE_LABEL_FAULT_VALUE);
            boolean                isInputMtomL        =
inMessageContextL.isDoingMTOM();

outMessageContextL.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);
which did not work. Neither did a

 msgContext.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);
in the catch-handler of invokeBusinessLogic() do it.  The AxisFault is
always formatted as XML/Text message.

I would appreciate if anybody could give me a hint on how to resolve
this final issue. Axis seems to be flexible enough to compensate the
peculiarities of other well-known vendor's software.

Thanks,
-Rainer



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to