Book Image

Microsoft Dynamics AX 2012 R2 Services

Book Image

Microsoft Dynamics AX 2012 R2 Services

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R2 Services
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Consuming a document service


Let's head to Visual Studio and start consuming the document service that we created. You can open the Visual Studio project for this chapter, included in the code files for the book, to see the service in action.

If you are a more experienced Visual Studio user, you can create a project yourself by performing the following steps:

  1. In Visual Studio, create a project for a console application by navigating to File | New | Project….

  2. In the Installed Templates section, navigate to Visual C# | Windows.

  3. Choose a project of type Console Application, insert a name and location for the project, and click on OK.

To add the service reference, perform the following steps:

  1. In Solution Explorer, right-click on the name of your project and click on Add Service Reference….

  2. Enter the WSDL location in the Address field and click on Go. Of course, you'll need to replace DYNAX01:8101 with the server and port of your installation. You should see a form that looks similar to the following...