Package org.apache.servicemix.components.http

Examples of org.apache.servicemix.components.http.InvalidStatusResponseException


            GetMethod get = new GetMethod(url);
            method = get;
        }
        new HttpClient().executeMethod(method);
        if (method.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(method.getStatusCode());
        }
        return method.getResponseBodyAsString();
    }
View Full Code Here


        post.setRequestEntity(new StringRequestEntity(
                        "<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'>"
                                        + "<soap:Body><hello>world</hello></soap:Body>" + "</soap:Envelope>"));
        new HttpClient().executeMethod(post);
        if (post.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(post.getStatusCode());
        }
        logger.info(post.getResponseBodyAsString());

    }
View Full Code Here

        new HttpClient().executeMethod(post);
        String res = post.getResponseBodyAsString();
        log.info(res);
        assertEquals("", res);
        if (post.getStatusCode() != 202) {
            throw new InvalidStatusResponseException(post.getStatusCode());
        }

        recv.getMessageList().assertMessagesReceived(1);
    }
View Full Code Here

        log.info(res);
        Node node = transformer.toDOMNode(new StringSource(res));
        log.info(transformer.toString(node));
        assertEquals("world", textValueOfXPath(node, "/hello/text()"));
        if (post.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(post.getStatusCode());
        }
    }
View Full Code Here

            GetMethod get = new GetMethod(url);
            method = get;
        }
        new HttpClient().executeMethod(method);
        if (method.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(method.getStatusCode());
        }
        return method.getResponseBodyAsString();
    }
View Full Code Here

       
        PostMethod post = new PostMethod("http://localhost:8080/test/jbi/Service/");
        post.setRequestEntity(new StringRequestEntity("<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'><soap:Body><hello>world</hello></soap:Body></soap:Envelope>"));
        new HttpClient().executeMethod(post);
        if (post.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(post.getStatusCode());
        }
        System.err.println(post.getResponseBodyAsString());
       
    }
View Full Code Here

       
        PostMethod post = new PostMethod("http://localhost:8190/test/jbi/Service/");
        post.setRequestEntity(new StringRequestEntity("<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'><soap:Body><hello>world</hello></soap:Body></soap:Envelope>"));
        new HttpClient().executeMethod(post);
        if (post.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(post.getStatusCode());
        }
        System.err.println(post.getResponseBodyAsString());
       
    }
View Full Code Here

            GetMethod get = new GetMethod(url);
            method = get;
        }
        new HttpClient().executeMethod(method);
        if (method.getStatusCode() != 200) {
            throw new InvalidStatusResponseException(method.getStatusCode());
        }
        return method.getResponseBodyAsString();
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.components.http.InvalidStatusResponseException

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.