Package org.springframework.ws.pox.dom

Examples of org.springframework.ws.pox.dom.DomPoxMessage


    @Test
    public void testPox() throws Exception {
        interceptor.setRequestXslt(xslt);
        interceptor.afterPropertiesSet();
        DomPoxMessageFactory factory = new DomPoxMessageFactory();
        DomPoxMessage message = factory.createWebServiceMessage();
        transformer.transform(new ResourceSource(input), message.getPayloadResult());
        MessageContext context = new DefaultMessageContext(message, factory);

        Assert.assertTrue("Invalid interceptor result", interceptor.handleRequest(context, null));
        StringResult expected = new StringResult();
        transformer.transform(new SAXSource(SaxUtils.createInputSource(output)), expected);
        StringResult result = new StringResult();
        transformer.transform(message.getPayloadSource(), result);
        assertXMLEqual(expected.toString(), result.toString());

    }
View Full Code Here


    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    documentBuilderFactory.setNamespaceAware(true);
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    Document document = documentBuilder.parse(new InputSource(new StringReader(xml)));
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    DomPoxMessage request = new DomPoxMessage(document, transformer, "text/xml");
    MessageContext messageContext = new DefaultMessageContext(request, messageFactory);
    gateway.invoke(messageContext);
    Object reply = messageContext.getResponse().getPayloadSource();
    assertThat(reply, is(instanceOf(DOMSource.class)));
    DOMSource replySource = (DOMSource) reply;
View Full Code Here

        filter.filterProducer(exchange, null);
    }

    @Test
    public void nonSoapMessageShouldBeSkipped() throws Exception {
        DomPoxMessage domPoxMessage = new DomPoxMessageFactory().createWebServiceMessage();
        filter.filterConsumer(exchange, domPoxMessage);
        filter.filterProducer(exchange, domPoxMessage);

    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.pox.dom.DomPoxMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.