cordovawcf-data-serviceshybrid-mobile-appvisual-studio-cordovamulti-device-hybrid-apps

How to call a wcf service/Web services using Apache Cordova


I surfed a lot about this issue, but unable to find the solution for this. Here the problem is, I want to connect to a wcf using Apache Cordova and Visual Studio. So if any one found a proper working solution please post the link


Solution

  • It seems you can do this in cordova wit JQuery. See Calling Cross Domain WCF service using Jquery/Javascript

    For this the WCF-Services must have the Attribute

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    

    and the Service-Methods to get Data must decorated with

    [WebGet(ResponseFormat = WebMessageFormat.Json)]
    

    But first, I'm going to checkout the code provided in this SO Question and post the result here.