Package org.springframework.ws.test.support

Examples of org.springframework.ws.test.support.MockStrategiesHelper


     * @return the created server
     * @throws IllegalArgumentException if the given application context contains neither a {@link WebServiceTemplate}
     *                                  nor a {@link WebServiceGatewaySupport}.
     */
    public static MockWebServiceServer createServer(ApplicationContext applicationContext) {
        MockStrategiesHelper strategiesHelper = new MockStrategiesHelper(applicationContext);
        WebServiceTemplate webServiceTemplate = strategiesHelper.getStrategy(WebServiceTemplate.class);
        if (webServiceTemplate != null) {
            return createServer(webServiceTemplate);
        }
        WebServiceGatewaySupport gatewaySupport = strategiesHelper.getStrategy(WebServiceGatewaySupport.class);
        if (gatewaySupport != null) {
            return createServer(gatewaySupport);
        }
        throw new IllegalArgumentException(
                "Could not find either WebServiceTemplate or WebServiceGatewaySupport in application context");
View Full Code Here


     * @return the created client
     */
    public static MockWebServiceClient createClient(ApplicationContext applicationContext) {
        Assert.notNull(applicationContext, "'applicationContext' must not be null");

        MockStrategiesHelper strategiesHelper = new MockStrategiesHelper(applicationContext);

        WebServiceMessageReceiver messageReceiver =
                strategiesHelper.getStrategy(WebServiceMessageReceiver.class, SoapMessageDispatcher.class);
        WebServiceMessageFactory messageFactory =
                strategiesHelper.getStrategy(WebServiceMessageFactory.class, SaajSoapMessageFactory.class);
        return new MockWebServiceClient(messageReceiver, messageFactory);
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.test.support.MockStrategiesHelper

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.