Package org.apache.qpid.info.util

Examples of org.apache.qpid.info.util.HttpPoster


                    Properties props = new Properties();
                    props.putAll(defaultProps);
                    props.putAll(ifr.getSections().get(section));
                    if (isValid(protocol, props))
                    {
                        new HttpPoster(props, info.toXML()).run();
                    }
                }

            }
            else if (protocol.toLowerCase().startsWith("soap"))
View Full Code Here


                    Properties props = new Properties();
                    props.putAll(defaultProps);
                    props.putAll(ifr.getSections().get(section));
                    if (isValid(protocol, props))
                    {
                        new HttpPoster(props, info.toXML()).run();
                    }
                }

            }
            else if (protocol.toLowerCase().startsWith("soap"))
View Full Code Here

    private HttpPoster getHttpPoster(String url)
    {
        StringBuffer sb = new StringBuffer("test=TEST");
        Properties props = new Properties();
        props.put("http.url", url);
        return new HttpPoster(props, sb);
    }
View Full Code Here

     * print Ok. A failure test is following where we post to a non-existent URL
     */
    public void testHttpPoster() throws Exception
    {
        // Test HttpPoster posts correctly to the servlet
        HttpPoster hp = getHttpPoster(baseURL + contextPath);
        assertNotNull(hp);
        hp.run();
        List<String> response = hp.get_response();
        assertTrue(response.size() > 0);
        assertEquals("OK <br>", response.get(0).toString());

        // Failure Test
        hp = getHttpPoster("http://localhost/nonexistent");
        hp.run();
        response = hp.get_response();
        assertTrue(response.size() == 0);

    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.info.util.HttpPoster

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.