SOAP Service Reference in Windows Phone 8.1 Universal app

霸气de小男生 提交于 2019-12-22 04:42:47

问题


I try to add a reference to a SOAP WebService. No problem adding it to the Windows 8.1 part of the project.

But no chance to do the same for the WP 8.1. Somehow I could only add a new "Push Notification" as a reference.

Adding the generated reference.cs to the WP project directly leads to many unresolved references in System.ServiceModel (i.e. System.ServiceModel.Channels not found).

Any idea? Maybe its not in the current beta?

VS 2013 Update 2 RC.


回答1:


While not a proper solution, a workaround has been posted by Microsoft: WCF Add Service Reference Not Supported for Windows Phone 8.1 XAML Applications

Windows Phone 8.1 XAML applications does not support the System.ServiceModel namespace, and therefore you are not able to right click references in the project and choose Add Service Reference. The recommended solution is to add a REST endpoint to your WCF endpoint, and access the WCF application through the REST endpoint using HttpClient.



来源:https://stackoverflow.com/questions/22894967/soap-service-reference-in-windows-phone-8-1-universal-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!