我浏览了以下参考资料,发现可以动态调用 WCF 服务。但是,我无法调用接受参数作为ref和out的服务(方法) 。
有没有办法用ref和out参数进行这样的调用?
我浏览了以下参考资料,发现可以动态调用 WCF 服务。但是,我无法调用接受参数作为ref和out的服务(方法) 。
有没有办法用ref和out参数进行这样的调用?
在不添加服务引用的情况下调用 WCF 服务。如果我知道合同,工作会更好。所以我首先添加了网络引用,将生成的代理复制到实际项目中,然后删除了网络引用,并简单地将方法称为
BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress epAddr = new EndpointAddress("http://192.168.0.233/GMS/GMSService.svc");
GMSContract.IGMSService _interface = ChannelFactory<GMSContract.IGMSService>.CreateChannel(binding, epAddr);
...
bool r = _interface.MyGMSMethod(..., ref ..., out ..., out ...);