diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-05-07 09:27:33 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-05-07 09:27:33 +0200 |
commit | 6a588fa992b35eb3e31a3f183cbb7639288d2a57 (patch) | |
tree | 6cf8878350c27b27a7c3ed5ec9e08d5f8a38f910 /pdf-as-web-client/src | |
parent | e9410c03edfcfee9b6aa6dc5a27d6532292d72d8 (diff) | |
download | pdf-as-4-6a588fa992b35eb3e31a3f183cbb7639288d2a57.tar.gz pdf-as-4-6a588fa992b35eb3e31a3f183cbb7639288d2a57.tar.bz2 pdf-as-4-6a588fa992b35eb3e31a3f183cbb7639288d2a57.zip |
XML Elements renaming for SOAP service
Diffstat (limited to 'pdf-as-web-client/src')
-rw-r--r-- | pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java | 4 | ||||
-rw-r--r-- | pdf-as-web-client/src/test/java/at/gv/egiz/pdfas/web/client/test/SimpleTest.java | 21 |
2 files changed, 17 insertions, 8 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 0a019152..456a3aaa 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 @@ -7,6 +7,8 @@ import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; 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; @@ -41,7 +43,7 @@ public class RemotePDFSigner implements PDFASSigning { return proxy.signPDFDokument(request); } - public PDFASSignResponse[] signPDFDokument(PDFASSignRequest[] request) { + public PDFASBulkSignResponse signPDFDokument(PDFASBulkSignRequest request) { return proxy.signPDFDokument(request); } diff --git a/pdf-as-web-client/src/test/java/at/gv/egiz/pdfas/web/client/test/SimpleTest.java b/pdf-as-web-client/src/test/java/at/gv/egiz/pdfas/web/client/test/SimpleTest.java index aa672701..161e45cc 100644 --- a/pdf-as-web-client/src/test/java/at/gv/egiz/pdfas/web/client/test/SimpleTest.java +++ b/pdf-as-web-client/src/test/java/at/gv/egiz/pdfas/web/client/test/SimpleTest.java @@ -3,13 +3,17 @@ package at.gv.egiz.pdfas.web.client.test; import java.io.FileInputStream; import java.io.FileOutputStream; import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import sun.misc.IOUtils; +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.PDFASSignParameters.Connector; import at.gv.egiz.pdfas.api.ws.PDFASSignRequest; import at.gv.egiz.pdfas.api.ws.PDFASSignResponse; import at.gv.egiz.pdfas.web.client.RemotePDFSigner; -import sun.misc.IOUtils; public class SimpleTest { @@ -58,16 +62,19 @@ public class SimpleTest { System.out.println("ERROR: " + response.getError()); } - PDFASSignRequest[] bulk = new PDFASSignRequest[20]; - for(int i = 0; i < bulk.length; i++) { - bulk[i] = request; + List<PDFASSignRequest> bulk = new ArrayList<PDFASSignRequest>(); + for(int i = 0; i < 10; i++) { + bulk.add(request); } + PDFASBulkSignRequest bulkRequest = new PDFASBulkSignRequest(); + bulkRequest.setSignRequests(bulk); + System.out.println("Bulk Request:"); - PDFASSignResponse[] responses = signer.signPDFDokument(bulk); + PDFASBulkSignResponse responses = signer.signPDFDokument(bulkRequest); - for(int i = 0; i < responses.length; i++) { - PDFASSignResponse bulkresponse = responses[i]; + for(int i = 0; i < responses.getSignResponses().size(); i++) { + PDFASSignResponse bulkresponse = responses.getSignResponses().get(i); System.out.println("ID: " + bulkresponse.getRequestID()); if (bulkresponse.getSignedPDF() != null) { |