Example #1
0
        public byte[] GetDocumentForFileName(string pFileName, string pMetadata, string pDocURL)
        {
            VaultSvcClient client = new VaultSvcClient(VAULTVIEWER_ENDPOINT, urlStr);

            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            Dictionary <string, string> docDetails = extractDataFromMetaData(pMetadata);
            GetDocumentForURLRequest    request    = new GetDocumentForURLRequest();

            //{
            //    TradingSystemCode = "",
            //    DocumentKey = "",
            //    FeedType = "",
            //    FileName = pFileName,
            //    URL = ""
            //};
            request.FileName          = pFileName;
            request.FeedType          = "CONTRACTS";//(docDetails.ContainsKey("FileType") ==true ? docDetails["FileType"].ToString() : "");
            request.DocumentKey       = (docDetails.ContainsKey("TradeNum") == true ? docDetails["TradeNum"].ToString() : "");
            request.TradingSystemCode = (docDetails.ContainsKey("Source") == true ? docDetails["Source"].ToString() : "");
            request.URL = pDocURL;

            GetDocumentForURLResponse response = client.GetDocumentForURL(request);

            return(response.ObjectStream);
        }
Example #2
0
        public byte[] GetDocumentForURL(string feedType, string docKey, string tradingSystem, string fileName, string URL)
        {
            GetDocumentForURLRequest request = new GetDocumentForURLRequest
            {
                DocumentKey       = docKey,
                FeedType          = feedType,
                FileName          = fileName,
                TradingSystemCode = tradingSystem,
                URL = URL
            };

            GetDocumentForURLResponse response = _client.GetDocumentForURL(request);

            return(response.ObjectStream);
        }
Example #3
0
        public byte[] GetDocumentForURL(string pUrl)
        {
            VaultSvcClient client = new VaultSvcClient(VAULTVIEWER_ENDPOINT, urlStr);

            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            GetDocumentForURLRequest request = new GetDocumentForURLRequest
            {
                TradingSystemCode = "",
                DocumentKey       = "",
                FeedType          = "",
                FileName          = "",
                URL = pUrl
            };

            GetDocumentForURLResponse response = client.GetDocumentForURL(request);

            return(response.ObjectStream);
        }