如何使用xamarin表单中的WCF服务以及拉取或推送数据的步骤。 [英] How to consume WCF service in xamarin forms and steps to pull or push data.

查看:146
本文介绍了如何使用xamarin表单中的WCF服务以及拉取或推送数据的步骤。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照以下流程



1)右键单击PCL项目添加服务参考 - 已完成的流程 - 参考文件已成功生成。



2)虽然抛出了异常下的客户端类的创建实例。



MonoTouch不支持动态代理代码生成。覆盖此方法或其来电以重新调整......







请指导我如何才能在Xamarin表单应用程序中使用WCF服务



我尝试过:



- 尝试使用Silverlight和一般svcutil.exe的

- 生成类库DLL生成代理 - 这工作控制台应用

解决方案
从粘贴错误信息到谷歌第二次打击:

xamarin.ios - 的MonoTouch / WCF:如何消费没有svcutil的wcf服务 - Stack Overflow [ ^ ] < br $>


您需要覆盖 ChannelFactory< T> CreateChannel 方法c $ c>上课。 StackOverflow线程有一个例子。


I have followed below process

1) Right Click on PCL project add service reference - completed process - reference file has been generated successfully.

2) while create instance of client class below exception has been thrown.

MonoTouch does not support dynamic proxy code generation. Override this method or its caller to retu…...



Please guide me how i can consume WCF service in Xamarin forms application

What I have tried:

-Try to generate proxy using silverlight and general svcutil.exe
-Generated class library dll - which working on Console applications.

解决方案

Second hit from pasting the error message into Google:
xamarin.ios - Monotouch/WCF: How to consume the wcf service without svcutil - Stack Overflow[^]

You need to override the CreateChannel method in the ChannelFactory<T> class. The StackOverflow thread has an example.


这篇关于如何使用xamarin表单中的WCF服务以及拉取或推送数据的步骤。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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