SOAP encoding in Windows Store App

2019-06-24 00:58发布

I am trying to create a Windows Store App that consumes a web service. Visual Studio denies to create service proxy methods with following warning in logs:

Custom tool warning: Contract ... is not compatible with Windows Store apps because it contains one or more operations with SOAP Encoding (use='encoded'). Only the non-encoded operations will be generated.

So the questions are:

Where can I find full list of Windows Store app limitations on web services consumption?
Are there any known workarounds (given I can't change the service)?

2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-06-24 01:51

You can create a NETStandard class library to reference the webservice, then reference this library to your web project.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-06-24 02:01

It seems you're pretty much screwed if you can't change the web service because of the way that any wrappers are most likely SOAP encoded, and also the SOAP Toolkit doesn't allow for much output customisation.

Perhaps writing a (possibly functionally duplicated) web.api based webservice is a better solution? See this link for an example

EDIT: In response to the first comment...

Yes and no; essentially create a REST (whether that be webapi, WCF etc is upto you) wrapper.

See these informative posts on creating a REST wrapper:

helpfull post number 1 and helpfull post number 2

查看更多
登录 后发表回答