protected void processAttachments(SoapMessage message, SoapBodyInfo sbi) { Collection<Attachment> atts = setupAttachmentOutput(message); List<Object> outObjects = CastUtils.cast(message.getContent(List.class));
public void handleMessage(SoapMessage message) { if (binding.getHandlerChain().isEmpty()) { return; } if (getInvoker(message).getProtocolHandlers().isEmpty()) { return; } checkUnderstoodHeaders(message); MessageContext context = createProtocolMessageContext(message); HandlerChainInvoker invoker = getInvoker(message); invoker.setProtocolMessageContext(context); if (!invoker.invokeProtocolHandlersHandleFault(isRequestor(message), context)) { handleAbort(message, context); } SOAPMessage msg = message.getContent(SOAPMessage.class); if (msg != null) { XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(msg); message.setContent(XMLStreamReader.class, xmlReader); } }
public SOAPMessage getMessage() { SOAPMessage message = null; if (getWrappedMessage().getContent(Object.class) instanceof SOAPMessage) { message = (SOAPMessage)getWrappedMessage().getContent(Object.class); } else { message = getWrappedMessage().getContent(SOAPMessage.class); } //Only happens to non-Dispatch/Provider case. if (null == message) { Boolean outboundProperty = (Boolean)get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); if (outboundProperty == null || !outboundProperty) { //No SOAPMessage exists yet, so lets create one SAAJ_IN.handleMessage(getWrappedSoapMessage()); message = getWrappedSoapMessage().getContent(SOAPMessage.class); } } return message; }
} else { boolean isFault = handleMessageInternal(message); SOAPMessage msg = message.getContent(SOAPMessage.class); if (msg != null) { XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(msg);
@Override public void handleMessage(SoapMessage message) throws Fault{ SOAPMessage saaj = message.getContent(SOAPMessage.class); Document doc = saaj.getSOAPPart(); // This actually returns a SOAPPart instance but it does implement the w3c Document interface //play around with the document, doc is a reference so any changes made to that instance //will be forwarded to the rest of the chain }
public void handleMessage(SoapMessage message) { // remove the soap header to avoid the endless loop SOAPMessage saaj = message.getContent(SOAPMessage.class); if (saaj != null) { // AS CXF_MESSAGE already build up all the SOAP message // need to clean up the soap Header from message to avoid endless loop message.getHeaders().clear(); } } }
private SOAPMessage getSOAPMessage(SoapMessage msg) { SAAJInInterceptor.INSTANCE.handleMessage(msg); return msg.getContent(SOAPMessage.class); }
public void handleMessage(SoapMessage message) throws Fault { MessageContentsList list = (MessageContentsList)message.getContent(List.class); Object o = list.remove(0); SOAPMessage soapMessage = null; XMLStreamWriter origWriter = message.getContent(XMLStreamWriter.class); message.put(SAAJOutInterceptor.ORIGINAL_XML_WRITER, origWriter);
SOAPMessage originalMsg = message.getContent(SOAPMessage.class); SOAPBody body = originalMsg.getSOAPPart().getEnvelope().getBody(); body.removeContents();
private void reserialize(final SoapMessage message) throws Exception { final SOAPMessage soapMessage = message.getContent(SOAPMessage.class); if (soapMessage == null) { return; } final DOMSource bodySource = new DOMSource(soapMessage.getSOAPPart()); final XMLStreamReader xmlReader = StaxUtils.createXMLStreamReader(bodySource); message.setContent(XMLStreamReader.class, xmlReader); } }
public void handleMessage(SoapMessage mc) throws Fault { //must turn off mtom when using WS-Sec so binary is inlined so it can //be properly signed/encrypted/etc... if (!mtomEnabled) { mc.put(org.apache.cxf.message.Message.MTOM_ENABLED, false); } if (mc.getContent(SOAPMessage.class) == null) { saajOut.handleMessage(mc); } mc.getInterceptorChain().add(ending); } public void handleFault(SoapMessage message) {
public static SOAPPart parseSoapMessage(String samlRequest) throws XMLStreamException { XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(new StringReader(samlRequest)); SoapMessage soapMessage = new SoapMessage(Soap11.getInstance()); SAAJInInterceptor.SAAJPreInInterceptor preInInterceptor = new SAAJInInterceptor.SAAJPreInInterceptor(); soapMessage.setContent(XMLStreamReader.class, xmlStreamReader); preInInterceptor.handleMessage(soapMessage); SAAJInInterceptor inInterceptor = new SAAJInInterceptor(); inInterceptor.handleMessage(soapMessage); return ((SOAPPart) soapMessage.getContent(Node.class)); }
public void handleMessage(SoapMessage mc) throws Fault { boolean enableStax = MessageUtils.getContextualBoolean(mc, SecurityConstants.ENABLE_STREAMING_SECURITY); if (!enableStax) { if (mc.getContent(SOAPMessage.class) == null) { saajOut.handleMessage(mc); } mc.put(SECURITY_PROCESSED, Boolean.TRUE); mc.getInterceptorChain().add(ending); } } public void handleFault(SoapMessage message) {
public void handleMessage(SoapMessage mc) throws Fault { boolean enableStax = MessageUtils.getContextualBoolean(mc, SecurityConstants.ENABLE_STREAMING_SECURITY); if (!enableStax) { if (mc.getContent(SOAPMessage.class) == null) { saajOut.handleMessage(mc); } mc.put(SECURITY_PROCESSED, Boolean.TRUE); mc.getInterceptorChain().add(ending); } } public void handleFault(SoapMessage message) {
public void handleMessage(SoapMessage message) throws Fault { if (message.getVersion() == Soap11.getInstance()) { new Soap11FaultInInterceptor().handleMessage(message); return; } XMLStreamReader reader = message.getContent(XMLStreamReader.class); message.setContent(Exception.class, unmarshalFault(message, reader)); }
public void handleMessage(SoapMessage message) throws Fault { if (message.getVersion() == Soap11.getInstance()) { new Soap11FaultInInterceptor().handleMessage(message); return; } XMLStreamReader reader = message.getContent(XMLStreamReader.class); message.setContent(Exception.class, unmarshalFault(message, reader)); }
public void handleMessage(SoapMessage message) throws Fault { Fault f = (Fault) message.getContent(Exception.class); message.put(org.apache.cxf.message.Message.RESPONSE_CODE, f.getStatusCode()); if (message.getVersion() == Soap11.getInstance()) { message.getInterceptorChain().add(Soap11FaultOutInterceptorInternal.INSTANCE); } else { message.getInterceptorChain().add(Soap12FaultOutInterceptorInternal.INSTANCE); } }
public void handleMessage(SoapMessage message) throws Fault { Fault f = (Fault) message.getContent(Exception.class); message.put(org.apache.cxf.message.Message.RESPONSE_CODE, f.getStatusCode()); if (message.getVersion() == Soap11.getInstance()) { message.getInterceptorChain().add(Soap11FaultOutInterceptorInternal.INSTANCE); } else { message.getInterceptorChain().add(Soap12FaultOutInterceptorInternal.INSTANCE); } }
public void handleMessage(SoapMessage message) throws Fault { Fault f = (Fault) message.getContent(Exception.class); message.put(org.apache.cxf.message.Message.RESPONSE_CODE, f.getStatusCode()); if (message.getVersion() == Soap11.getInstance()) { message.getInterceptorChain().add(Soap11FaultOutInterceptorInternal.INSTANCE); } else { message.getInterceptorChain().add(Soap12FaultOutInterceptorInternal.INSTANCE); } }
public void handleMessage(SoapMessage message) throws Fault { Fault f = (Fault) message.getContent(Exception.class); message.put(org.apache.cxf.message.Message.RESPONSE_CODE, f.getStatusCode()); if (message.getVersion() == Soap11.getInstance()) { message.getInterceptorChain().add(Soap11FaultOutInterceptorInternal.INSTANCE); } else { message.getInterceptorChain().add(Soap12FaultOutInterceptorInternal.INSTANCE); } }