Package org.springframework.ws.server.endpoint

Examples of org.springframework.ws.server.endpoint.PayloadEndpoint.invoke()


    @Override
    public void invoke(MessageContext messageContext, Object endpoint) throws Exception {
        PayloadEndpoint payloadEndpoint = (PayloadEndpoint) endpoint;
        Source requestSource = messageContext.getRequest().getPayloadSource();
        Source responseSource = payloadEndpoint.invoke(requestSource);
        if (responseSource != null) {
            WebServiceMessage response = messageContext.getResponse();
            transform(responseSource, response.getPayloadResult());
        }
    }
View Full Code Here


                transformer.transform(request, new StreamResult(writer));
                assertXMLEqual("Invalid request", "<request/>", writer.toString());
                return new StreamSource(new StringReader("<response/>"));
            }
        };
        endpoint.invoke(request.getPayloadSource());
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());
        adapter.invoke(messageContext, endpoint);
        MockWebServiceMessage response = (MockWebServiceMessage) messageContext.getResponse();
        Assert.assertNotNull("No response created", response);
        assertXMLEqual("Invalid payload", "<response/>", response.getPayloadAsString());
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.