final List<String> supportedMimeTypes = channelContext.getChannelSettings().getNegotiatedMimeTypes();
if (supportedMimeTypes != null) {
if (supportedMimeTypes.contains(MimeTypeConstants.FAST_INFOSET_STATEFUL_SOAP11) ||
supportedMimeTypes.contains(MimeTypeConstants.FAST_INFOSET_STATEFUL_SOAP12)) {
logger.log(Level.FINEST, "ChannelContext.configureCodec: FI Stateful");
StreamSOAPCodec streamSoapCodec = defaultCodec instanceof SOAPBindingCodec ?
((SOAPBindingCodec) defaultCodec).getXMLCodec() : null;
channelContext.setCodec(WSTCPFastInfosetStreamCodec.create(streamSoapCodec, soapVersion, channelContext, true));
return;
} else if (supportedMimeTypes.contains(MimeTypeConstants.FAST_INFOSET_SOAP11) ||
supportedMimeTypes.contains(MimeTypeConstants.FAST_INFOSET_SOAP12)) {
logger.log(Level.FINEST, "ChannelContext.configureCodec: FI Stateless");
StreamSOAPCodec streamSoapCodec = defaultCodec instanceof SOAPBindingCodec ?
((SOAPBindingCodec) defaultCodec).getXMLCodec() : null;
channelContext.setCodec(WSTCPFastInfosetStreamCodec.create(streamSoapCodec, soapVersion, channelContext, false));
return;
}
}