2011-07-06 78 views
1

嗨,我有以下代码,并试图调用xignite中的一些历史数据。在这种情况下,xyz库是一个xignite库。使用异步方法调用Xignite

//fire an event GetHistoricalQuotesAsOfCompleted 
       proxy.GetHistoricalQuotesAsOfCompleted += 
        new EventHandler<GetHistoricalQuotesAsOfCompletedEventArgs>(GetHistoricalQuotesAsOfCompleted); 

       //asynchronously request quotes for a time period 
       proxy.GetHistoricalQuotesAsOfAsync(ticker, xyz.IdentifierTypes.Symbol, 
        DateTime.Now.ToString(), PeriodTypes.Day, days); 

这里是

Webpage error details 

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; EasyBits GO v1.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MDDR; InfoPath.2; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E) 
Timestamp: Wed, 6 Jul 2011 02:50:12 UTC 


Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object. at newAmStockChart.MainPage.GetHistoricalQuotesAsOfCompleted(Object sender, GetHistoricalQuotesAsOfCompletedEventArgs e) 
    at newAmStockChart.xyz.XigniteHistoricalSoapClient.OnGetHistoricalQuotesAsOfCompleted(Object state) 
Line: 1 
Char: 1 
Code: 0 
URI: http://localhost:60260/newAmStockChartTestPage.aspx 


Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object. at newAmStockChart.MainPage.GetHistoricalQuotesAsOfCompleted(Object sender, GetHistoricalQuotesAsOfCompletedEventArgs e) 
    at newAmStockChart.xyz.XigniteHistoricalSoapClient.OnGetHistoricalQuotesAsOfCompleted(Object state) 
Line: 1 
Char: 1 
Code: 0 
URI: http://localhost:60260/newAmStockChartTestPage.aspx 

回答

2

我发现这样做是不是通过SOAP去使用,但在后端REST和那么最好的方式,我得到我的IE错误的浏览器解析返回的JSON。