diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index 615fe7b63ad..99dbe62aab3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -34,6 +34,7 @@ import ca.uhn.fhir.i18n.HapiLocalizer; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.resource.Binary; import ca.uhn.fhir.model.view.ViewGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.parser.DataFormatException; @@ -167,7 +168,12 @@ public class FhirContext { try { String className = myNameToResourceType.get(resourceName.toLowerCase()); if (className == null) { - throw new DataFormatException("Unknown resource name[" + resourceName + "]"); + if ("binary".equals(resourceName.toLowerCase())) { + // Binary is not generated so it's not in the list of potential resources + className = Binary.class.getName(); + } else { + throw new DataFormatException("Unknown resource name[" + resourceName + "]"); + } } Class> clazz = Class.forName(className); if (IResource.class.isAssignableFrom(clazz)) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java index 19de6ce35ea..27a79e6d770 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java @@ -37,6 +37,11 @@ import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; /** * Provides methods to intercept requests and responses. Note that implementations of this interface may wish to use {@link InterceptorAdapter} in order to not need to implement every method. + *
+ * See: See the + * server interceptor documentation + * for more information on how to use this class. + *
*/ public interface IServerInterceptor { diff --git a/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component b/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component index b5d99862419..bb633a08b36 100644 --- a/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component +++ b/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component @@ -1,8 +1,6 @@