I downloaded the OpenMRS Reference Application 2.5 Standalone edition. I started the application following the instructions. Everything seems to be working except for the FHIR module. It starts fine, but trying to call any of its services fails.
My environment:
Windows 7
Java 1.8.0_111
OpenMRS Reference App 2.5; demo setup (with some patients)
FHIR module 1.6 (the default one; I also tried the latest 1.7-SNAPSHOT from github, and a rolled-back version 1.4 - same results for all).
I get back a response with “Resource does not exist.”.
Calls like that have the following error in the embedded tomcat log file:
WARN - DispatcherServlet.noHandlerFound(1120) |2016-12-23 13:20:27,337| No mapping found for HTTP request with URI [/openmrs-standalone/ws/fhir/metadata] in DispatcherServlet with name ‘openmrs’
The swagger documentation link also doesn’t work on my local machine:
http://localhost:8081/openmrs-standalone/module/fhir/apidocs.form
Similar error in the tomcat log:
WARN - DispatcherServlet.noHandlerFound(1120) |2016-12-23 13:44:21,697| No mapping found for HTTP request with URI [/openmrs-standalone/module/fhir/rest/swagger.json] in DispatcherServlet with name ‘openmrs’
My current suspicion is that the FHIR module has the “openmrs” path hard-coded somewhere, and it doesn’t recognize “openmrs-standalone”… There are definitely bunch of places in the FHIR module with hardcoded “openmrs” path.
I have deployed the same FHIR omod with a openmrs-core in Vagrant - that returns the FHIR data as expected.
For standalone the page just never loads and I see the following in tomcat logs:
WARN - DispatcherServlet.noHandlerFound(1120) |2017-01-04 10:10:58,269| No mapping found for HTTP request with URI [/openmrs-standalone/module/fhir/rest/swagger.json] in DispatcherServlet with name ‘openmrs’
So, the FHIR module, as released in Platform 2.0.* and in Refapp 2.5, does not work at all if you deploy the webapp as something other than /openmrs, right?
So, let’s get a new version of the FHIR module released, and make sure it’s in the next maintenance release of Platform 2.0.x.
(And Daniel, please create a ticket for the code you committed!)