All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.esec.icpm.libs.signature.helper.RequestStatusHelper Maven / Gradle / Ivy

Go to download

This library is used to make integration with Certillion server, so our Clients can easily ask for signatures or generate certificates.

There is a newer version: 1.2.0
Show newest version
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