Example usage for org.apache.commons.httpclient URIException printStackTrace

List of usage examples for org.apache.commons.httpclient URIException printStackTrace

Introduction

In this page you can find the example usage for org.apache.commons.httpclient URIException printStackTrace.

Prototype

public void printStackTrace(PrintStream s) 

Source Link

Document

Print this HttpException and its stack trace to the specified print stream.

Usage

From source file:com.zimbra.cs.account.ProvUtil.java

@Override
public void sendSoapMessage(PostMethod postMethod, Element envelope, HttpState httpState) {
    console.println("========== SOAP SEND ==========");

    if (debugLevel == SoapDebugLevel.high) {
        try {// w ww .j  a  v  a 2  s . co  m
            URI uri = postMethod.getURI();
            console.println(uri.toString());
        } catch (URIException e) {
            if (verboseMode) {
                e.printStackTrace(errConsole);
            } else {
                console.println("Unable to get request URL, error=" + e.getMessage());
            }
        }

        Header[] headers = postMethod.getRequestHeaders();
        for (Header header : headers) {
            console.println(header.toString().trim()); // trim the ending crlf
        }
        console.println();
    }

    sendStart = System.currentTimeMillis();

    console.println(envelope.prettyPrint());
    console.println("===============================");
}