protected boolean writeToOutputStream(Message m, BindingInfo info, Service s) { /** * Yes, all this code is EXTREMELY ugly. But it gives about a 60-70% performance * boost with the JAXB RI, so its worth it. */ if (s == null) { return false; } String enc = (String)m.get(Message.ENCODING); return "org.apache.cxf.binding.soap.model.SoapBindingInfo".equals(info.getClass().getName()) && "org.apache.cxf.jaxb.JAXBDataBinding".equals(s.getDataBinding().getClass().getName()) && !MessageUtils.isDOMPresent(m) && (enc == null || StandardCharsets.UTF_8.name().equals(enc)); }
protected boolean writeToOutputStream(Message m, BindingInfo info, Service s) { /** * Yes, all this code is EXTREMELY ugly. But it gives about a 60-70% performance * boost with the JAXB RI, so its worth it. */ if (s == null) { return false; } String enc = (String)m.get(Message.ENCODING); return "org.apache.cxf.binding.soap.model.SoapBindingInfo".equals(info.getClass().getName()) && "org.apache.cxf.jaxb.JAXBDataBinding".equals(s.getDataBinding().getClass().getName()) && !MessageUtils.isDOMPresent(m) && (enc == null || StandardCharsets.UTF_8.name().equals(enc)); }
protected boolean writeToOutputStream(Message m, BindingInfo info, Service s) { /** * Yes, all this code is EXTREMELY ugly. But it gives about a 60-70% performance * boost with the JAXB RI, so its worth it. */ if (s == null) { return false; } String enc = (String)m.get(Message.ENCODING); return info.getClass().getName().equals("org.apache.cxf.binding.soap.model.SoapBindingInfo") && s.getDataBinding().getClass().getName().equals("org.apache.cxf.jaxb.JAXBDataBinding") && !MessageUtils.isDOMPresent(m) && (enc == null || "UTF-8".equals(enc)); }
protected boolean writeToOutputStream(Message m, BindingInfo info, Service s) { /** * Yes, all this code is EXTREMELY ugly. But it gives about a 60-70% performance * boost with the JAXB RI, so its worth it. */ if (s == null) { return false; } String enc = (String)m.get(Message.ENCODING); return info.getClass().getName().equals("org.apache.cxf.binding.soap.model.SoapBindingInfo") && s.getDataBinding().getClass().getName().equals("org.apache.cxf.jaxb.JAXBDataBinding") && !MessageUtils.isDOMPresent(m) && (enc == null || "UTF-8".equals(enc)); }
public void handleMessage(SoapMessage message) { // Yes this is ugly, but it avoids us from having to implement any kind of caching strategy boolean wroteStart = PropertyUtils.isTrue(message.get(WROTE_ENVELOPE_START)); if (!wroteStart) { writeSoapEnvelopeStart(message); OutputStream os = message.getContent(OutputStream.class); // Unless we're caching the whole message in memory skip the envelope writing // if there's a fault later. if (!(os instanceof WriteOnCloseOutputStream) && !MessageUtils.isDOMPresent(message)) { message.put(WROTE_ENVELOPE_START, Boolean.TRUE); } } String cte = (String)message.get("soap.attachement.content.transfer.encoding"); if (cte != null) { message.put(Message.CONTENT_TRANSFER_ENCODING, cte); } // Add a final interceptor to write end elements message.getInterceptorChain().add(new SoapOutEndingInterceptor()); }
public void handleMessage(SoapMessage message) { // Yes this is ugly, but it avoids us from having to implement any kind of caching strategy boolean wroteStart = PropertyUtils.isTrue(message.get(WROTE_ENVELOPE_START)); if (!wroteStart) { writeSoapEnvelopeStart(message); OutputStream os = message.getContent(OutputStream.class); // Unless we're caching the whole message in memory skip the envelope writing // if there's a fault later. if (!(os instanceof WriteOnCloseOutputStream) && !MessageUtils.isDOMPresent(message)) { message.put(WROTE_ENVELOPE_START, Boolean.TRUE); } } String cte = (String)message.get("soap.attachement.content.transfer.encoding"); if (cte != null) { message.put(Message.CONTENT_TRANSFER_ENCODING, cte); } // Add a final interceptor to write end elements message.getInterceptorChain().add(new SoapOutEndingInterceptor()); }