public void handleMessage(Message message) { if (message.getContent(XMLStreamReader.class) != null || !isHttpVerbSupported(message)) { return; } String ct = (String)message.get(Message.CONTENT_TYPE); if (ct != null && ct.indexOf("fastinfoset") != -1 && message.getContent(InputStream.class) != null && message.getContent(XMLStreamReader.class) == null) { message.setContent(XMLStreamReader.class, getParser(message.getContent(InputStream.class))); //add the StaxInEndingInterceptor which will close the reader message.getInterceptorChain().add(StaxInEndingInterceptor.INSTANCE); ct = ct.replace("fastinfoset", "xml"); if (ct.contains("application/xml")) { ct = ct.replace("application/xml", "text/xml"); } message.put(Message.CONTENT_TYPE, ct); message.getExchange().put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); if (isRequestor(message)) { //record the fact that is worked so future requests will //automatically be FI enabled Endpoint ep = message.getExchange().getEndpoint(); ep.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); } } }
public void handleMessage(Message message) { if (message.getContent(XMLStreamReader.class) != null || !isHttpVerbSupported(message)) { return; } String ct = (String)message.get(Message.CONTENT_TYPE); if (ct != null && ct.indexOf("fastinfoset") != -1 && message.getContent(InputStream.class) != null && message.getContent(XMLStreamReader.class) == null) { message.setContent(XMLStreamReader.class, getParser(message.getContent(InputStream.class))); //add the StaxInEndingInterceptor which will close the reader message.getInterceptorChain().add(StaxInEndingInterceptor.INSTANCE); ct = ct.replace("fastinfoset", "xml"); if (ct.contains("application/xml")) { ct = ct.replace("application/xml", "text/xml"); } message.put(Message.CONTENT_TYPE, ct); message.getExchange().put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); if (isRequestor(message)) { //record the fact that is worked so future requests will //automatically be FI enabled Endpoint ep = message.getExchange().getEndpoint(); ep.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); } } }
public void handleMessage(Message message) { if (message.getContent(XMLStreamReader.class) != null || !isHttpVerbSupported(message)) { return; } String ct = (String)message.get(Message.CONTENT_TYPE); if (ct != null && ct.indexOf("fastinfoset") != -1 && message.getContent(InputStream.class) != null && message.getContent(XMLStreamReader.class) == null) { message.setContent(XMLStreamReader.class, getParser(message.getContent(InputStream.class))); //add the StaxInEndingInterceptor which will close the reader message.getInterceptorChain().add(StaxInEndingInterceptor.INSTANCE); ct = ct.replace("fastinfoset", "xml"); if (ct.contains("application/xml")) { ct = ct.replace("application/xml", "text/xml"); } message.put(Message.CONTENT_TYPE, ct); message.getExchange().put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); if (isRequestor(message)) { //record the fact that is worked so future requests will //automatically be FI enabled Endpoint ep = message.getExchange().getEndpoint(); ep.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); } } }
public void handleMessage(Message message) { if (message.getContent(XMLStreamReader.class) != null || !isHttpVerbSupported(message)) { return; } String ct = (String)message.get(Message.CONTENT_TYPE); if (ct != null && ct.indexOf("fastinfoset") != -1 && message.getContent(InputStream.class) != null && message.getContent(XMLStreamReader.class) == null) { message.setContent(XMLStreamReader.class, getParser(message.getContent(InputStream.class))); //add the StaxInEndingInterceptor which will close the reader message.getInterceptorChain().add(StaxInEndingInterceptor.INSTANCE); ct = ct.replace("fastinfoset", "xml"); if (ct.contains("application/xml")) { ct = ct.replace("application/xml", "text/xml"); } message.put(Message.CONTENT_TYPE, ct); message.getExchange().put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); if (isRequestor(message)) { //record the fact that is worked so future requests will //automatically be FI enabled Endpoint ep = message.getExchange().getEndpoint(); ep.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE); } } }