如何在我的Silverlight应用程序中调用两个WCF服务? [英] How to call two WCF services in my silverlight application?

查看:40
本文介绍了如何在我的Silverlight应用程序中调用两个WCF服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我有两个WCF服务:

  1. xyz.svc

I have added these to my Silverlight application successfully.

我正在调用WCF服务,如下所示:

I am calling WCF services as shown below:






 Uri service = new Uri(Application.Current.Host.Source, "../ALBLSalesDataService.svc");      Uri service2 = new Uri(Application.Current.Host.Source, "../ALBLTargetDataService.svc");      ALBLSalesDataServiceClient oSoapClient = new ALBLSalesDataServiceClient("CustomBinding_ALBLSalesDataService", service.AbsoluteUri);      ALBLTargetDataServiceClient oSoapClient2 = new ALBLTargetDataServiceClient("CustomBinding_ALBLTargetDataService", service2.AbsoluteUri);









        oSoapClient.GetDataAsync(new DateRange(dt1,dt2), new name(str), ++requestId);





        oSoapClient2.GetDashboardTargetAsync(new DateRangee(dt1,dt2), new name(str), ++requestId);







 

推荐答案

这是什么意思,表示您没有获取任何数据?接到电话?如果是这样,它们的eventargs参数的属性是什么?
What do you mean that you're not getting any data? Are the XXXCompleted methods (oSoapClient_GetDataCompleted, oSoapClient2_GetDashboardTargetCompleted) getting called? If so, what are the properties of their eventargs parameter?


这篇关于如何在我的Silverlight应用程序中调用两个WCF服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆