I took a look at LoggingInInterceptor.logInputStream and it seems that it does not support fastinfoset. But you can use the interceptor instead of the LoggingInInterceptor and LoggingOutInterceptor to extract the payload, decode it, and register the original message.
public class CustomInterceptor extends AbstractPhaseInterceptor<Message> { public CustomInterceptor () { super(Phase.RECEIVE); } public void handleMessage(Message message) {
Replace in XML file
<bean id="logInbound" class="test.CustomInterceptor" /> <bean id="logOutbound" class="test.CustomInterceptor" />
Finding an example of how to decode FastInfoset is not easy. Try this with the DOM and FastInfoset-1.2.12.jar. In this repo you have some examples using sTAX and SAX
public void decodeFI(InputStream in, OutputStream out) throws Exception{ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); DOMDocumentParser parser = new DOMDocumentParser(); parser.parse(doc, in);
source share