3

Working on a Windows 8 (metro style) application, and want to reference a service hosted by ServiceStack from it. Since I cannot use the C# client objects provided by ServiceStack (can't reference the DLL from a Windows 8 project) I figured I'd have to fall back to adding a service reference using svcutil or from within VS 2012. When I do this, I get the following error:

Warning 5 Custom tool warning: Endpoint 'WSHttpBinding_ISyncReply' at address 'http://localhost/ServiceStackRD/soap12' is not compatible with Windows Store apps. Skipping... C:\Development\GridPresenter\GridPresenter\Service References\ServiceReference2\Reference.svcmap 1 1 GridPresenter

Does anybody know what makes an endpoint "not compatible with Windows Store apps?" If so, how do I tell ServiceStack to modify the endpoint definition to make it play nice with Windows 8 apps? Thank you.

1 Answers1

2

SOAP and WSDLs are an ugly solution on any new platform, you have to get too many moving parts right for it to work properly.

The path of least resistance would be to use a C# HTTP Client that supports a Windows 8 Metro app and just parse the JSON returned from ServiceStack's JSON services. Here's an example of parsing GitHub's 3rd party API using these WebRequest extensions in ServiceStack.Text.

The community has yet to contribute a Windows 8/Metro App build of ServiceStack.Text so you will likely have to use another JSON serializer that does support it.

mythz
  • 141,670
  • 29
  • 246
  • 390
  • 1
    Thanks for the advice. I may still go ahead and do this. But in the meantime, I wanted to let you know that I was able to get it working by using the SOAP 1.1 endpoint /soap11 instead of the /soap12 endpoint. The former uses the BasicHttpBinding instead of WSHttpBinding. Evidently Windows Store Apps want BasicHttpBinding instead of WSHttpBinding. – user1715574 Oct 04 '12 at 19:29