Hi everyone,
I'm brand new to HAPI and Java, as well, so thanks in advance for your patience.
I'm trying to write a Java class which accepts HL7 data which has already been
converted to XML. I want to validate the XML against a conformance file, or,
preferably against a default HL7 HAPI schema, if there is such a thing.
Is there an example of how to do this? I've been looking at
ca.uhn.hl7v2.validation.Validator because the validate method seems to allow
you to specify that the input message is in XML format. My try/catch is below.
The thing is, no matter what I set variable hapiString to, it returns true.
Obviously I'm doing something wrong.
try {
Boolean valid = false;
Validator<Object> validator = new
DefaultValidator<Object>(hapiContext);
valid = (Boolean) validator.validate(hapiString, true,
hver);
System.out.println("Validation outcome: " + valid);
} catch (Exception exc) {
exc.printStackTrace();
}
Thanks very much,
Steve
------------------------------------------------------------------------------
Androi apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel