Examples of Echo


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

        project.getProperty(null);
        ctrl.setMatcher(MockControl.ALWAYS_MATCHER);
        ctrl.setReturnValue("foo", 6);
        project.createClassLoader(null);
        ctrl.setMatcher(MockControl.ALWAYS_MATCHER);
        ctrl.setReturnValue(new AntClassLoader(new Echo().getClass().getClassLoader(), false));

        IncludeTask task = new IncludeTask();
        task.setProject(project);

        ctrl.replay();
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.wink.itest.client.jaxb.Echo

        assertEquals("echo: " + MediaType.APPLICATION_JSON, j.get("value"));

        s =
            client.resource(getBaseURI() + "/echoaccept").accept(MediaType.TEXT_XML)
                .get(String.class);
        Echo e =
            (Echo)JAXBContext.newInstance(Echo.class).createUnmarshaller()
                .unmarshal(new StringReader(s));
        assertEquals(e.getValue(), "echo: " + MediaType.TEXT_XML);

        /*
         * this is actually a trick to make sure that plain text is returned.
         * the server side piece does not produce APPLICATION_XML but will
         * produce TEXT_PLAIN for any non-produced type. it really should return
View Full Code Here

Examples of org.apache.wink.itest.client.jaxb.Echo

     * For JAXB objects, there will be an error as the resource will return a
     * text/plain representation.
     */
    public void testAcceptHeaderForJAXB() {
        try {
            Echo e  = client.resource(getBaseURI() + "/echoaccept").get(Echo.class);
            fail();
//            String value = e.getValue();
//            assertTrue(value, value.contains(MediaType.APPLICATION_JSON));
//            assertTrue(value, value.contains(MediaType.APPLICATION_XML));
//            assertTrue(value, value.contains(MediaType.TEXT_XML));
//            assertTrue(value, value.contains("application/javascript"));
        } catch (RuntimeException e) {
            assertEquals(e.getMessage(), String
                .format("No reader for type class %s and media type %s",
                        Echo.class.getName(),
                        MediaType.TEXT_PLAIN));
        }
    }
View Full Code Here

Examples of org.apache.xmlrpc.Echo

        {
            SecureWebServer webserver = new SecureWebServer (p);
            webserver.addHandler ("string", "Welcome to XML-RPC!");
            webserver.addHandler ("math", Math.class);
            webserver.addHandler ("auth", new AuthDemo());
            webserver.addHandler ("$default", new Echo());

            System.err.println ("started web server on port "+p);
        }
        catch (IOException x)
        {
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        super.tearDown();
    }

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8191/Echo");
       
        Client client = ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient();
        client.setProperty(Channel.USERNAME, "user");
        client.setProperty(Channel.PASSWORD, "pass");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        super.tearDown();
    }
   
    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "https://localhost:8443/Echo");

        Protocol protocol = new Protocol("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 8443);
        Protocol.registerProtocol("https", protocol);
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        super.tearDown();
    }

    public void testGzip() throws Exception
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        assertEquals(root.getName(), e.getName());
    }
   
    public void testWithChunking() throws Exception
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        client.setProperty(HttpTransport.CHUNKING_ENABLED, "true");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        assertNull(response);
    }

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
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.