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... What is the behaviour you get if you set the parameter to "true".. Does it send the faults using MTOM encoding.. 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] > > -- Thilina Gunarathne - http://thilinag.blogspot.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
