aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-05-08 14:11:55 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-05-08 14:11:55 +0200
commit1d5e1f5f429d225e14f4ce9e6e82a403eac10b6b (patch)
treeec2abe98cc365bcd170fcf420ed45288cbfb7e72 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws
parent5e65a0aa96300e24a6dc7d4be64cf6745f325fc5 (diff)
downloadpdf-as-4-1d5e1f5f429d225e14f4ce9e6e82a403eac10b6b.tar.gz
pdf-as-4-1d5e1f5f429d225e14f4ce9e6e82a403eac10b6b.tar.bz2
pdf-as-4-1d5e1f5f429d225e14f4ce9e6e82a403eac10b6b.zip
Performance Test, Web Options
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
index c8283d28..07ffd7c4 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
@@ -28,6 +28,7 @@ public class PDFASSigningImpl implements PDFASSigning {
public byte[] signPDFDokument(byte[] inputDocument,
PDFASSignParameters parameters) {
+ checkSoapSignEnabled();
try {
return PdfAsHelper.synchornousServerSignature(inputDocument,
parameters);
@@ -42,6 +43,7 @@ public class PDFASSigningImpl implements PDFASSigning {
}
public PDFASSignResponse signPDFDokument(PDFASSignRequest request) {
+ checkSoapSignEnabled();
if (request == null) {
logger.warn("SOAP Sign Request is null!");
return null;
@@ -62,6 +64,7 @@ public class PDFASSigningImpl implements PDFASSigning {
}
public PDFASBulkSignResponse signPDFDokument(PDFASBulkSignRequest request) {
+ checkSoapSignEnabled();
List<PDFASSignResponse> responses = new ArrayList<PDFASSignResponse>();
if (request.getSignRequests() != null) {
for (int i = 0; i < request.getSignRequests().size(); i++) {
@@ -83,4 +86,10 @@ public class PDFASSigningImpl implements PDFASSigning {
}
}
+ private void checkSoapSignEnabled() {
+ if(!WebConfiguration.getSoapSignEnabled()) {
+ throw new WebServiceException("Service disabled!");
+ }
+ }
+
}