
br.com.esec.icpm.libs.signature.helper.RequestStatusHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of certillion-client-library Show documentation
Show all versions of certillion-client-library Show documentation
This library is used to make integration with Certillion server, so our Clients can easily ask for signatures or generate certificates.
package br.com.esec.icpm.libs.signature.helper;
import br.com.esec.icpm.libs.Server;
import br.com.esec.icpm.libs.signature.ApWsFactory;
import br.com.esec.icpm.mss.ws.BatchSignatureTIDsRespType;
import br.com.esec.icpm.mss.ws.SignaturePortType;
import br.com.esec.icpm.mss.ws.SignatureStatusReqType;
import br.com.esec.icpm.mss.ws.SignatureStatusRespType;
import br.com.esec.icpm.server.ws.ICPMException;
// TODO: Pegar todas as ICPMException e encapsular em SignatureException mais legiveis e padronizadas.
public class RequestStatusHelper {
public static SignatureStatusRespType requestStatus(Server server, long transactionId) throws ICPMException {
SignaturePortType signatureService = ApWsFactory.getInstance().getSoapService(server);
SignatureStatusReqType signatureStatusReq = new SignatureStatusReqType();
signatureStatusReq.setTransactionId(transactionId);
return signatureService.statusQuery(signatureStatusReq);
}
public static BatchSignatureTIDsRespType requestBatchStatus(Server server, long transactionId) throws ICPMException {
SignaturePortType signaturePort = ApWsFactory.getInstance().getSoapService(server);
SignatureStatusReqType signatureStatusReq = new SignatureStatusReqType();
signatureStatusReq.setTransactionId(transactionId);
return signaturePort.batchSignatureTIDsStatus(signatureStatusReq);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy