VMware VCENTER CHARGEBACK 1.5 - API Manual page 39

Vcenter chargeback api programming guide
Hide thumbs Also See for VCENTER CHARGEBACK 1.5 - API:
Table of Contents

Advertisement

* @throws JDOMException
*/
public static void sampleGetReportAsXml(int reportId, String baseURL) throws
GetMethod get = null;
HttpClient client = new HttpClient();
Protocol.registerProtocol("https", new Protocol("https", (ProtocolSocketFactory) new
String uri = "https://" + baseURL + "/vCenter-CB/api/report/" + reportId + "/export";
NameValuePair[] parameters = {new NameValuePair("exportFormat", "XML")};
try {
} finally {
}
}
VMware, Inc.
HttpException, IOException, KeyManagementException, NoSuchAlgorithmException,
JDOMException {
FakeSSLCertificateSocketFactory(), 443));
get = new GetMethod(uri);
get.setQueryString(parameters);
client.executeMethod(get);
System.out.println(get.getResponseBodyAsString());
if (get != null) {
get.releaseConnection();
}
Chapter 3 Using vCenter Chargeback with a Billing System
39

Advertisement

Table of Contents
loading

Table of Contents