Package org.apache.geronimo.echo

Examples of org.apache.geronimo.echo.Echo


    public void testEchoBytesWithoutMTOMSupport() throws Exception {
        testEchoBytes(false);
    }

    private void testEchoBytes(boolean mtomSupport) throws Exception {
        Echo echo = null;
        if (mtomSupport)
            echo = service.getPort(Echo.class, new MTOMFeature());
        else
            echo = service.getPort(Echo.class);

        byte[] expectedBytes = loadImageAsBytes();
        byte[] echoBytes = echo.echoBytes(mtomSupport, expectedBytes);
        Assert.assertEquals(expectedBytes.length, echoBytes.length);
        for (int i=0;i<expectedBytes.length;i++) {
            Assert.assertEquals("" + i, expectedBytes[i], echoBytes[i]);
        }
    }
View Full Code Here


    public void testEchoImageWithoutMTOMSupport() throws Exception {
        testEchoImage(false);
    }

    private void testEchoImage(boolean mtomSupport) throws Exception {
        Echo echo = null;
        if (mtomSupport)
            echo = service.getPort(Echo.class, new MTOMFeature());
        else
            echo = service.getPort(Echo.class);

        BufferedImage expectedImage = loadImage();
        Image echoImage = echo.echoImage(mtomSupport, expectedImage);
        byte[] actualImageBytes = convertImagetoBytes(echoImage);
        byte[] expectedImageBytes = convertImagetoBytes(reserializeImage(expectedImage));
        Assert.assertEquals(expectedImageBytes.length, actualImageBytes.length);
        for (int i=0; i<expectedImageBytes.length; i++) {
            Assert.assertEquals("" + i, expectedImageBytes[i], actualImageBytes[i]);
View Full Code Here

        imageWriter.dispose();
        return baos.toByteArray();
    }

    protected void updateAddress() {
        Echo echo = service.getPort(Echo.class);
        BindingProvider binding = (BindingProvider) echo;
        this.address = (String) binding.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
        System.out.println("Set address: " + this.address);
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.echo.Echo

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.