/
DWH Web Services - KFS Project
DWH Web Services - KFS Project
isValidKFSProjects(List of (kfsProjCode))
This service is used to validate KFS Project codes. Returns an XML result set with a value of true or false for each project code.
Input Specifications
Parameter | Description | Required? | Data Type (max length) | Example |
---|---|---|---|---|
kfsProjCode | KFS Project Number | Yes | String(10) | '1234567890' |
DB Query
SELECT PROJECT_CD, PROJ_ACTIVE_CD FROM dwhs_ods..ca_project_t WHERE PROJ_ACTIVE_CD <> 'N' and PROJECT_CD IN ('<kfsProjectCode>');
Result Schema: A list of following elements (ProjectValidation.java)
Parameter | Description | Data Type | Example |
---|---|---|---|
kfsProjCode | KFS Project Code | String (10) | '1234567890' |
isValid | Is the KFS Project Code valid? | boolean | true |
WS Example
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adc="http://www.adcom.uci.edu"> <soapenv:Header/> <soapenv:Body> <adc:isValidKFSProjects> <kfsProjectList> <kfsProjCode>115</kfsProjCode> </kfsProjectList> <kfsProjectList> <kfsProjCode>116</kfsProjCode> </kfsProjectList> <kfsProjectList> <kfsProjCode>000</kfsProjCode> </kfsProjectList> </adc:isValidKFSProjects> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:isValidKFSProjectsResponse xmlns:ns2="http://www.adcom.uci.edu"> <return> <kfsProjCode>116</kfsProjCode> <valid>true</valid> </return> <return> <kfsProjCode>115</kfsProjCode> <valid>true</valid> </return> <return> <kfsProjCode>000</kfsProjCode> <valid>false</valid> </return> </ns2:isValidKFSProjectsResponse> </soap:Body> </soap:Envelope>
Java Client Example
DWHServerService dss = new DWHServerService(); DWHServer ds = dss.getDWHServerPort(); ArrayList<ProjectParameters> pl14 = new ArrayList<ProjectParameters>(); ProjectParameters pp140 = new ProjectParameters(); pp140.setKfsProjCode("115"); ProjectParameters pp141 = new ProjectParameters(); pp141.setKfsProjCode("116"); ProjectParameters pp142 = new ProjectParameters(); pp142.setKfsProjCode("000"); pl14.add(pp140); pl14.add(pp141); pl14.add(pp142); List<ProjectValidation> resultList14 = ds.isValidKFSProjects(pl14); System.out.println("\nWSClient--isValidKFSProjects()"); for (Iterator i = resultList14.iterator(); i.hasNext();) { ProjectValidation element = (ProjectValidation) i.next(); System.out.println("\t" + element.getKfsProjCode() + ": " + element.isValid()); }
getValidKFSProjects(List of (kfsProjectCode))
This service is used to return all active KFS Project details.
Input Specifications
Parameter | Description | Required? | Data Type (max length) | Example |
---|---|---|---|---|
kfsProjCode | KFS Project Number | Yes | String(10) | '1234567890' |
DB Query
SELECT p.PROJECT_CD, p.PROJ_MGR_UNVL_ID, p.PROJECT_NM, p.FIN_COA_CD, p.ORG_CD, p.PROJ_ACTIVE_CD, p.PROJECT_DESC FROM dwhs_ods..ca_project_t p WHERE p.proj_active_cd <> 'N' and p.PROJECT_CD in ('<kfsProjectCode>');
Result Schema: A list of following elements (ProjectDetails.java)
DB Parameter | Java Parameter | Description | Data Type | Example |
---|---|---|---|---|
PROJECT_CD | kfsProjCode | KFS Project Code | String (10) | '1234567890' |
PROJ_MGR_UNVL_ID | kfsProjManagerId | The User ID of the person responsible for the project | String(10) | |
PROJECT_NM | kfsProjName | The long descriptive name of the project | String(40) | |
FIN_COA_CD | kfsChartCode | The chart code associated with the organization assigned to the project code | String(2) | |
ORG_CD | kfsOrgCode | The organization code associated with the project | String(4) | |
PROJ_ACTIVE_CD | kfsProjActiveCode | Indicates if the project is active. | String(1) | |
PROJECT_DESC | kfsProjDesc | The text description describing the purpose of the project code | String(400) |
WS Example
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adc="http://www.adcom.uci.edu"> <soapenv:Header/> <soapenv:Body> <adc:getValidKFSProjects> <kfsProjectList> <kfsProjCode>115</kfsProjCode> </kfsProjectList> <kfsProjectList> <kfsProjCode>116</kfsProjCode> </kfsProjectList> <kfsProjectList> <kfsProjCode>000</kfsProjCode> </kfsProjectList> </adc:getValidKFSProjects> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:getValidKFSProjectsResponse xmlns:ns2="http://www.adcom.uci.edu"> <return> <kfsChartCode>IR</kfsChartCode> <kfsOrgCode>9002</kfsOrgCode> <kfsProjActiveCode>Y</kfsProjActiveCode> <kfsProjCode>115</kfsProjCode> <kfsProjDesc>SS I</kfsProjDesc> <kfsProjName>SS I</kfsProjName> </return> <return> <kfsChartCode>IR</kfsChartCode> <kfsOrgCode>9002</kfsOrgCode> <kfsProjActiveCode>Y</kfsProjActiveCode> <kfsProjCode>116</kfsProjCode> <kfsProjDesc>SS II</kfsProjDesc> <kfsProjName>SS II</kfsProjName> </return> </ns2:getValidKFSProjectsResponse> </soap:Body> </soap:Envelope>
Java Client Example
DWHServerService dss = new DWHServerService(); DWHServer ds = dss.getDWHServerPort(); ArrayList<ProjectParameters> pl14 = new ArrayList<ProjectParameters>(); ProjectParameters pp140 = new ProjectParameters(); pp140.setKfsProjCode("115"); ProjectParameters pp141 = new ProjectParameters(); pp141.setKfsProjCode("116"); ProjectParameters pp142 = new ProjectParameters(); pp142.setKfsProjCode("000"); pl14.add(pp140); pl14.add(pp141); pl14.add(pp142); List<ProjectDetails> resultList15 = ds.getValidKFSProjects(pl14); System.out.println("\nWSClient--getValidKFSProjects()"); for (Iterator i = resultList15.iterator(); i.hasNext();) { ProjectDetails element = (ProjectDetails) i.next(); System.out.println("\t" + element.getKfsProjCode() + ": " + element.getKfsProjDesc()); }
getAllKFSProjects()
No input parameter, ALL projects will be returned in result set.
DB Query
SELECT p.PROJECT_CD, p.PROJ_MGR_UNVL_ID, p.PROJECT_NM, p.FIN_COA_CD, p.ORG_CD, p.PROJ_ACTIVE_CD, p.PROJECT_DESC FROM dwhs_ods..ca_project_t p WHERE p.proj_active_cd <> 'N';
Result Schema: Same as getValidKfsProjects
WS Example
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adc="http://www.adcom.uci.edu"> <soapenv:Header/> <soapenv:Body> <adc:getAllKFSProjects/> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:getAllKFSProjectsResponse xmlns:ns2="http://www.adcom.uci.edu"> <return> <kfsChartCode>IR</kfsChartCode> <kfsOrgCode>9002</kfsOrgCode> <kfsProjActiveCode>Y</kfsProjActiveCode> <kfsProjCode>112</kfsProjCode> <kfsProjDesc>FALL 2011</kfsProjDesc> <kfsProjName>FALL 2011</kfsProjName> </return> <return> <kfsChartCode>IR</kfsChartCode> <kfsOrgCode>9002</kfsOrgCode> <kfsProjActiveCode>Y</kfsProjActiveCode> <kfsProjCode>113</kfsProjCode> <kfsProjDesc>WINTER 2011</kfsProjDesc> <kfsProjName>WINTER 2011</kfsProjName> </return> ... ... ... <return> <kfsChartCode>IR</kfsChartCode> <kfsOrgCode>9002</kfsOrgCode> <kfsProjActiveCode>Y</kfsProjActiveCode> <kfsProjCode>20S</kfsProjCode> <kfsProjDesc>SPRING 2020 SEMESTER</kfsProjDesc> <kfsProjName>SPRING 2020 SEMESTER</kfsProjName> </return> </ns2:getAllKFSProjectsResponse> </soap:Body> </soap:Envelope>
Java Client Example
DWHServerService dss = new DWHServerService(); DWHServer ds = dss.getDWHServerPort(); List<ProjectDetails> resultList16 = ds.getAllKFSProjects(); System.out.println("\nWSClient-getAllKFSProjects()"); // for (Iterator i = resultList16.iterator(); i.hasNext();) { // ProjectDetails element = (ProjectDetails)i.next(); // System.out.println("\t" + element.getKfsProjCode() + ": " + // element.getKfsProjDesc()); // } if (resultList16 != null) { System.out.println("getAllProj-total size: " + resultList16.size()); System.out.println("getAllProj-1st item ProjCode / ProjName / ProjDesc: " + ((ProjectDetails)resultList16.get(0)).getKfsProjCode() + " / " + ((ProjectDetails)resultList16.get(0)).getKfsProjName() + " / " + ((ProjectDetails)resultList16.get(0)).getKfsProjDesc()); } else { System.out.println("something bad happened...please check your query"); }