0

I have a Windows Phone 8 Application and a WCF Service that implements Callback model. I'm having trouble configuring the service reference. I've tested the service using wsDualHttpBinding for a Windows Form Application Client instead the WP8 App, and it worked perfectly. However, this binding is not suitable for WP8 Apps and I have to change configuration. Can someone suggest me a simple working configuration for the service that works with my WP8 Application?

smn.tino
  • 2,272
  • 4
  • 32
  • 41

2 Answers2

1

Right click on References and Select Add Service Reference

enter image description here

Type your WCF address

enter image description here

Click OK and you should see the Added Web Service

enter image description here

The Visual Studio will automatically implements the WCF service. Then you can use it

MyWebService.Service1Client client = new MyWebService.Service1Client();

I don't know if this can help you.

Alen Lee
  • 2,479
  • 2
  • 21
  • 30
  • Hi Alen, thank you for the answer. This is what I've done to create the Service Reference, but then in the code it was not accessible. Now, I know this problem was that I cannot implement callback model in WP8 App: I have to use Push Notifications. For more details, please see the documentation linked in my answer. – smn.tino Apr 04 '14 at 14:59
0

As explain here: http://blogs.windows.com/windows_phone/b/wpdev/archive/2010/05/03/understanding-microsoft-push-notifications-for-windows-phones.aspx

the problem is due to the fact that it is not possible to implement something like a callback or publish/subscribe model between WP8 App and a Service. This is to avoid energy loss of the phone. So, Microsoft permits notifications from Service using the Microsoft Push Notification Service (MPNS). All is well-explained in the documentation linked above.

smn.tino
  • 2,272
  • 4
  • 32
  • 41