How to do it...

To create the service wrapper for the service, follow these steps:

  1. Within the solution that your F&O project is held in, create a new C# Class Library project named WeatherService. You can do this by right-clicking on the ConVehicleManagement solution and choosing Add | New project....
  2. Open the properties for the WeatherService project and change the Assembly name and Default namespace fields to Contoso.WeatherService.
  3. Rename the class1.cs file to OpenWeatherService.cs.
  4. The JSON that Open Weather provides for the Current Weather service is as follows:
{"coord": { "lon": 139,"lat": 35}, "weather": [ { "id": 800, "main": "Clear",    "description": "clear sky", "icon": "01n" } ],  "base": "stations",  "main": {"temp": 289.92, ...

Get Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.