From: Matias K. <ma...@et...> - 2004-05-21 14:55:47
|
Hello, I've just started testing HAPI v0.4.1. I'm trying to cast a Message object to an ADT_A04 object. Here is my code: public ADT_A04 convertMessage(Message in){ ADT_A04 adt = (ADT_A04) in; return adt; } When I pass an ADT_A04 message to this function, I get the following error: java.lang.ClassCastException at com.test.HL7.processors.ADTProcessor.processMes age(ADTProcessor.java:67) at ca.uhn.hl7v2.app.MessageTypeRouter.processMessage(MessageTypeRouter. ava:52) at ca.uhn.hl7v2.app.Responder.processMessage(Responder.java:159) at ca.uhn.hl7v2.app.Receiver$Grunt.run(Receiver.java:115) What would cause this considering that the message being passed in is an ADT_A04 message? Could this be a versioning problem (i.e. the message is v2.4 and the ADT_A04 class is from the v2.3.1 model package)? Thanks, Matias ============ Matias Klein Ethidium Health Systems 3993 Huntingdon Pike - Suite 108 Huntingdon Valley, PA 19006-1927 USA Office: (215)938-8630 Fax: (866)583-8018 http://www.ethidium.com |