Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building ERP Solutions with Microsoft Dynamics NAV

You're reading from   Building ERP Solutions with Microsoft Dynamics NAV Solve business scenarios using NAV

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787123083
Length 392 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Stefano Demiliani Stefano Demiliani
Author Profile Icon Stefano Demiliani
Stefano Demiliani
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction to Microsoft Dynamics NAV Architectures FREE CHAPTER 2. Configuring Microsoft Dynamics NAV Web Services 3. Creating an Application Using NAV Web Services 4. Using NAV Web Services with Microsoft Power BI 5. Integrating NAV Web Services and External Applications 6. Extending NAV Pages with Control Add-ins 7. Programming Universal Windows Apps with NAV and Devices 8. Exploring Microsoft Azure and its Services 9. Working with NAV and Azure App Service 10. Implementing a Message-Based Architecture with Azure Service Bus and NAV

Testing the solution


Now our interface is complete and we are ready to test it.

The interesting thing about our solution is that it is REST compliant, so we can directly test a method by using a browser, typing the correct URL (according to what is specified in the service contract), and passing the desired parameters.

For example, to test the item's price retrieval with a JSON response, we can use the http://localhost:35798/B2BService.svc/getPriceJSON?cust=05001041&date=2016-05-30&item=01001&qty=1 URL (the port number here is the debug port that Visual Studio assigns to the local web server, in bold are the parameters):

The result is this:

To retrieve the items list (modified from a particular date, for example 01/01/2015) you can type http://localhost:35798/B2BService.svc/getItemsJSON?date=2015-01-01 in your browser.

This is the returned JSON response:

If we want to test our methods via code (for example from a C# application), we can create a HTTP Request method to our WCF service...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime