aboutsummaryrefslogtreecommitdiff
path: root/DocumentService/src/eu/stork/documentservice/DocumentService.java
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2014-06-04 18:50:50 +0200
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2014-06-04 18:56:07 +0200
commitf81b3716ac27094ab1845668cb38a1fe6a2d5f8c (patch)
tree933cd9ae96e6c7c01b78aea37b904b31419b1b0f /DocumentService/src/eu/stork/documentservice/DocumentService.java
parent31c8bad4214bfee45eef0ca98faf3f6f32fe5b23 (diff)
downloadmoa-id-spss-f81b3716ac27094ab1845668cb38a1fe6a2d5f8c.tar.gz
moa-id-spss-f81b3716ac27094ab1845668cb38a1fe6a2d5f8c.tar.bz2
moa-id-spss-f81b3716ac27094ab1845668cb38a1fe6a2d5f8c.zip
added DocumentService
Diffstat (limited to 'DocumentService/src/eu/stork/documentservice/DocumentService.java')
-rw-r--r--DocumentService/src/eu/stork/documentservice/DocumentService.java83
1 files changed, 83 insertions, 0 deletions
diff --git a/DocumentService/src/eu/stork/documentservice/DocumentService.java b/DocumentService/src/eu/stork/documentservice/DocumentService.java
new file mode 100644
index 000000000..9c539312e
--- /dev/null
+++ b/DocumentService/src/eu/stork/documentservice/DocumentService.java
@@ -0,0 +1,83 @@
+package eu.stork.documentservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+import javax.jws.soap.SOAPBinding.Use;
+import javax.xml.ws.soap.MTOM;
+
+@MTOM
+@WebService(name = "DocumentService", targetNamespace = "http://stork.eu")
+@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL)
+/**
+ *
+ * @author Advania
+ *
+ */
+public interface DocumentService {
+
+ /**
+ * Add document to DTL layer
+ * @param document the document to add
+ * @param xmlRequest the original dss xml request
+ * @param country the destination country
+ * @param SpId the sp id
+ * @param mimeType the document mime type
+ * @param receiverCert the receiver certificate (for encryption, not implemented now)
+ * @return the document id (docId)
+ */
+ @WebMethod(operationName = "addDocument")
+ public String addDocument(byte[] document, String xmlRequest, String country, String SpId, String mimeType, String receiverCert);
+
+ /**
+ * Get document from DTL
+ * @param documentTransferRequest the document transfer request (attribute query saml)
+ * @param dtlUrl the url of dtl
+ * @return the document found
+ */
+ @WebMethod(operationName = "getDocument")
+ public byte[] getDocument(String documentTransferRequest, String dtlUrl);
+
+ /**
+ * Get document mime type of document
+ * @param docId the document id
+ * @param dtlUrl the url of dtl
+ * @return the document mime type
+ */
+ @WebMethod(operationName = "getDocumentMime")
+ public String getDocumentMime(String docId, String dtlUrl);
+
+ /**
+ * Update document in dtl
+ * @param docId the id of document (docId)
+ * @param xmlResponse the dss xml response
+ * @param document the document data
+ * @return true if successful
+ */
+ @WebMethod(operationName = "updateDocument")
+ public boolean updateDocument(String docId, String xmlResponse, byte[] document);
+
+ /**
+ * Add document to DTL layer which SP has uploaded
+ * @param docId the document ID of document
+ * @param xmlRequest the original dss xml request
+ * @param country the destination country
+ * @param SpId the sp id
+ * @param mimeType the document mime type
+ * @param receiverCert the receiver certificate (for encryption, not implemented now)
+ * @return the full document ID
+ */
+ @WebMethod(operationName = "addSPDocument")
+ public String addSPDocument(String docId, String xmlRequest, String country, String SpId, String receiverCert);
+
+ /**
+ * Update document in DTL and prepare for SP
+ * @param documentTransferRequest the document transfer request (attribute query saml)
+ * @param dtlUrl the url of the dtl
+ * @param xmlResponse the xml response
+ * @return true if successful
+ */
+ @WebMethod(operationName = "updateSPDocument")
+ public boolean updateSPDocument(String documentTransferRequest, String dtlUrl, String xmlResponse);
+}