diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 699f4c0cf71..713823ce136 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -64,6 +64,16 @@
4.2.3
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+
+
+ log4j
+ log4j
+ 1.2.17
+
@@ -97,6 +107,33 @@
test
+
+
+ org.eclipse.jetty
+ jetty-server
+ 9.1.1.v20140108
+ test
+
+
+ org.eclipse.jetty
+ jetty-servlet
+ 9.1.1.v20140108
+ test
+
+
+
+ commons-httpclient
+ commons-httpclient
+ 3.1
+ test
+
+
+
+ directory-naming
+ naming-java
+ 0.8
+ test
+
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/ResourceMethod.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/ResourceMethod.java
index 6e0d01ef95e..a505c827ad5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/ResourceMethod.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/ResourceMethod.java
@@ -36,8 +36,8 @@ public class ResourceMethod {
this.resourceType = resourceType;
}
- public IResource getResourceType() throws IllegalAccessException, InstantiationException {
- return (IResource)resourceType.newInstance();
+ public Class getResourceType() throws IllegalAccessException, InstantiationException {
+ return resourceType.getClass();
}
public RequestType getRequestType() {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/Service.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/Service.java
index b146836f9ea..6d29f935d0d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/Service.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/ws/Service.java
@@ -171,7 +171,7 @@ public class Service extends HttpServlet {
ResourceMethod resourceMethod = resource.getMethod(params.keySet());
if (null == resourceMethod) throw new MethodNotFoundException("No resource method available for the supplied parameters " + params);
- FhirContext ctx = new FhirContext(resourceMethod.getResourceType().getClass());
+ FhirContext ctx = new FhirContext(resourceMethod.getResourceType());
XmlParser p = new XmlParser(ctx);
response.getWriter().write(p.encodeResourceToString(resourceMethod.invoke(params)));
} catch (Throwable t) {