Example 3: Getting a list of tables for a profile and the supported dimensions/metrics
(Return to main article: Samples for Java (SOAP) v1)
1. Define a connection to the ReportService:
ReportserviceStub reportStub = new ReportserviceStub();
2. Define a request for the getTableList method in the ReportService:
ReportserviceStub.GetTableList storReq = new ReportserviceStub.GetTableList();
3. Set up the getTableList request parameters:
storReq.setLogin("URCHIN_LOGIN"); storReq.setPassword("URCHIN_PASSWORD"); storReq.setProfileId(PROFILE_ID);
5. Get the list of profiles:
ReportserviceStub.GetTableListResponse storRsp = reportStub.getTableList(storReq);
6. Parse and display the response.
For the complete sample code, see the implementation of GetTableList() in the ReportService.java file.
(Return to main article: Samples for Java (SOAP) v1)