use of javax.jws.WebMethod in project bamboobsc by billchen198318.
the class ApiWebServiceImpl method getScorecard1.
/**
* SOAP 請使用 SoapUI 來測試
* ==================================================================================
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.bsc.greenstep.netsteadfast.com/">
<soapenv:Header/>
<soapenv:Body>
<web:getScorecard1>
<visionOid>1089abb5-3faf-445d-88ff-cd7690ac6743</visionOid>
<startDate></startDate>
<endDate></endDate>
<startYearDate>2015</startYearDate>
<endYearDate>2016</endYearDate>
<frequency>6</frequency>
<dataFor>all</dataFor>
<measureDataOrganizationOid></measureDataOrganizationOid>
<measureDataEmployeeOid></measureDataEmployeeOid>
<contentFlag></contentFlag>
</web:getScorecard1>
</soapenv:Body>
</soapenv:Envelope>
* ==================================================================================
*
*
* REST 範例:
* curl -i -X GET "http://127.0.0.1:8080/gsbsc-web/services/jaxrs/scorecard1?visionOid=1089abb5-3faf-445d-88ff-cd7690ac6743&startDate=&endDate=&startYearDate=2015&endYearDate=2016&frequency=6&dataFor=all&measureDataOrganizationOid=&measureDataEmployeeOid=&contentFlag="
*
*/
@WebMethod
@GET
@Path("/scorecard1/")
@Override
public BscApiServiceResponse getScorecard1(@WebParam(name = "visionOid") @QueryParam("visionOid") String visionOid, @WebParam(name = "startDate") @QueryParam("startDate") String startDate, @WebParam(name = "endDate") @QueryParam("endDate") String endDate, @WebParam(name = "startYearDate") @QueryParam("startYearDate") String startYearDate, @WebParam(name = "endYearDate") @QueryParam("endYearDate") String endYearDate, @WebParam(name = "frequency") @QueryParam("frequency") String frequency, @WebParam(name = "dataFor") @QueryParam("dataFor") String dataFor, @WebParam(name = "measureDataOrganizationOid") @QueryParam("measureDataOrganizationOid") String measureDataOrganizationOid, @WebParam(name = "measureDataEmployeeOid") @QueryParam("measureDataEmployeeOid") String measureDataEmployeeOid, @WebParam(name = "contentFlag") @QueryParam("contentFlag") String contentFlag) throws Exception {
HttpServletRequest request = null;
if (this.getWebServiceContext() != null && this.getWebServiceContext().getMessageContext() != null) {
request = (HttpServletRequest) this.getWebServiceContext().getMessageContext().get(MessageContext.SERVLET_REQUEST);
}
Subject subject = null;
BscApiServiceResponse responseObj = new BscApiServiceResponse();
responseObj.setSuccess(YesNo.NO);
try {
subject = WsAuthenticateUtils.login();
this.processForScorecard(responseObj, request, visionOid, startDate, endDate, startYearDate, endYearDate, frequency, dataFor, measureDataOrganizationOid, measureDataEmployeeOid, contentFlag);
} catch (Exception e) {
responseObj.setMessage(e.getMessage());
} finally {
if (!YesNo.YES.equals(responseObj.getSuccess())) {
responseObj.setMessage(SysMessageUtil.get(GreenStepSysMsgConstants.SEARCH_NO_DATA));
}
WsAuthenticateUtils.logout(subject);
}
subject = null;
return responseObj;
}
use of javax.jws.WebMethod in project opentheso by miledrousset.
the class Soap method multiConceptToSkos.
/**
* Web service operation
* @param value
* @param idThesaurus
* @param lang
* @return
*/
@WebMethod(operationName = "multiConceptToSkos")
public String multiConceptToSkos(@WebParam(name = "value") String value, @WebParam(name = "idThesaurus") String idThesaurus, @WebParam(name = "lang") String lang) {
if (ds == null)
return null;
if (prefs == null)
return null;
ExportFromBDD exportFromBDD = new ExportFromBDD();
exportFromBDD.setServerArk(prefs.getProperty("serverArk"));
exportFromBDD.setServerAdress(prefs.getProperty("cheminSite"));
String skos = exportFromBDD.exportMultiConcept(ds, idThesaurus, value, lang).toString();
return skos;
}
use of javax.jws.WebMethod in project trainning by fernandotomasio.
the class AtividadesDeEnsinoService method findAllIndicacoesAlunoByPessoaId.
@WebMethod(operationName = "findAllIndicacoesAlunoByPessoaId")
public IndicacaoDTO[] findAllIndicacoesAlunoByPessoaId(@WebParam(name = "exercicio") int exercicio, @WebParam(name = "pessoaId") Long pessoaId) {
SimpleDateFormat df = new SimpleDateFormat("yyyy");
Date exercicioDate = null;
try {
exercicioDate = df.parse(String.valueOf(exercicio));
} catch (ParseException ex) {
Logger.getLogger(AtividadesDeEnsinoService.class.getName()).log(Level.SEVERE, null, ex);
}
IndicacaoDTO[] indicacoes = atividadesEnsinoService.findAllIndicacoesAlunoByPessoaId(exercicioDate, pessoaId);
return indicacoes;
}
use of javax.jws.WebMethod in project trainning by fernandotomasio.
the class AtividadesDeEnsinoService method findAllConcluidosByOrganizacao.
@WebMethod(operationName = "findAllConcluidosByOrganizacao")
public ConclusaoDTO[] findAllConcluidosByOrganizacao(@WebParam(name = "organizacaoId") Long organizacaoId, @WebParam(name = "capacitacaoId") Long capacitacaoId) {
List<ConclusaoDTO> concluidosList = new ArrayList<>();
ConclusaoDTO[] concluidos = atividadesEnsinoService.findAllConcluidosByOrganizacao(organizacaoId, capacitacaoId, true);
for (ConclusaoDTO concluido : concluidos) {
if (concluido.getPessoa().isAtivo()) {
concluidosList.add(concluido);
}
}
ConclusaoDTO[] result = new ConclusaoDTO[concluidosList.size()];
concluidosList.toArray(result);
return result;
}
use of javax.jws.WebMethod in project trainning by fernandotomasio.
the class AtividadesDeEnsinoService method findAllConcluidos.
@WebMethod(operationName = "findAllConcluidos")
public ConclusaoDTO[] findAllConcluidos(@WebParam(name = "organizacaoId") Long organizacaoId, @WebParam(name = "capacitacaoId") Long capacitacaoId, @WebParam(name = "turmaId") Long turmaId, @WebParam(name = "pessoaId") Long pessoaId, @WebParam(name = "includeSubordinadas") boolean includeSubordinadas) {
List<ConclusaoDTO> concluidosList = new ArrayList<>();
Long[] organizacoesIds = null;
if (organizacaoId != null) {
if (includeSubordinadas) {
OrganizacaoDTO[] subordinadas = organizationalService.findAllOrganizacoesSubordinadas(organizacaoId);
organizacoesIds = new Long[subordinadas.length + 1];
for (int i = 0; i < subordinadas.length; i++) {
organizacoesIds[i] = subordinadas[i].getId();
}
organizacoesIds[subordinadas.length] = organizacaoId;
} else {
organizacoesIds = new Long[1];
organizacoesIds[0] = organizacaoId;
}
}
ConclusaoDTO[] concluidos = atividadesEnsinoService.findAllConcluidos(organizacoesIds, capacitacaoId, turmaId, pessoaId, true);
for (ConclusaoDTO concluido : concluidos) {
if (concluido.getPessoa().isAtivo()) {
concluidosList.add(concluido);
}
}
ConclusaoDTO[] result = new ConclusaoDTO[concluidosList.size()];
concluidosList.toArray(result);
return result;
}
Aggregations