Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here we unmarshal the byte stream into a HAPI Message object that is passed to our patient lookup service.

Notice there is a shorthand syntax in Camel for well known data formats that is commonly used.
Then you don't need to create an instance of the HL7DataFormat object:

Code Block
java
java

  from("direct:hl7in").marshal().hl7().to("jms:queue:hl7out");
  from("jms:queue:hl7out").unmarshal().hl7().to("patientLookupService");

The unmarshal operation adds these MSH fields as headers on the Camel message:

...