Package com.ettrema.httpclient

Examples of com.ettrema.httpclient.ReportMethod


        System.out.println( "response--" );
        System.out.println( resp );
    }

    private static void reportPrincipals( HttpClient client ) throws UnsupportedEncodingException, IOException {
        ReportMethod rm = new ReportMethod( "http://localhost:9080/principals" );
        rm.setRequestHeader( "depth", "0" );
        rm.setRequestEntity( new StringRequestEntity( "<x0:principal-search-property-set xmlns:x0=\"DAV:\"/>", "text/xml", "UTF-8" ) );
        int result = client.executeMethod( rm );
        System.out.println( "result: " + result );
        String resp = rm.getResponseBodyAsString();
        System.out.println( "response--" );
        System.out.println( resp );
    }
View Full Code Here


        s += "<x0:time-range start=\"20101109T230000Z\"/></x0:comp-filter></x0:comp-filter></x0:filter>";
        s += "</x0:calendar-query>";

        System.out.println("calendarQueryReport: " + s);

        ReportMethod m = new ReportMethod( "http://localhost:8080/users/userA/calendars/cal1/" );
        m.setRequestHeader( "content-type","text/xml");
        m.setRequestHeader( "connection","close");
        m.setRequestHeader( "content-length",s.length()+"");
        m.setRequestHeader( "depth","1");

        m.setRequestEntity( new StringRequestEntity( s, "text/xml", "UTF-8" ) );
        System.out.println("execute method...");
        int result = client.executeMethod( m );
        System.out.println( "result: " + result );
        String resp = m.getResponseBodyAsString();
        System.out.println( "response--" );
        System.out.println( resp );
    }
View Full Code Here

TOP

Related Classes of com.ettrema.httpclient.ReportMethod

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.