Hi James, can you add to that example? How can you pass in that custom 
parser you wrote into the Context?

I have the code, and the unrecognized version 2.7 exception is still 
thrown. How do I pass in my own PipeParser in this case?:

HapiContext context = new DefaultHapiContext();

        context.getParserConfiguration().setAllowUnknownVersions(true); 
        context.getParserConfiguration().setValidating(false);
        
context.getPipeParser().getParserConfiguration().setAllowUnknownVersions
(true);
        
context.getPipeParser().getParserConfiguration().setValidating(false);
        Connection connection = null;
        try{
            connection = context.newClient(host, port, useTLS);
            
((ActiveConnection)connection).getParser().getParserConfiguration().setA
llowUnknownVersions(true);
            
((ActiveConnection)connection).getParser().getParserConfiguration().setV
alidating(false);
            
            Message response = 
connection.getInitiator().sendAndReceive(message);
            
            String respStr = response.encode();
            logger.info("Message sent, response received: ' " + respStr 
+ "'");
            connection.close();
        }
        catch (HL7Exception ex){..}




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to