Calling object methods in SOAP web services
The SOAP protocol is designed to provide access to object's methods over the TCP connection. In the previous recipe, we published a NAV object, and now we will see how to consume the service provided by the published codeunit and call its methods.
How to do it...
In this recipe, you will create a project in Visual Studio to consume a NAV web service and call a codeunit method.
Run Visual Studio. Create a new project based on the Console Application project template. In the Name field, enter the name of the project:
PostCodeWebServiceClient
.In the Solution Explorer window, expand the contents of the project, right-click on the References section, and choose the option Add Service Reference from the drop-down menu:
The Add Service Reference dialog opens. Click the Advanced button, then choose Add Web Reference.
In the URL field, enter the following address to access the list of published SOAP web services:
http://localhost:7047/DynamicsNAV90/WS/Services...