FHIR Chat · HTTP 404 for custer resource in FHIR IG · hapi

Stream: hapi

Topic: HTTP 404 for custer resource in FHIR IG


view this post on Zulip Peter Robinson (Feb 04 2022 at 11:29):

Hi everybody, I am trying to set up a server and client to work with a custom IG with a number of extensions and profiles. I have made some very minor alterations to the HAPI JPA starter including registering our IG (https://github.com/pnrobinson/hapi-pheno-server; the IG is here http://phenopackets.org/core-ig/). I start the server on localhost for testing. Then I try to work with the server with client code (https://github.com/pnrobinson/hapi-pheno-client/). WHen I try to post a custom resource like this
PhenotypicFeature pf = new PhenotypicFeature();
pf.setId("id");
IGenericClient client = ctx .newRestfulGenericClient(this.hapiUrl);
client.registerInterceptor(loggingInterceptor);
MethodOutcome
outcome = client
.create()
.resource(pf)
.execute();
return outcome.getId();
I get a 404:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: HTTP 404 Not Found
...
The resource has this --
@ResourceDef(name="Observation",
profile="https://github.com/phenopackets/core-ig/StructureDefinition/PhenotypicFeature")
public class PhenotypicFeature extends Observation {
///
}
ANy ideas/tips would be greatly appreciated, Peter


Last updated: Apr 12 2022 at 19:14 UTC