- Open your televisionShow folder in Visual Studio Code.
- In Explorer, create a new file named webServices.xml.
- Add the following XML code to the file:
<?xml version="1.0" encoding="UTF-8"?>
<ExportedData>
<TenantWebServiceCollection>
<TenantWebService>
<ObjectType>Page</ObjectType>
<ServiceName>televisionshows</ServiceName>
<ObjectID>50100</ObjectID>
<Published>true</Published>
</TenantWebService>
</TenantWebServiceCollection>
</ExportedData>
You can use the twebservices snippet to create the basic structure for the web services file.
- Add another TenantWebService block to the XML code:
<TenantWebService>
<ObjectType>Page</ObjectType>
<ServiceName>tvshowepisodes</ServiceName>
<ObjectID>50111</ObjectID>
<Published>true</Published>
</TenantWebService>
You can use the twebservice snippet to create the basic structure for a web service. You can add multiple web services to a single file.
- Now, build and publish your application using F5 and log in to your development sandbox.
- In your development sandbox, use the icon to search for Web Services and click the link to open the page.
Filter the list of available web services by applying a filter of tv* to the Service Name field, and you should see the web services that we added in our application:
These web services are now ready to be consumed from an external application!