Package org.springframework.ws.server

Examples of org.springframework.ws.server.EndpointInterceptor


        super(delegate);
    }

    @Override
    public boolean understands(SoapHeaderElement header) {
        EndpointInterceptor delegate = getDelegate();
        if (delegate instanceof SoapEndpointInterceptor) {
            return ((SoapEndpointInterceptor) delegate).understands(header);
        }
        else {
            return false;
View Full Code Here


    }

    @Test
    public void endpointInterceptors() throws Exception {
        final Object endpoint = new Object();
        EndpointInterceptor interceptor = new EndpointInterceptorAdapter();
        AbstractEndpointMapping mapping = new AbstractEndpointMapping() {
            @Override
            protected Object getEndpointInternal(MessageContext givenRequest) throws Exception {
                assertEquals("Invalid request passed", messageContext, givenRequest);
                return endpoint;
View Full Code Here

    public void smartEndpointInterceptors() throws Exception {
        StaticApplicationContext applicationContext = new StaticApplicationContext();
        applicationContext.registerSingleton("smartInterceptor", MySmartEndpointInterceptor.class);

        final Object endpoint = new Object();
        EndpointInterceptor interceptor = new EndpointInterceptorAdapter();
        AbstractEndpointMapping mapping = new AbstractEndpointMapping() {
            @Override
            protected Object getEndpointInternal(MessageContext givenRequest) throws Exception {
                assertEquals("Invalid request passed", messageContext, givenRequest);
                return endpoint;
View Full Code Here

        SecurityContextHolder.clearContext();
    }

    @Test
    public void testValidateUsernameTokenPlainText() throws Exception {
        EndpointInterceptor interceptor = prepareInterceptor("UsernameToken", true, false);
        SoapMessage message = loadSoap11Message("usernameTokenPlainText-soap.xml");
        MessageContext messageContext = new DefaultMessageContext(message, getSoap11MessageFactory());
        interceptor.handleRequest(messageContext, null);
        assertValidateUsernameToken(message);

        // test clean up
        messageContext.getResponse();
        interceptor.handleResponse(messageContext, null);
        interceptor.afterCompletion(messageContext, null, null);
        assertNull("Authentication created", SecurityContextHolder.getContext().getAuthentication());
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.server.EndpointInterceptor

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.