From 6a588fa992b35eb3e31a3f183cbb7639288d2a57 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 7 May 2014 09:27:33 +0200 Subject: XML Elements renaming for SOAP service --- .../gv/egiz/pdfas/api/ws/PDFASBulkSignRequest.java | 27 ++++++++++++++++++++++ .../egiz/pdfas/api/ws/PDFASBulkSignResponse.java | 27 ++++++++++++++++++++++ .../gv/egiz/pdfas/api/ws/PDFASSignParameters.java | 9 +++++--- .../at/gv/egiz/pdfas/api/ws/PDFASSignRequest.java | 8 ++++--- .../at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java | 8 ++++--- .../java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java | 6 ++++- 6 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignRequest.java create mode 100644 pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignResponse.java (limited to 'pdf-as-common') diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignRequest.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignRequest.java new file mode 100644 index 00000000..01fe8db3 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignRequest.java @@ -0,0 +1,27 @@ +package at.gv.egiz.pdfas.api.ws; + +import java.io.Serializable; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlType(name="BulkSignRequest") +public class PDFASBulkSignRequest implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 2335377335418211956L; + + List signRequests; + + @XmlElement(required = true, nillable = false, name="signRequests") + public List getSignRequests() { + return signRequests; + } + + public void setSignRequests(List signRequests) { + this.signRequests = signRequests; + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignResponse.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignResponse.java new file mode 100644 index 00000000..c89a1498 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASBulkSignResponse.java @@ -0,0 +1,27 @@ +package at.gv.egiz.pdfas.api.ws; + +import java.io.Serializable; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlType(name="BulkSignResponse") +public class PDFASBulkSignResponse implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 4218977934947700835L; + + List signResponses; + + @XmlElement(required = true, nillable = false, name="signResponses") + public List getSignResponses() { + return signResponses; + } + + public void setSignResponses(List signResponses) { + this.signResponses = signResponses; + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java index 070ca473..4f626e17 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java @@ -3,7 +3,9 @@ package at.gv.egiz.pdfas.api.ws; import java.io.Serializable; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlType(name="SignParameters") public class PDFASSignParameters implements Serializable { /** @@ -11,6 +13,7 @@ public class PDFASSignParameters implements Serializable { */ private static final long serialVersionUID = -2375108993871456465L; + @XmlType(name="Connector") public enum Connector { JKS, MOA @@ -25,7 +28,7 @@ public class PDFASSignParameters implements Serializable { String profile; - @XmlElement(required = true, nillable = false) + @XmlElement(required = true, nillable = false, name="connector") public Connector getConnector() { return connector; } @@ -34,7 +37,7 @@ public class PDFASSignParameters implements Serializable { this.connector = connector; } - @XmlElement(required = false, nillable = true) + @XmlElement(required = false, nillable = true, name="position") public String getPosition() { return position; } @@ -42,7 +45,7 @@ public class PDFASSignParameters implements Serializable { this.position = position; } - @XmlElement(required = false, nillable = true) + @XmlElement(required = false, nillable = true, name="profile") public String getProfile() { return profile; } diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignRequest.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignRequest.java index c875171d..e0d87004 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignRequest.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignRequest.java @@ -3,7 +3,9 @@ package at.gv.egiz.pdfas.api.ws; import java.io.Serializable; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlType(name="SignRequest") public class PDFASSignRequest implements Serializable { /** @@ -15,7 +17,7 @@ public class PDFASSignRequest implements Serializable { byte[] inputData; PDFASSignParameters parameters; - @XmlElement(required = true, nillable = false) + @XmlElement(required = true, nillable = false, name="requestID") public String getRequestID() { return requestID; } @@ -24,7 +26,7 @@ public class PDFASSignRequest implements Serializable { this.requestID = requestID; } - @XmlElement(required = true, nillable = false) + @XmlElement(required = true, nillable = false, name="inputData") public byte[] getInputData() { return inputData; } @@ -33,7 +35,7 @@ public class PDFASSignRequest implements Serializable { this.inputData = inputData; } - @XmlElement(required = true, nillable = false) + @XmlElement(required = true, nillable = false, name="parameters") public PDFASSignParameters getParameters() { return parameters; } diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java index a27d1afe..1da4fa98 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java @@ -3,7 +3,9 @@ package at.gv.egiz.pdfas.api.ws; import java.io.Serializable; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlType(name="SignResponse") public class PDFASSignResponse implements Serializable { /** @@ -15,7 +17,7 @@ public class PDFASSignResponse implements Serializable { String error; byte[] signedPDF; - @XmlElement(required = true, nillable = false) + @XmlElement(required = true, nillable = false, name="requestID") public String getRequestID() { return requestID; } @@ -23,7 +25,7 @@ public class PDFASSignResponse implements Serializable { this.requestID = requestID; } - @XmlElement(required = false, nillable = false) + @XmlElement(required = false, nillable = false, name="signedPDF") public byte[] getSignedPDF() { return signedPDF; } @@ -31,7 +33,7 @@ public class PDFASSignResponse implements Serializable { this.signedPDF = signedPDF; } - @XmlElement(required = false) + @XmlElement(required = false, name="error") public String getError() { return error; } diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java index 5d283cf7..63049bc5 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java @@ -2,6 +2,7 @@ package at.gv.egiz.pdfas.api.ws; import javax.jws.WebMethod; import javax.jws.WebParam; +import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; @@ -10,11 +11,14 @@ import javax.jws.soap.SOAPBinding.Style; @SOAPBinding(style = Style.RPC) public interface PDFASSigning { @WebMethod(operationName = "sign") + @WebResult(name="signedPDF") public byte[] signPDFDokument(@WebParam(name = "pdfDocument")byte[] inputDocument, @WebParam(name = "parameters")PDFASSignParameters parameters); @WebMethod(operationName = "signSingle") + @WebResult(name="signResponse") public PDFASSignResponse signPDFDokument(@WebParam(name = "signRequest") PDFASSignRequest request); @WebMethod(operationName = "signBulk") - public PDFASSignResponse[] signPDFDokument(@WebParam(name = "signRequests") PDFASSignRequest[] request); + @WebResult(name="bulkResponse") + public PDFASBulkSignResponse signPDFDokument(@WebParam(name = "signBulkRequest") PDFASBulkSignRequest request); } -- cgit v1.2.3