diff options
4 files changed, 74 insertions, 4 deletions
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 new file mode 100644 index 00000000..070ca473 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignParameters.java @@ -0,0 +1,55 @@ +package at.gv.egiz.pdfas.api.ws; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlElement; + +public class PDFASSignParameters implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -2375108993871456465L; + + public enum Connector { + JKS, + MOA + } + + + Connector connector; + + + String position; + + + String profile; + + @XmlElement(required = true, nillable = false) + public Connector getConnector() { + return connector; + } + + public void setConnector(Connector connector) { + this.connector = connector; + } + + @XmlElement(required = false, nillable = true) + public String getPosition() { + return position; + } + public void setPosition(String position) { + this.position = position; + } + + @XmlElement(required = false, nillable = true) + public String getProfile() { + return profile; + } + public void setProfile(String profile) { + this.profile = profile; + } + + + +} 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 new file mode 100644 index 00000000..aa37cf69 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSigning.java @@ -0,0 +1,14 @@ +package at.gv.egiz.pdfas.api.ws; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.Style; + +@WebService +@SOAPBinding(style = Style.RPC) +public interface PDFASSigning { + @WebMethod(operationName = "sign") + public byte[] signPDFDokument(@WebParam(name = "pdfDocument")byte[] inputDocument, @WebParam(name = "parameters")PDFASSignParameters parameters); +} diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index 75c98610..5c0f94c4 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -41,6 +41,8 @@ import org.apache.commons.lang3.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import at.gv.egiz.pdfas.api.ws.PDFASSignParameters; +import at.gv.egiz.pdfas.api.ws.PDFASSignParameters.Connector; import at.gv.egiz.pdfas.lib.api.ByteArrayDataSink; import at.gv.egiz.pdfas.lib.api.ByteArrayDataSource; import at.gv.egiz.pdfas.lib.api.Configuration; @@ -57,9 +59,6 @@ import at.gv.egiz.pdfas.sigs.pades.PAdESSigner; import at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedSigner; import at.gv.egiz.pdfas.web.config.WebConfiguration; import at.gv.egiz.pdfas.web.exception.PdfAsWebException; -import at.gv.egiz.pdfas.web.ws.PDFASSignParameters; -import at.gv.egiz.pdfas.web.ws.PDFASSignParameters.Connector; -import at.gv.egiz.sl.schema.CreateCMSSignatureRequestType; import at.gv.egiz.sl.schema.CreateCMSSignatureResponseType; import at.gv.egiz.sl.schema.InfoboxAssocArrayPairType; import at.gv.egiz.sl.schema.InfoboxReadRequestType; 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 39c6c24d..96829b26 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 @@ -7,11 +7,13 @@ import javax.xml.ws.soap.MTOM; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import at.gv.egiz.pdfas.api.ws.PDFASSignParameters; +import at.gv.egiz.pdfas.api.ws.PDFASSigning; import at.gv.egiz.pdfas.web.config.WebConfiguration; import at.gv.egiz.pdfas.web.helper.PdfAsHelper; @MTOM -@WebService(endpointInterface = "at.gv.egiz.pdfas.web.ws.PDFASSigning") +@WebService(endpointInterface = "at.gv.egiz.pdfas.api.ws.PDFASSigning") public class PDFASSigningImpl implements PDFASSigning { private static final Logger logger = LoggerFactory |