diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-07-15 18:50:42 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-07-15 18:50:42 +0200 |
commit | 8b69a68f80ce64da4bc68f9d03a17113d48a0599 (patch) | |
tree | 4ecdb9f7fd82ea0b1eee0be410e56c69438094b9 /pdf-as-web-client/src/main/java/at/gv/egiz/pdfas | |
parent | 308bb7903ca0a293438bf4039a194ec098645ffd (diff) | |
download | pdf-as-4-8b69a68f80ce64da4bc68f9d03a17113d48a0599.tar.gz pdf-as-4-8b69a68f80ce64da4bc68f9d03a17113d48a0599.tar.bz2 pdf-as-4-8b69a68f80ce64da4bc68f9d03a17113d48a0599.zip |
Verify per SOAP Service
Diffstat (limited to 'pdf-as-web-client/src/main/java/at/gv/egiz/pdfas')
-rw-r--r-- | pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java | 3 | ||||
-rw-r--r-- | pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFVerifier.java | 35 |
2 files changed, 35 insertions, 3 deletions
diff --git a/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java index 8906a980..e65cf98a 100644 --- a/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java +++ b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java @@ -32,20 +32,17 @@ import javax.xml.ws.soap.SOAPBinding; import at.gv.egiz.pdfas.api.ws.PDFASBulkSignRequest; import at.gv.egiz.pdfas.api.ws.PDFASBulkSignResponse; -import at.gv.egiz.pdfas.api.ws.PDFASSignParameters; import at.gv.egiz.pdfas.api.ws.PDFASSignRequest; import at.gv.egiz.pdfas.api.ws.PDFASSignResponse; import at.gv.egiz.pdfas.api.ws.PDFASSigning; public class RemotePDFSigner implements PDFASSigning { - private URL urlEndpoint; private Service service; private PDFASSigning proxy; public RemotePDFSigner(URL endpoint, boolean useMTOM) { - this.urlEndpoint = endpoint; QName qname = new QName("http://ws.web.pdfas.egiz.gv.at/", "PDFASSigningImplService"); service = Service.create(endpoint, qname); diff --git a/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFVerifier.java b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFVerifier.java new file mode 100644 index 00000000..25561577 --- /dev/null +++ b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFVerifier.java @@ -0,0 +1,35 @@ +package at.gv.egiz.pdfas.web.client; + +import java.net.URL; + +import javax.xml.namespace.QName; +import javax.xml.ws.BindingProvider; +import javax.xml.ws.Service; +import javax.xml.ws.soap.SOAPBinding; + +import at.gv.egiz.pdfas.api.ws.PDFASVerification; +import at.gv.egiz.pdfas.api.ws.PDFASVerifyRequest; +import at.gv.egiz.pdfas.api.ws.PDFASVerifyResponse; + +public class RemotePDFVerifier implements PDFASVerification { + + private Service service; + + private PDFASVerification proxy; + + public RemotePDFVerifier(URL endpoint, boolean useMTOM) { + QName qname = new QName("http://ws.web.pdfas.egiz.gv.at/", + "PDFASVerificationImplService"); + service = Service.create(endpoint, qname); + + proxy = service.getPort(PDFASVerification.class); + + BindingProvider bp = (BindingProvider) proxy; + SOAPBinding binding = (SOAPBinding) bp.getBinding(); + binding.setMTOMEnabled(useMTOM); + } + + public PDFASVerifyResponse verifyPDFDokument(PDFASVerifyRequest request) { + return proxy.verifyPDFDokument(request); + } +} |