Consuming a web service is always very exciting in any technology. I wanted to explore the same in AX 2012. You can download the official document regarding same using the below link:
Source Link: Here
I tried to consume the web service mentioned in the downloaded documents and made some modifications as well to suit my requirements and it worked pretty well. But it was all like working as per the document and being happy on something which was already accomplished. I wanted to consume another web service. So, I searched the internet a bit and found out a web service to check the weather conditions of a city and here are the steps to get this done:
1. Create a new project:
2. Add the service reference by right clicking the project name and click on “Add service reference”. Enter the URL of the web service in the address box and click ‘GO’ to validate the web service. Change the namespace and click ‘OK’ button:
3. Add the project to the AOT:
4. Set the deployment properties:
5. Restart the Microsoft Dynamics AX client. This is an important step.
7. Write a job in X++ in AX 2012 to access the web service and output the result set:
Below is the output of the job:
Happy DAXing !!!
6. Go to AX 2012 and verify the changes in service reference