Using a third party web service from lightswitch


  • I have a project that requires connecting to a postcode lookup web service.

    I have tried in vain to get it working in lightswitch and have seen some replies about wrapping it in a ria service,which just totally confuses me.

    Can anyone point me in the right direction(idiots guide) to do this.

    Thanks in advance

    Wednesday, April 13, 2011 5:45 PM

All replies

  • Hi Martin,

    I recommend taking a look at the LightSwitch Training kit. There's a lab there called 'LightSwitch Data Source Extensions' which describes how to write a RIA service.



    • Proposed as answer by Yann Duran Thursday, April 14, 2011 12:14 AM
    Wednesday, April 13, 2011 7:25 PM
  • Thanks Tim
    Wednesday, April 13, 2011 8:51 PM
  • Tim

    Thanks for the reply but that it really far too complex for a beginner like me, who just wants to send 3 query params to the web service and return an address.

    Does anyone have a simpler example that I can follow ?




    Thursday, April 14, 2011 7:46 AM
  • How about Dan Moyer's excellent article on connecting to a WCF service from LS: http://www.danlmoyer.com/?p=130

    It sounds like your web service already exists and you just need to call it, so you can probably ignore the part in his article on how to create the service and just concentrate on the consuming part.

    Hope this helps

    • Proposed as answer by novascape Thursday, April 14, 2011 9:41 AM
    Thursday, April 14, 2011 9:40 AM
  • Xander

    thanks for that ,I am getting a little stumped at the part----

    "Add another file called LSProxy.cs to your project. LSProxy will implement the calls to the WCF service and encapsulate the complexities of managing asynchronous method calls. "

    Can anyone tell me if I should be using  SLSvcUtil to generate this file or is it something I should be writing manually ?

    Thanks in advance for any help.




    Friday, April 15, 2011 8:11 AM
  • Martin

    Are you still searching for an answer? I did a sample for you and it works with third party zipcode web service (http://www.webservicex.net/uszip.asmx).  

    But I didn't use Service Reference though, but it is Web Reference.  If you are interested plz let me know.

    Saturday, April 16, 2011 3:29 PM
  • Bala -Yes please that is exactly what I am looking for :)


    Thank you



    Saturday, April 16, 2011 7:06 PM
  • Martin,

    Here it is.  I'm a part time coder. So don't expect too much from me. :)



    • Proposed as answer by PowerBala Saturday, April 16, 2011 10:03 PM
    Saturday, April 16, 2011 10:03 PM
  • Thanks PowerBala Im on holiday at the moment but this gives me something to look at when I come back.

    Much Appreciated



    Thursday, April 21, 2011 3:35 PM