Loading

WINCE 通过WCF方法调用

 wince直接通过WEB 引用生成的远程调用的代理文件不能够通过写WCF的方法进行调用处理,要达成目的,需要NetCFSvcUtil.exe这个工具生成代理类,

  之后就可以写如下代码进行调用了

            System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
            binding.MaxBufferPoolSize = 524288;
            binding.MaxBufferSize = 65536 * 4;
            binding.MaxReceivedMessageSize = 65536 * 4;
            binding.ReceiveTimeout = new TimeSpan(0, 10, 0);

            EndpointAddress address =
              new EndpointAddress("url");

           proxyObject client = new proxyObject(binding, address);

 

posted @ 2019-01-07 10:56  奔跑石头  阅读(162)  评论(0)    收藏  举报