Examples of StringSource


Examples of org.springframework.xml.transform.StringSource

    @Test
    public void testAxiomNoResponseNoPayloadCaching() throws Exception {
        Transformer transformer = TransformerFactory.newInstance().newTransformer();
        SOAPFactory axiomFactory = OMAbstractFactory.getSOAP11Factory();
        AxiomSoapMessage request = new AxiomSoapMessage(axiomFactory);
        transformer.transform(new StringSource(REQUEST), request.getPayloadResult());
        AxiomSoapMessageFactory soapMessageFactory = new AxiomSoapMessageFactory();
        soapMessageFactory.setPayloadCaching(false);
        soapMessageFactory.afterPropertiesSet();
        MessageContext context = new DefaultMessageContext(request, soapMessageFactory);
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    }

    @Test
    public void testNoResponse() throws Exception {
        WebServiceMessage messageMock = createMock(WebServiceMessage.class);
        expect(messageMock.getPayloadSource()).andReturn(new StringSource("<request/>"));
        WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
        MessageContext messageContext = new DefaultMessageContext(messageMock, factoryMock);

        Method noResponse = getClass().getMethod("noResponse", MyGenericType.class);
        MethodEndpoint methodEndpoint = new MethodEndpoint(this, noResponse);
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    }

    @Test
    public void testResponse() throws Exception {
        WebServiceMessage requestMock = createMock(WebServiceMessage.class);
        expect(requestMock.getPayloadSource()).andReturn(new StringSource("<request/>"));
        WebServiceMessage responseMock = createMock(WebServiceMessage.class);
        expect(responseMock.getPayloadResult()).andReturn(new StringResult());
        WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
        expect(factoryMock.createWebServiceMessage()).andReturn(responseMock);
        MessageContext messageContext = new DefaultMessageContext(requestMock, factoryMock);
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    }

    @Test
    public void testInvokeTypes() throws Exception {
        WebServiceMessage messageMock = createMock(WebServiceMessage.class);
        expect(messageMock.getPayloadSource()).andReturn(new StringSource(CONTENTS));
        WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
        replay(messageMock, factoryMock);

        MessageContext messageContext = new DefaultMessageContext(messageMock, factoryMock);
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedTypes",
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    @Test
    public void testInvokeSource() throws Exception {
        WebServiceMessage requestMock = createMock(WebServiceMessage.class);
        WebServiceMessage responseMock = createMock(WebServiceMessage.class);
        expect(requestMock.getPayloadSource()).andReturn(new StringSource(CONTENTS));
        expect(responseMock.getPayloadResult()).andReturn(new StringResult());
        WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
        expect(factoryMock.createWebServiceMessage()).andReturn(responseMock);
        replay(requestMock, responseMock, factoryMock);
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    public void supportedVoid(@XPathParam("/")String param1) {
    }

    public Source supportedSource(@XPathParam("/")String param1) {
        supportedSourceInvoked = true;
        return new StringSource("<response/>");
    }
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

        saajMessage.getSOAPBody().addChildElement(LOCAL_NAME, "", NAMESPACE_URI);
        return new DefaultMessageContext(new SaajSoapMessage(saajMessage), new SaajSoapMessageFactory(saajFactory));
    }

    protected MessageContext createMockMessageContext() throws TransformerException {
        MockWebServiceMessage request = new MockWebServiceMessage(new StringSource(XML));
        return new DefaultMessageContext(request, new MockWebServiceMessageFactory());
    }
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    }

    protected MessageContext createCachingAxiomMessageContext() throws Exception {
        SOAPFactory axiomFactory = OMAbstractFactory.getSOAP11Factory();
        AxiomSoapMessage request = new AxiomSoapMessage(axiomFactory, true, false);
        transform(new StringSource(XML), request.getPayloadResult());
        AxiomSoapMessageFactory soapMessageFactory = new AxiomSoapMessageFactory();
        soapMessageFactory.afterPropertiesSet();
        return new DefaultMessageContext(request, soapMessageFactory);
    }
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    }

    protected MessageContext createNonCachingAxiomMessageContext() throws Exception {
        SOAPFactory axiomFactory = OMAbstractFactory.getSOAP11Factory();
        AxiomSoapMessage request = new AxiomSoapMessage(axiomFactory, false, false);
        transform(new StringSource(XML), request.getPayloadResult());
        AxiomSoapMessageFactory soapMessageFactory = new AxiomSoapMessageFactory();
        soapMessageFactory.setPayloadCaching(false);
        soapMessageFactory.afterPropertiesSet();
        return new DefaultMessageContext(request, soapMessageFactory);
    }
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

    @Test
    public void testHandler() throws Exception {
        String content = "<Root xmlns='http://springframework.org/spring-ws/1' " +
                "xmlns:child='http://springframework.org/spring-ws/2'>" +
                "<child:Child attribute='value'>Content</child:Child></Root>";
        Source source = new StringSource(content);
        Result result = new SAXResult(handler);
        transformer.transform(source, result);
        Name rootName = envelope.createName("Root", "", "http://springframework.org/spring-ws/1");
        Iterator<?> iterator = envelope.getBody().getChildElements(rootName);
        Assert.assertTrue("No child found", iterator.hasNext());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.