}
public void invoke(MessageContext msgContext) throws AxisFault {
try {
OMOutputFormat format = new OMOutputFormat();
String charSetEnc =
(String) msgContext
.getProperty(MessageContext.CHARACTER_SET_ENCODING);
if (charSetEnc != null) {
format.setCharSetEncoding(charSetEnc);
} else {
OperationContext opctx = msgContext.getOperationContext();
if (opctx != null) {
charSetEnc = (String) opctx
.getProperty(MessageContext.CHARACTER_SET_ENCODING);
}
}
/**
* If the char set enc is still not found use the default
*/
if (charSetEnc == null) {
charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
}
msgContext.setDoingMTOM(HTTPTransportUtils.doWriteMTOM(msgContext));
msgContext.setDoingREST(HTTPTransportUtils.isDoingREST(msgContext));
format.setSOAP11(msgContext.isSOAP11());
format.setDoOptimize(msgContext.isDoingMTOM());
format.setCharSetEncoding(charSetEnc);
// Trasnport URL can be different from the WSA-To. So processing
// that now.
EndpointReference epr = null;
String transportURL =