Doc updates

This commit is contained in:
jamesagnew 2014-08-01 07:35:44 -04:00
parent 0ba7a63803
commit 9d4eff967e
8 changed files with 182 additions and 11 deletions

View File

@ -244,6 +244,7 @@
<escapeHTML>false</escapeHTML>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
@ -294,6 +295,7 @@
</reportSet>
</reportSets>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>

View File

@ -59,7 +59,9 @@
<menu name="Documentation">
<item name="Introduction" href="./doc_intro.html" />
<item name="The Data Model" href="./doc_fhirobjects.html" />
<item name="RESTful Server" href="./doc_rest_server.html" />
<item name="RESTful Server" href="./doc_rest_server.html" >
<item name="FHIR Tester App" href="./doc_server_tester.html" />
</item>
<item name="RESTful Client" href="./doc_rest_client.html" />
<item name="RESTful Operations" href="./doc_rest_operations.html" />
<item name="Extensions" href="./doc_extensions.html" />

View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Server Tester - HAPI FHIR</title>
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
</properties>
<body>
<section name="FHIR Tester Web Application">
<macro name="toc">
</macro>
<p>
HAPI FHIR includes a web UI that can be used to test your server implementation.
This UI is the same UI used on the <a href="http://fhirtest.uhn.ca">http://fhirtest.uhn.ca</a>
public server.
</p>
<p>
The Tester is a
<a href="http://maven.apache.org/plugins/maven-war-plugin/overlays.html">Maven WAR Overlay</a>,
meaning that you create your own WAR project (which you would likely be doing anyway
to create your server) and the overlay drops a number of files into your project.
</p>
<subsection name="Adding the Overlay">
<p>
These instructions assume that you have an exsiting web project
which uses Maven to build. The POM.xml should have a "packaging"
type of "war".
</p>
<p>
Adding the overlay to your project is relatively simple. First,
add the "hapi-fhir-testpage-overlay" dependency to the dependencies
section of your POM.xml file.
<source><![CDATA[<dependencies>
<!-- ... other dependencies ... -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-testpage-overlay</artifactId>
<version>0.6-SNAPSHOT</version>
<type>war</type>
<scope>provided</scope>
</dependency>
</dependencies>]]></source>
</p>
<p>
Then, add the following WAR plugin to the plugins section
of your POM.xml
<source><![CDATA[<build>
<plugins>
<!-- ... other plugins ... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-testpage-overlay</artifactId>
</overlay>
</overlays>
</configuration>
</plugin>
</build>
</plugins>]]></source>
</p>
<p>
Next, create the following directory in your project
if it doesn't already exist:<br/>
<code>src/main/webapp/WEB-INF</code>
</p>
<p>
Then, create a file in that directory
called <code>hapi-fhir-tester-config.xml</code>
and copy in the following contents:
</p>
<macro name="snippet">
<param name="file" value="../restful-server-example/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml" />
</macro>
<p>
Note that the URL in the file above must be customized to point to
the FHIR endpoint your server will be deployed to. For example, if you
are naming your project "myfhir-1.0.war" and your endpoint in the WAR is
deployed to "/fhirbase/*" then you should put a URL similar to
<code>http://localhost:8080/myfhir-1.0/fhirbase</code>
</p>
<p>
Finally, in the same directory you should open you web.xml file. This file is
required in order to deploy to a servlet container and you should create it if
it does not already exist. Place the following contents in that file.
</p>
<source><![CDATA[<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/hapi-fhir-tester-application-context.xml
/WEB-INF/hapi-fhir-tester-config.xml
</param-value>
</context-param>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/hapi-fhir-tester-application-context.xml
/WEB-INF/hapi-fhir-tester-config.xml
</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/tester/*</url-pattern>
</servlet-mapping>]]></source>
</subsection>
<subsection name="Customizing the Overlay">
<p>
</p>
</subsection>
<subsection name="A Complete Example">
<p>
The "Restful Server Example" project contains a complete working
example of the FHIR Tester as a part of its configuration. You may
wish to browse its source to see how this works:<br/>
<a href="https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example">https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example</a>
</p>
</subsection>
</section>
</body>
</document>

View File

@ -44,7 +44,7 @@
This is surprisingly soon after the last release (and probably not a
pace we will sustain) but we landed a number of big fixes and enhancements
over the last two weeks and it just didn't make sense to hold them.
See the <a href="./duc_upgrading.html">upgrading page</a> for information on
See the <a href="./doc_upgrading.html">upgrading page</a> for information on
API changes in this release.
<br/>
- <a href="mailto:jamesagnew@users.sourceforge.net">James Agnew</a>

View File

@ -6,7 +6,7 @@
<dependent-module archiveName="hapi-fhir-base-0.6-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-base/hapi-fhir-base">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/" handle="module:/overlay/prj/hapi-fhir-testpage-overlay?includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependent-module deploy-path="/" handle="module:/overlay/prj/hapi-fhir-tester-overlay?includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
<dependent-module deploy-path="/" handle="module:/overlay/slf/?includes=**/**&amp;excludes=META-INF/MANIFEST.MF">

View File

@ -17,7 +17,7 @@
<version>0.6-SNAPSHOT</version>
</dependency>
<!-- This dependency is used for the "test page" web app overlay -->
<!-- This dependency is used for the "FHIR Tester" web app overlay -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-testpage-overlay</artifactId>
@ -56,6 +56,12 @@
</dependencies>
<build>
<!--
The following is not required for the application to build, but
allows you to test it by issuing "mvn jetty:run" from the command
line.
-->
<pluginManagement>
<plugins>
<plugin>
@ -81,8 +87,8 @@
</plugin>
<!--
The configuration here tells the WAR plugin to include the test
page overlay. You can omit it if you are not using that feature.
The configuration here tells the WAR plugin to include the FHIR Tester
overlay. You can omit it if you are not using that feature.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -8,20 +8,23 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<!--
The following bean supplies any configuration to the
FHIR Tester application.
-->
<bean class="ca.uhn.fhir.to.TesterConfig">
<property name="servers">
<list>
<!-- Each value is a reference to one FHIR server -->
<!-- Format is: [id],[name],[base URL] -->
<!-- The URL should be customized to match whatever URL this server will be deployed to -->
<value>example , Restful Server Example , http://localhost:8080/fhir</value>
<!-- The URL should be customized to match the base URL for the FHIR endpoint -->
<value>example , Restful Server Example , http://localhost:8080/fhir</value>
</list>
</property>
</bean>
<!-- A FhirContext bean is also required -->
<bean id="fhirContext" class="ca.uhn.fhir.context.FhirContext">
</bean>
</beans>

View File

@ -4,7 +4,7 @@
<!--
The following entries are all here to enable the tester web application, and
are not actually a part of the underlying FHIR server.
-->
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>