This API returns s list of all the batch classes accessible by the authenticated user.

Request Method GET

Web Service URL: http://{serverName}:{port}/dcma/rest/getBatchClassList

Sample client code using apache commons http client:-

private static void getBatchClassList() {
		HttpClient client = new HttpClient();
		String url = "http://localhost:8080/dcma/rest/getBatchClassList";
		GetMethod mGet = new GetMethod(url);
		int statusCode;
		try {
			statusCode = client.executeMethod(mGet);
			if (statusCode == 200) {
				System.out.println("Web service executed successfully.");
				String responseBody = mGet.getResponseBodyAsString();
				System.out.println(statusCode + " *** " + responseBody);
			} else if (statusCode == 403) {
				System.out.println("Invalid username/password.");
			} else {
				System.out.println(mGet.getResponseBodyAsString());
			}
		} catch (HttpException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (mGet != null) {
				mGet.releaseConnection();
			}
		}
	}

Was this article helpful to you?

Engineering

Comments are closed.