Hi All, It seems to me that the custom model classes simply do not recognize the AbstractGroup types even when one tries to forcefully load the group from the custom model. I think Christian is absolutely right that the eventmap is the solution known to work for this issue. The problem for me however is that that solution seems rather extreme. Unfortunately, the message type I am trying to create is not a standard type.
Here is a case in point. The code snippet below is actually in a package xxx.xxx.<version>.<type> but it seems only the eventmap is able to recognize all types package com.mckn.mms.lds.hl7.zxx.custommodel.v25.group public class PFG extends AbstractGroup { private static final long serialVersionUID = -5950843839679571210L; public PFG(Group parent, ModelClassFactory factory) { super(parent, factory); try { init(); } catch (HL7Exception e) { log.error("Unexpected error creating PFG.", e); } } ...... package com.mckn.mms.lds.hl7.zxx.custommodel.v25.group public PFG getPFG(){ //An attempt to load ModelClassFactory cfm = new CustomModelClassFactory( "com.mckn.mms.lds.hl7.zxx.custommodel"); Class c=null; try { c = cfm.getTypeClass("PFG", "2.5"); } catch (HL7Exception e) { return null; } return (PFG)super.getTyped("PFG", c); } I have tried all the recommendations so far, except for the eventmap solution, but with no success. Unfortunately, there is not enough information showing an instance of creating a completely new message type implementation from scratch. Has anyone got a working solution to this problem?
------------------------------------------------------------------------------
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel