Hi Gaoyang,

Before attempting to start your development effort, I definitely recommend 
using 
an HL7 test client, just to verify that MLLP communication is possible with the 
server. A free test client called "Interface Explorer for HL7" is available for 
download here: http://www.laconic-designs.com/index.html

Because this test client is configurable, it will allow you to easily send test 
messages via MLLP to any IP address and port without any Java development. Once 
you verify that communication is possible with this test client, you should 
gain 
the confidence you need to continue with your work.

Erik





________________________________
From: gaoyang4011 <[email protected]>
To: Erik Gfesser <[email protected]>; hl7api-devel 
<[email protected]>
Sent: Thu, November 25, 2010 8:26:58 PM
Subject: 回复:  Re: [HAPI-devel] sending Hl7 message via MLLP

   
Hi Erik,
       Thanks  for your reply.I have another question.
        Our  company's VPN IP is  122.195.58.53 .
        Our  company'name is A, the another is B. The B company connect to 
our's 
VPN using  their PC which IP is 192.168.10.32.
            The  PC with 192.168.10.11 in our company  is the client which 
sending HL7  message , and the PC with 192.168.10.32 in B company is the server 
which  receiving the hl7 message.  And the server's port is 6660. And B company 
 
tell me that the 6660 port is open.
        Now I try to telnet  192.168.10.32 6660,but I fail.Then I ask them why 
I 
can not telnet 6660.They  tell me that 'the Port 6660 is only available for 
MLLP 
calls, and it  cannot be accessed by telnet. ' So I do not know how I can 
connect to  6660. Using the ' Socket s = new Socket(192.168.10.32,  6660)'  to 
connect to 6660?
'
      And  the B company   tell me that they can use two servers  to test that 
work using our VPN. So I think our  Firewall have no problem.
        
 
2010-11-26
________________________________
 
gaoyang4011 
---------------------------------------------------------
网易闪电邮(fm.163.com),免登录、助您同时管理多个邮箱!

________________________________
 
发件人: Erik Gfesser <[email protected]>
发送时间: 2010-11-26 03:56
主 题: Re: [HAPI-devel] sending Hl7 message via MLLP
收件人: gaoyang4011 <[email protected]>, hl7api-devel  
<[email protected]>


Hi Gaoyang, 

There may be several reasons why you cannot telnet to a specific port. By  
default, telnet servers listen at port 23. In order to telnet to port 6660, the 
 
telnet server at that IP address needs to be set up to listen at that port. In  
addition, that port would need to be open (not obstructed by a firewall etc).  
While port 6660 may be set up on that server to be dedicated for MLLP  
communication, make sure there are no obstructions that prevent the server from 
 
actually receiving messages at that port.


Erik





________________________________
 From: gaoyang4011  <[email protected]>
To: hl7api-devel <[email protected]>
Sent: Thu, November 25, 2010 7:54:32  AM
Subject: [HAPI-devel]  sending Hl7 message via MLLP

   
Dear friends,
     I have a  question.  I am doing a test about sending HL7 message via 
MLLP.We   have two servers in our company  that works using  VPN.  The PC with 
192.168.10.11 is the client with sending HL7 message ,  and the PC with 
192.168.10.32 is the server with receiving the hl7  message.  And the server's 
port is 6660. 

                    Now,I  can ping 192.168.10.32,but can not telnet 
192.168.10.32 6660. Someone tells me  that  'Port 6660 is only available for 
MLLP calls, and it cannot be  accessed by telnet. ' Is it right? In my code,I 
get the connection  to the server of 192.168.10.32 like this :the flowing codes:
  connectionHub =  ConnectionHub.getInstance();
 // A connection object represents a socket  attached to an HL7 server
 connection =  connectionHub.attach(“192.168.10.32”, 6660, new PipeParser(),  
MinLowerLayerProtocol.class);
 
public Connection attach(String host,  int port, Parser parser, Class llpClass) 
throws HL7Exception  {
        Connection conn =  getExisting(host, port, parser.getClass(),  
llpClass);
        if (conn == null)  {
            try  {
                 //Parser p = (Parser)  parserClass.newInstance();
                 LowerLayerProtocol llp = (LowerLayerProtocol)  
llpClass.newInstance();
                 conn = connect(host, port, parser,  llp);
            }  catch (ClassCastException e)  {
                 //Log.tryToLog(cce, "Problem opening new connection to " + 
host 
+ " port " +  port);
                 throw new HL7Exception( "ClassCastException - need a 
LowerLayerProtocol class to  get an Inititator", 

                                         
HL7Exception.APPLICATION_INTERNAL_ERROR,
                                         e);
            }  catch (Exception e)  {
                 //Log.tryToLog(e, "Problem opening new connection to " + host 
+ 
" port " +  port);
                 throw new HL7Exception( "Can't connect to " + host + " port " 
+ 
port + ": " +  e.getClass().getName() + ": " + e.getMessage(), 

                                         
HL7Exception.APPLICATION_INTERNAL_ERROR,
                                         e);
             }
         }
         incrementRefs(conn);
        return  conn;
    }
 
private Connection connect(String  host, int port, Parser parser, 
LowerLayerProtocol llp) throws  UnknownHostException, IOException, LLPException 
{
        Socket s = new Socket(host,  port);
        Connection i = new  Connection(parser, llp, s);
         connections.put(makeHashKey(host, port, parser.getClass(), 
llp.getClass()),  i);
        sockets.put(makeHashKey(host,  port, parser.getClass(), 
llp.getClass()),  
s);
        return  i;
    }
 
 
but  when I  try to connect to  the 192.168.10.32 on port 6660: I get the  
failure: 
ca.uhn.hl7v2.HL7Exception: Can't connect to 192.168.10.32 port 6660: 
java.net.ConnectException:  Connection refused: connect
 at  ca.uhn.hl7v2.app.ConnectionHub.attach(ConnectionHub.java:92)
 at cn.com.winning.client.ClientDbMotion.getConn(ClientDbMotion.java:43)
 at 
cn.com.winning.message.translator.DbMotion.TranslatorV231.translatorv231(TranslatorV231.java:77)

 at  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at  java.lang.reflect.Method.invoke(Unknown Source)
 at  org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
 at  
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)

 at  
org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

 at  org.quartz.core.JobRunShell.run(JobRunShell.java:199)
 at  
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
Caused  by: java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native  Method)
 at java.net.PlainSocketImpl.doConnect(Unknown Source)
 at java.net.PlainSocketImpl.connectToAddress(Unknown  Source)
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.<init>(Unknown Source)
 at java.net.Socket.<init>(Unknown Source)
 at  ca.uhn.hl7v2.app.ConnectionHub.connect(ConnectionHub.java:114)
 at  ca.uhn.hl7v2.app.ConnectionHub.attach(ConnectionHub.java:84)
 
I do not find the  reason why I can not connect to  the 192.168.10.32 on port 
6660.
Then someone tells me The SNMP service should be open in  the firewall,is it 
nessary? I hope to hear your opion.Thanks verry  much.
 
Thanks,
gaoyang
 
2010-11-25
________________________________
 
gaoyang4011 
---------------------------------------------------------
网易闪电邮(fm.163.com),您的专属邮件管家
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to