Examples of Echo


Examples of org.apache.cxf.ws.security.wss4j.Echo

        inProperties.setValidateSamlSubjectConfirmation(false);
        WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inProperties);
        service.getInInterceptors().add(inhandler);
       
        // Create + configure client
        Echo echo = createClientProxy();
       
        Client client = ClientProxy.getClient(echo);
        client.getInInterceptors().add(new LoggingInInterceptor());
        client.getOutInterceptors().add(new LoggingOutInterceptor());
       
        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_UNSIGNED);
        properties.put(
            WSHandlerConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler()
        );
       
        WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

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

Examples of org.apache.geronimo.echo.Echo

    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

Examples of org.apache.geronimo.echo.Echo

        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

Examples of org.apache.jena.jdbc.preprocessing.Echo

        ps.put("test", "props");

        JenaConnection conn = (JenaConnection) driver.connect(url, ps);
        Iterator<CommandPreProcessor> preProcessors = conn.getPreProcessors();
        Assert.assertTrue(preProcessors.hasNext());
        Echo echo = (Echo) preProcessors.next();

        Properties actual = echo.getProperties();
        Assert.assertEquals("props", actual.getProperty("test"));

        conn.close();
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Echo

        property.setFile(deliveryList);
        property.perform();
    }

    private void appendDeliveryList(String msg) {
        Echo echo = (Echo) getProject().createTask("echo");
        echo.setOwningTarget(getOwningTarget());
        echo.init();
        echo.setFile(deliveryList);
        echo.setMessage(msg + "\n");
        echo.setAppend(true);
        echo.perform();
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Echo

        publish.setPubrevision("1.2");
        publish.setResolver("1");
        File art = new File("build/test/publish/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);

        Echo echo = new Echo();
        echo.setProject(project);
        echo.setMessage("new version");
        echo.setFile(art);
        echo.execute();

        File dest = new File(
                "test/repositories/1/apache/resolve-simple/jars/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), dest, null);

        echo = new Echo();
        echo.setProject(project);
        echo.setMessage("old version");
        echo.setFile(dest);
        echo.execute();

        dest.setReadOnly();

        try {
            publish.execute();
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Echo

        publish.setPubrevision("1.2");
        publish.setResolver("1");
        File art = new File("build/test/publish/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);

        Echo echo = new Echo();
        echo.setProject(project);
        echo.setMessage("new version");
        echo.setFile(art);
        echo.execute();

        File dest = new File(
                "test/repositories/1/apache/resolve-simple/jars/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), dest, null);

        echo = new Echo();
        echo.setProject(project);
        echo.setMessage("old version");
        echo.setFile(dest);
        echo.execute();

        publish.setOverwrite(true);
        publish.execute();
        assertTrue(dest.exists());
        BufferedReader reader = new BufferedReader(new FileReader(dest));
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Echo

        publish.setPubrevision("1.2");
        publish.setResolver("1");
        File art = new File("build/test/publish/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);

        Echo echo = new Echo();
        echo.setProject(project);
        echo.setMessage("new version");
        echo.setFile(art);
        echo.execute();

        File dest = new File(
                "test/repositories/1/apache/resolve-simple/jars/resolve-simple-1.2.jar");
        FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), dest, null);

        echo = new Echo();
        echo.setProject(project);
        echo.setMessage("old version");
        echo.setFile(dest);
        echo.execute();

        dest.setReadOnly();

        publish.setOverwrite(true);
        publish.execute();
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Echo

            existingFile = new File(destinationDirectory + "/src/main/resources/messages.properties");
        }

        parsePropertiesFile(existingFile, pojoName);

        Echo echoTask = (Echo) antProject.createTask("echo");
        echoTask.setFile(existingFile);
        echoTask.setAppend(true);
        echoTask.setMessage(antProject.getProperty("i18n.file"));
        echoTask.execute();
    }
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.