Package org.springframework.ws.server.endpoint

Examples of org.springframework.ws.server.endpoint.MethodEndpoint


        Assert.assertFalse("Method supported", adapter.supports(endpoint));
    }

    @Test
    public void testUnsupportedInvalidReturnType() throws NoSuchMethodException {
        MethodEndpoint endpoint = new MethodEndpoint(this, "unsupportedInvalidReturnType", new Class[]{String.class});
        Assert.assertFalse("Method supported", adapter.supports(endpoint));
    }
View Full Code Here


        Assert.assertFalse("Method supported", adapter.supports(endpoint));
    }

    @Test
    public void testUnsupportedInvalidParams() throws NoSuchMethodException {
        MethodEndpoint endpoint =
                new MethodEndpoint(this, "unsupportedInvalidParams", new Class[]{String.class, String.class});
        Assert.assertFalse("Method supported", adapter.supports(endpoint));
    }
View Full Code Here

        Assert.assertFalse("Method supported", adapter.supports(endpoint));
    }

    @Test
    public void testSupportedTypes() throws NoSuchMethodException {
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedTypes",
                new Class[]{Boolean.TYPE, Double.TYPE, Node.class, NodeList.class, String.class});
        Assert.assertTrue("Not all types supported", adapter.supports(endpoint));
    }
View Full Code Here

        Assert.assertTrue("Not all types supported", adapter.supports(endpoint));
    }

    @Test
    public void testSupportsStringSource() throws NoSuchMethodException {
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedStringSource", new Class[]{String.class});
        Assert.assertTrue("StringSource method not supported", adapter.supports(endpoint));
    }
View Full Code Here

        Assert.assertTrue("StringSource method not supported", adapter.supports(endpoint));
    }

    @Test
    public void testSupportsSource() throws NoSuchMethodException {
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedSource", new Class[]{String.class});
        Assert.assertTrue("Source method not supported", adapter.supports(endpoint));
    }
View Full Code Here

        Assert.assertTrue("Source method not supported", adapter.supports(endpoint));
    }

    @Test
    public void testSupportsVoid() throws NoSuchMethodException {
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedVoid", new Class[]{String.class});
        Assert.assertTrue("void method not supported", adapter.supports(endpoint));
    }
View Full Code Here

        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",
                new Class[]{Boolean.TYPE, Double.TYPE, Node.class, NodeList.class, String.class});
        adapter.invoke(messageContext, endpoint);
        Assert.assertTrue("Method not invoked", supportedTypesInvoked);

        verify(messageMock, factoryMock);
View Full Code Here

        WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
        expect(factoryMock.createWebServiceMessage()).andReturn(responseMock);
        replay(requestMock, responseMock, factoryMock);

        MessageContext messageContext = new DefaultMessageContext(requestMock, factoryMock);
        MethodEndpoint endpoint = new MethodEndpoint(this, "supportedSource", new Class[]{String.class});
        adapter.invoke(messageContext, endpoint);
        Assert.assertTrue("Method not invoked", supportedSourceInvoked);

        verify(requestMock, responseMock, factoryMock);
    }
View Full Code Here

        namespaces.put("root", rootNamespace);
        namespaces.put("child", childNamespace);
        adapter.setNamespaces(namespaces);

        MessageContext messageContext = new DefaultMessageContext(requestMock, factoryMock);
        MethodEndpoint endpoint = new MethodEndpoint(this, "namespaces", new Class[]{Node.class});
        adapter.invoke(messageContext, endpoint);
        Assert.assertTrue("Method not invoked", namespacesInvoked);
    }
View Full Code Here

        MessageContext context = new DefaultMessageContext(requestMock, factoryMock);
        EndpointInvocationChain chain = mapping.getEndpoint(context);
        Assert.assertNotNull("MethodEndpoint not registered", chain);
        Method doIt = MyEndpoint.class.getMethod("doIt", new Class[0]);
        MethodEndpoint expected = new MethodEndpoint("endpoint", applicationContext, doIt);
        Assert.assertEquals("Invalid endpoint registered", expected, chain.getEndpoint());

        verify(requestMock, factoryMock);
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.server.endpoint.MethodEndpoint

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.