Hi,
Microsoft WSE3 requires that MTOM is to be used either not at all or for
every message involved in a request (the reasoning behind this can
questioned ...). So in order to work with WSE3 and MTOM, WSE3 expects
all input-, output- and possible error message as MTOM encoded message.
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:
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]