diff --git a/assemblies/coala/WebContent/META-INF/MANIFEST.MF b/assemblies/coala/WebContent/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..5e94951
--- /dev/null
+++ b/assemblies/coala/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/assemblies/coala/pom.xml b/assemblies/coala/pom.xml
index 8fcd2c8..4744e0d 100644
--- a/assemblies/coala/pom.xml
+++ b/assemblies/coala/pom.xml
@@ -101,6 +101,10 @@
org.springframework
spring-test
+
+ org.springframework
+ spring-web
+
com.google.guava
@@ -125,5 +129,15 @@
+
+
+
+ maven-eclipse-plugin
+
+ 1.5
+
+
+
+
diff --git a/assemblies/coala/src/main/config/ehf-authentication-context.xml b/assemblies/coala/src/main/config/ehf-authentication-context.xml
deleted file mode 100644
index c3f91d2..0000000
--- a/assemblies/coala/src/main/config/ehf-authentication-context.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assemblies/coala/src/main/config/ehf-ipf-context.xml b/assemblies/coala/src/main/config/ehf-ipf-context.xml
deleted file mode 100644
index fb93fae..0000000
--- a/assemblies/coala/src/main/config/ehf-ipf-context.xml
+++ /dev/null
@@ -1,224 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @@@camel.route.fragment@@@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .*_EXPORT_.*
- .*_EXPORT1024_.*
- .*_WITH_DES_.*
- .*_WITH_NULL_.*
- .*_DH_anon_.*
-
-
-
- xdsRegister
- Pass1234_
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .*_EXPORT_.*
- .*_EXPORT1024_.*
- .*_WITH_DES_.*
- .*_WITH_NULL_.*
- .*_DH_anon_.*
-
-
-
- xdsUser
- Pass1234_
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PROPAGATION_REQUIRES_NEW
-
-
-
-
-
-
diff --git a/assemblies/coala/src/main/config/ehf-system-context.xml b/assemblies/coala/src/main/config/ehf-system-context.xml
deleted file mode 100644
index 5967d3d..0000000
--- a/assemblies/coala/src/main/config/ehf-system-context.xml
+++ /dev/null
@@ -1,541 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @@@hibernate.sessionFactory.cfg.fragment@@@
-
-
-
-
-
-
-
- @@connection.dialect@@
- false
- false
- org.hibernate.cache.HashtableCacheProvider
- @@connection.jdbc.batch.size@@
- false
- @@connection.schema.prefix@@
- @@connection.schema.suffix@@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getConnection,getMaxConnectionAge,close,getUsername,getMaxActive,setMaxActive,setUsername,
- getLogWriter,getLoginTimeout,setLogWriter,setLoginTimeout,getUrl,getDefaultAutoCommit,
- setDefaultAutoCommit,getDefaultReadOnly,getDefaultTransactionIsolation,setDefaultTransactionIsolation,
- getDefaultCatalog,setDefaultCatalog,getDriverClassName,setDriverClassName,getMaxIdle,setMaxIdle,
- getInitialSize,setInitialSize,getMaxWait,setMaxWait,isPoolPreparedStatement,setPoolPreparedStatements,
- getMaxOpenPreparedStatements,setMaxOpenPreparedStatements,getTestOnBorrow,setTestOnBorrow,getTestOnReturn,
- setTestOnReturn,getTimeBetweenEvictionRunsMillis,setTimeBetweenEvictionRunsMillis,getNumTestsPerEvictionRun,
- setNumTestsPerEvictionRun,getMinEvictableIdleTimeMillis,setMinEvictableIdleTimeMillis,getTestWhileIdle,
- setTestWhileIdle,getNumActive,getNumIdle,setUrl,getValidationQuery,setValidationQuery,
- isAccessToUnderlyingConnectionAllowed,setAccessToUnderlyingConnectionAllowed,getRemoveAbandoned,
- setRemoveAbandoned,getRemoveAbandonedTimeout,setRemoveAbandonedTimeout,getLogAbandoned,setLogAbandoned,
- addConnectionProperty,removeConnectionProperty,unwrap,isWrapperFor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @@context.postpone.shutdown.millis@@
-
-
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/context.params.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/context.params.fragment
deleted file mode 100644
index 68907f0..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/context.params.fragment
+++ /dev/null
@@ -1,15 +0,0 @@
-
- com.icw.ehf.commons.codesystem.CodeResolver.NAME
- cachedCodeResolver
-
-
-
- javax.faces.FACELETS_SKIP_COMMENTS
- true
-
-
-
-
-
-
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/error.page.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/error.page.fragment
deleted file mode 100644
index cd9a969..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/error.page.fragment
+++ /dev/null
@@ -1,20 +0,0 @@
-
- 500
- /error500.xhtml
-
-
- 401
- /error401.xhtml
-
-
- 403
- /error403.xhtml
-
-
- 404
- /error404.xhtml
-
-
- java.lang.Exception
- /errorexception.xhtml
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.fragment
deleted file mode 100644
index 1d63d99..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.fragment
+++ /dev/null
@@ -1,28 +0,0 @@
-
- filterChain
- org.springframework.web.filter.DelegatingFilterProxy
-
-
-
- EnableCacheFilter
- com.icw.ehf.commons.web.filter.EnableCacheFilter
-
- expire
-
- 300
-
-
-
-
-
- utf8EncodingFilter
- org.springframework.web.filter.CharacterEncodingFilter
-
- encoding
- UTF-8
-
-
- forceEncoding
- true
-
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.mapping.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.mapping.fragment
deleted file mode 100644
index 8a233a9..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/filters.mapping.fragment
+++ /dev/null
@@ -1,26 +0,0 @@
-
- filterChain
- /*
-
-
- EnableCacheFilter
- *.png
-
-
- EnableCacheFilter
- *.gif
-
-
- EnableCacheFilter
- *.css
-
-
- EnableCacheFilter
- *.js
-
-
-
-
- utf8EncodingFilter
- /*
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/listeners.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/listeners.fragment
deleted file mode 100644
index 54d32b0..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/listeners.fragment
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
-
-
-
- com.icw.ehf.commons.spring.ServiceLocatorInitializer
-
-
-
-
-
-
- com.icw.ehf.authorization.web.ContextListener
-
-
-
-
- com.icw.ehf.authorization.web.SessionListener
-
-
-
-
-
-
- org.apache.axis.transport.http.AxisHTTPSessionListener
-
-
-
-
- com.icw.ehf.commons.axis.listener.SpringAxisProviderListener
-
-
-
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/security.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/security.fragment
deleted file mode 100644
index 66581ca..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/security.fragment
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- ehf-resources
-
-
-
- /services/*
-
-
- /resource/*
- /service/*
-
-
- /monitor/*
-
-
- /streamHandling/*
- /fileupload/*
- /filedownload/*
-
- GET
- POST
- PUT
- DELETE
- HEAD
- OPTIONS
- TRACE
-
-
- CONFIDENTIAL
-
-
-
\ No newline at end of file
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.fragment
deleted file mode 100644
index ed362f5..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.fragment
+++ /dev/null
@@ -1,50 +0,0 @@
-
- AxisServlet
-
- com.icw.ehf.commons.axis.servlet.AxisServlet
-
-
-
- axis.development.system
- true
-
- 3
-
-
-
-
- CamelServlet
-
- com.icw.ehf.commons.camel.component.servlet.CamelServlet
-
-
- bean-ref
- servletHandler
-
- 3
-
-
-
-
- SpringRestlet
- com.noelios.restlet.ext.spring.SpringServerServlet
-
-
- org.restlet.component
- restletComponent
-
- 3
-
-
-
-
- AxisMonitorServlet
-
- org.apache.axis.monitor.SOAPMonitorService
-
-
- SOAPMonitorPort
- 5001
-
- 3
-
\ No newline at end of file
diff --git a/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.mapping.fragment b/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.mapping.fragment
deleted file mode 100644
index 8bcda9d..0000000
--- a/assemblies/coala/src/main/config/merge/assembly/web-xml/servlets.mapping.fragment
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- AxisServlet
- /services/*
-
-
-
-
- CamelServlet
- /service/*
-
-
-
-
- SpringRestlet
- /resource/*
-
-
-
-
- AxisMonitorServlet
- /monitor
-
\ No newline at end of file
diff --git a/mocks/coala-mocks/pom.xml b/mocks/coala-mocks/pom.xml
index 67ba74d..4d2918e 100644
--- a/mocks/coala-mocks/pom.xml
+++ b/mocks/coala-mocks/pom.xml
@@ -81,13 +81,11 @@
org.openehealth.ipf.commons
ipf-commons-ihe-ws
- test
test-jar
org.openehealth.ipf.platform-camel
ipf-platform-camel-ihe-ws
- test
test-jar
diff --git a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/MainMock.java b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/MainMock.java
index d0c3e0e..8f211d8 100755
--- a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/MainMock.java
+++ b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/MainMock.java
@@ -1,28 +1,47 @@
package org.openehealth.coala.mocks;
-import org.apache.camel.spring.Main;
+import java.io.IOException;
+
+import javax.servlet.Servlet;
+
+import org.apache.cxf.transport.servlet.CXFServlet;
import org.openehealth.ipf.commons.ihe.ws.server.JettyServer;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.core.io.ClassPathResource;
public class MainMock {
- private Main main;
+ private int port;
+ private JettyServer servletServer;
- public static void main(String[] args) throws Exception {
- MainMock mainMock = new MainMock();
- mainMock.boot();
+ public MainMock(int port) {
+ this.port = port;
}
public void boot() throws Exception {
- System.out.println("Starting mocks...\nPress ctrl-c to exit.");
- ApplicationContext context = JettyStarter.startJettyServer(8766, "/META-INF/spring/coala-mocks-context.xml");
- main = new Main();
- main.setApplicationContextUri("classpath:/META-INF/spring/coala-mocks-context.xml");
- main.enableHangupSupport();
- main.run();
-// new ClassPathXmlApplicationContext("classpath:/META-INF/spring/coala-mocks-context.xml");
-// Thread.currentThread().join();
+ ClassPathResource contextResource = new ClassPathResource("META-INF/spring/coala-mocks-context.xml");
+ Servlet servlet = new CXFServlet();
+ //log.info("Publishing services on port: ${port}")
+
+ servletServer = new JettyServer();
+ try {
+ servletServer.setContextResource(contextResource.getURI().toString());
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ servletServer.setPort(port);
+ servletServer.setContextPath("");
+ servletServer.setServletPath("/*");
+ servletServer.setServlet(servlet);
+ servletServer.setSecure(false);
+
+ System.out.println("Starting Jetty servers with mocks deployed on port " + port + " ...");
+ System.out.println("Press ctrl-c to stop.");
+ servletServer.start();
}
-
+
+ public static void main(String[] args) throws Exception {
+ MainMock mainMock = new MainMock(8766);
+ mainMock.boot();
+ }
+
}
diff --git a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryService.java b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryService.java
new file mode 100755
index 0000000..ad2d15f
--- /dev/null
+++ b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryService.java
@@ -0,0 +1,18 @@
+package org.openehealth.coala.mocks.xds;
+
+import org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.RetrieveDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDocumentsQuery;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.QueryResponse;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.RetrievedDocumentSet;
+
+public interface RegistryRepositoryService {
+
+ void provideAndRegister(ProvideAndRegisterDocumentSet documentSet);
+
+ QueryResponse registryStoredQuery(FindDocumentsQuery query);
+
+ RetrievedDocumentSet retrieveDocuments(
+ RetrieveDocumentSet retrieveDocumentSet);
+
+}
\ No newline at end of file
diff --git a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryServiceImpl.java b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryServiceImpl.java
new file mode 100755
index 0000000..b9c6679
--- /dev/null
+++ b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/RegistryRepositoryServiceImpl.java
@@ -0,0 +1,79 @@
+package org.openehealth.coala.mocks.xds;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.activation.DataHandler;
+
+import org.openehealth.ipf.commons.ihe.xds.core.metadata.Document;
+import org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry;
+import org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.RetrieveDocument;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.RetrieveDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDocumentsQuery;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.QueryResponse;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.RetrievedDocument;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.RetrievedDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.Status;
+
+public class RegistryRepositoryServiceImpl implements RegistryRepositoryService {
+
+ private ConcurrentHashMap> registry = new ConcurrentHashMap>();
+ private ConcurrentHashMap repository = new ConcurrentHashMap();
+
+ /* (non-Javadoc)
+ * @see org.openehealth.coala.mocks.xds.RegistryRepositoryService#provideAndRegister(org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet)
+ */
+ @Override
+ public void provideAndRegister(ProvideAndRegisterDocumentSet documentSet) {
+ List documents = documentSet.getDocuments();
+ for (Document document : documents) {
+ DocumentEntry documentEntry = document.getDocumentEntry();
+ DataHandler content = document.getContent(DataHandler.class);
+ Identifiable patientId = documentEntry.getPatientId();
+ LinkedList patientsDocuments = registry.get(patientId);
+ if (patientsDocuments != null) {
+ patientsDocuments.addLast(documentEntry);
+ } else {
+ patientsDocuments = new LinkedList();
+ patientsDocuments.addLast(documentEntry);
+ }
+ registry.put(patientId, patientsDocuments);
+ repository.put(documentEntry.getUniqueId(), content);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.openehealth.coala.mocks.xds.RegistryRepositoryService#registryStoredQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDocumentsQuery)
+ */
+ @Override
+ public QueryResponse registryStoredQuery(FindDocumentsQuery query) {
+ Identifiable patientId = query.getPatientId();
+ List documentEntries = registry.get(patientId);
+ QueryResponse queryResponse = new QueryResponse();
+ queryResponse.setDocumentEntries(documentEntries);
+ return queryResponse;
+ }
+
+ /* (non-Javadoc)
+ * @see org.openehealth.coala.mocks.xds.RegistryRepositoryService#retrieveDocuments(org.openehealth.ipf.commons.ihe.xds.core.requests.RetrieveDocumentSet)
+ */
+ @Override
+ public RetrievedDocumentSet retrieveDocuments(RetrieveDocumentSet retrieveDocumentSet) {
+ List retrievedDocuments = new ArrayList();
+ List documents = retrieveDocumentSet.getDocuments();
+ for (RetrieveDocument retrieveDocument : documents) {
+ String documentUniqueId = retrieveDocument.getDocumentUniqueId();
+ RetrievedDocument retrievedDocument= new RetrievedDocument();
+ retrievedDocument.setRequestData(retrieveDocument);
+ retrievedDocument.setDataHandler(repository.get(documentUniqueId));
+ }
+ RetrievedDocumentSet retrievedDocumentSet = new RetrievedDocumentSet(Status.SUCCESS, retrievedDocuments);
+
+ return retrievedDocumentSet;
+ }
+
+}
diff --git a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/XdsRouteBuilder.java b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/XdsRouteBuilder.java
index f5a6648..546b205 100755
--- a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/XdsRouteBuilder.java
+++ b/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/xds/XdsRouteBuilder.java
@@ -1,36 +1,69 @@
package org.openehealth.coala.mocks.xds;
-import java.util.List;
+import javax.annotation.Resource;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.spring.SpringRouteBuilder;
-import org.openehealth.ipf.commons.ihe.xds.core.metadata.Document;
import org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.RetrieveDocumentSet;
+import org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDocumentsQuery;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.QueryResponse;
import org.openehealth.ipf.commons.ihe.xds.core.responses.Response;
+import org.openehealth.ipf.commons.ihe.xds.core.responses.RetrievedDocumentSet;
import org.openehealth.ipf.commons.ihe.xds.core.responses.Status;
import org.openehealth.ipf.platform.camel.core.util.Exchanges;
import org.openehealth.ipf.platform.camel.ihe.xds.XdsCamelValidators;
public class XdsRouteBuilder extends SpringRouteBuilder {
+ @Resource(name="registryRepositoryService")
+ private RegistryRepositoryService registryRepositoryService;
+
@Override
public void configure() throws Exception {
- from("xds-iti41:mockrepo?audit=false")
+ from("xds-iti18:registryStoredQuery?audit=false")
+ .process(XdsCamelValidators.iti18RequestValidator())
+ .beanRef("registryRepositoryService", "registryStoredQuery")
+// .process(new Processor() {
+// @Override
+// public void process(Exchange exchange) throws Exception {
+// FindDocumentsQuery query = exchange.getIn().getBody(FindDocumentsQuery.class);
+// QueryResponse registryStoredQuery = registryRepositoryService.registryStoredQuery(query);
+// registryStoredQuery.setStatus(Status.SUCCESS);
+// Exchanges.resultMessage(exchange).setBody(registryStoredQuery);
+// }
+// })
+ .process(XdsCamelValidators.iti18ResponseValidator());
+
+ from("xds-iti41:provideAndRegister?audit=false")
.process(XdsCamelValidators.iti41RequestValidator())
+ .beanRef("registryRepositoryService", "provideAndRegister")
.process(new Processor() {
-
@Override
public void process(Exchange exchange) throws Exception {
- ProvideAndRegisterDocumentSet provideAndRegisterDocumentSet = exchange.getIn().getBody(ProvideAndRegisterDocumentSet.class);
- List documents = provideAndRegisterDocumentSet.getDocuments();
-
+// ProvideAndRegisterDocumentSet provideAndRegisterDocumentSet = exchange.getIn().getBody(ProvideAndRegisterDocumentSet.class);
+// registryRepositoryService.provideAndRegister(provideAndRegisterDocumentSet);
Response response = new Response(Status.SUCCESS);
Exchanges.resultMessage(exchange).setBody(response);
}
})
.process(XdsCamelValidators.iti41ResponseValidator());
+
+ from("xds-iti43:retrieveDocuments?audit=false")
+ .process(XdsCamelValidators.iti43RequestValidator())
+ .beanRef("registryRepositoryService", "retrieveDocuments")
+// .process(new Processor() {
+// @Override
+// public void process(Exchange exchange) throws Exception {
+// RetrieveDocumentSet retrieveDocumentSet = exchange.getIn().getBody(RetrieveDocumentSet.class);
+// RetrievedDocumentSet retrieveDocuments = registryRepositoryService.retrieveDocuments(retrieveDocumentSet);
+// retrieveDocuments.setStatus(Status.SUCCESS);
+// Exchanges.resultMessage(exchange).setBody(retrieveDocuments);
+// }
+// })
+ .process(XdsCamelValidators.iti43ResponseValidator());
}
diff --git a/mocks/coala-mocks/src/main/resources/META-INF/spring/coala-mocks-context.xml b/mocks/coala-mocks/src/main/resources/META-INF/spring/coala-mocks-context.xml
index d37f11f..c2d1298 100755
--- a/mocks/coala-mocks/src/main/resources/META-INF/spring/coala-mocks-context.xml
+++ b/mocks/coala-mocks/src/main/resources/META-INF/spring/coala-mocks-context.xml
@@ -21,5 +21,7 @@
+
+
\ No newline at end of file
diff --git a/mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/JettyStarter.java b/mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/JettyStarter.java
similarity index 100%
rename from mocks/coala-mocks/src/main/java/org/openehealth/coala/mocks/JettyStarter.java
rename to mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/JettyStarter.java
diff --git a/mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/xds/XdsRouteBuilderTest.java b/mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/xds/XdsRouteBuilderTest.java
index f3560f2..ce1fed4 100755
--- a/mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/xds/XdsRouteBuilderTest.java
+++ b/mocks/coala-mocks/src/test/java/org/openehealth/coala/mocks/xds/XdsRouteBuilderTest.java
@@ -35,7 +35,7 @@
public class XdsRouteBuilderTest {
private static final int PORT = 8766;
- private static final String URI = "xds-iti41://localhost:" + PORT + "/mockrepo?audit=false";
+ private static final String URI = "xds-iti41://localhost:" + PORT + "/provideAndRegister?audit=false";
static ApplicationContext appContext;
static ProducerTemplate template;
diff --git a/modules/coala-ipf/coala-ipf-xds/src/test/java/org/openehealth/coala/xds/test/XDSTransactorIti41Test.java b/modules/coala-ipf/coala-ipf-xds/src/test/java/org/openehealth/coala/xds/test/XDSTransactorIti41Test.java
index 4674bf1..f93d37c 100644
--- a/modules/coala-ipf/coala-ipf-xds/src/test/java/org/openehealth/coala/xds/test/XDSTransactorIti41Test.java
+++ b/modules/coala-ipf/coala-ipf-xds/src/test/java/org/openehealth/coala/xds/test/XDSTransactorIti41Test.java
@@ -68,6 +68,10 @@
*/
@Ignore
public class XDSTransactorIti41Test extends XDSBaseTest {
+ private static final boolean DO_NOT_REPLACE_OLD = false;
+
+ private static final boolean REPLACE_OLD = true;
+
private static final Logger LOG = org.slf4j.LoggerFactory
.getLogger(XDSTransactorIti43Test.class);
@@ -120,6 +124,7 @@ public void init() {
String buffer = "";
String xml = "";
InputStream testConsentStream = null;
+ // FIXME Maybe better to use a FileDataSource here instead?
try {
// Try to read out the stream
// See if source can be established and has bytes
@@ -163,7 +168,7 @@ public void testProvideAndRegisterConsentDocumentForPID() {
Document doc = new Document(docEntry, dataHandler);
String resp = xdsTransactor
- .provideAndRegisterNewConsent(doc, false);
+ .provideAndRegisterNewConsent(doc, DO_NOT_REPLACE_OLD);
// #####################################
// Check whether the document could be
// registered
@@ -187,7 +192,7 @@ public void testProvideAndRegisterDocumentSetWithNullAuthor() {
DocumentEntry docEntry = createDocumentEntry(null, createPatient,
policy);
Document doc = new Document(docEntry, dataHandler);
- String resp = xdsTransactor.provideAndRegisterNewConsent(doc, false);
+ String resp = xdsTransactor.provideAndRegisterNewConsent(doc, DO_NOT_REPLACE_OLD);
assertNotNull(resp);
}
@@ -202,7 +207,7 @@ public void testProvideAndRegisterDocumentSetWithNullIdentifier() {
// #####################################
DocumentEntry docEntry = createDocumentEntry(author, null, policy);
Document doc = new Document(docEntry, dataHandler);
- xdsTransactor.provideAndRegisterNewConsent(doc, false);
+ xdsTransactor.provideAndRegisterNewConsent(doc, DO_NOT_REPLACE_OLD);
}
/**
@@ -216,7 +221,7 @@ public void testProvideAndRegisterDocumentSetWithNullPolicy() {
DocumentEntry docEntry = createDocumentEntry(author, createPatient,
null);
Document doc = new Document(docEntry, dataHandler);
- xdsTransactor.provideAndRegisterNewConsent(doc, false);
+ xdsTransactor.provideAndRegisterNewConsent(doc, DO_NOT_REPLACE_OLD);
}
/**
@@ -246,7 +251,7 @@ public void testReplacementOfOldConsents() {
policy);
Document doc = new Document(docEntry, dataHandler);
String consentUniqueID = xdsTransactor.provideAndRegisterNewConsent(
- doc, true);
+ doc, REPLACE_OLD);
List consentListAfter = xdsTransactor
.getConsentDocumentList(replacePatient.getId(),
diff --git a/poms/pom.xml b/poms/pom.xml
index cf88188..bacc8a9 100644
--- a/poms/pom.xml
+++ b/poms/pom.xml
@@ -198,6 +198,23 @@
ipf-platform-camel-ihe-xds
${ipf.version}
+
+ org.openehealth.ipf.platform-camel
+ ipf-platform-camel-ihe-ws
+ ${ipf.version}
+
+
+ org.openehealth.ipf.commons
+ ipf-commons-ihe-ws
+ ${ipf.version}
+ test-jar
+
+
+ org.openehealth.ipf.platform-camel
+ ipf-platform-camel-ihe-ws
+ ${ipf.version}
+ test-jar
+
org.slf4j
slf4j-api
@@ -241,6 +258,11 @@
${spring.version}
test
+
+ org.springframework
+ spring-web
+ ${spring.version}
+