Search in sources :

Example 6 with SAAJInInterceptor

use of org.apache.cxf.binding.soap.saaj.SAAJInInterceptor in project ddf by codice.

the class SamlProtocol method parseSoapMessage.

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));
}
Also used : SAAJInInterceptor(org.apache.cxf.binding.soap.saaj.SAAJInInterceptor) XMLStreamReader(javax.xml.stream.XMLStreamReader) StringReader(java.io.StringReader) SoapMessage(org.apache.cxf.binding.soap.SoapMessage)

Aggregations

SAAJInInterceptor (org.apache.cxf.binding.soap.saaj.SAAJInInterceptor)6 SAAJOutInterceptor (org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor)3 StringReader (java.io.StringReader)2 XMLStreamReader (javax.xml.stream.XMLStreamReader)2 SoapBinding (org.apache.cxf.binding.soap.SoapBinding)2 SoapMessage (org.apache.cxf.binding.soap.SoapMessage)2 Endpoint (org.apache.cxf.endpoint.Endpoint)2 WSS4JInInterceptor (org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor)2 WSS4JOutInterceptor (org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor)2 URL (java.net.URL)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 QName (javax.xml.namespace.QName)1 SOAPElement (javax.xml.soap.SOAPElement)1 SOAPException (javax.xml.soap.SOAPException)1 SOAPHeaderElement (javax.xml.soap.SOAPHeaderElement)1 SOAPPart (javax.xml.soap.SOAPPart)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 Source (javax.xml.transform.Source)1 Service (javax.xml.ws.Service)1