Example #1
0
        public CTM_Message ProcessMessage(byte[] message, bool duplicate, DCIWebSession webSession, string msgName)
        {
            byte[] response = null;

            response = webSession?.Submit("/home/WS/DCISubmit",       // URL
                                          message, 0, message.Length, // message bytes, offset,
                                                                      // length
                                          "xml",                      // message class
                                          Guid.NewGuid().ToString(),  // transport message id *See Note Above
                                          duplicate);                 // duplicate msgId causes exception

            return(response != null?ReturnCtmMessage(response, msgName) : null);
        }
Example #2
0
 public DCIWebSession GetSession()
 {
     _webSession = new DCIWebSession(
         _protocoldName,    // protocol
         _host,             // host
         _port,             // port
         _loginPath,        // login url
         _userName,         // User name
         _password,         // password
         _sslProxyHost,     // sslProxyHost
         _sslProxyPort,     //sslProxyport
         _sslProxyUserName, //sslProxusername
         _sslProxyPassword, //sslProxypassword
                            //(proxyHost != null && !"".equals(proxyHost)) ? proxyHost : null, // sslProxyHost
                            //(proxyPort != null && !"".equals(proxyPort)) ? int.Parse(proxyPort):int.MinValue;
                            // sslProxyPort
         _circuitTimeout,   // As per example
         _idleTimeout,      //As per example
         _trace /* As per example */);
     return(_webSession);
 }
Example #3
0
        public CTM_Message SendMsgString(DCIWebSession con, string message)
        {
            var processor = new CtmProcessor();

            return(processor.ProcessMessage(processor.AddDocType("Cancel", message), false, con, "Cancel"));
        }
Example #4
0
 public CTM_Message SendMsg(DCIWebSession conn)
 {
     throw new NotImplementedException();
 }
Example #5
0
        public CTM_Message SendMsg(DCIWebSession con)
        {
            var processor = new CtmProcessor();

            return(processor.ProcessMessage(processor.AddDocType("TradeDetail", _message), false, con, "TradeDetail"));
        }
Example #6
0
        public CTM_Message SendMsg(DCIWebSession con)
        {
            var processor = new CtmProcessor();

            return(processor.ProcessMessage(processor.AddDocType("TradeLevel", GenerateTradeLevelRequest()), true, con, "TradeLevel"));
        }
Example #7
0
        public CTM_Message SendMsg(DCIWebSession con)
        {
            var processor = new CtmProcessor();

            return(processor.ProcessMessage(processor.AddDocType("InfoRequest", GenerateInfoRequest()), false, con, "InfoResponse"));
        }