Continuing from my previous post. Find the link to access the same in case you missed it.
Step 1: Create a XML Port to Export Data in XML Format using XMLPort and save at some specified Location.
Here we will be creating just for demo purpose simple XMLPort for Exporting Data from Navision Database in XML Format.
We are using very simple structure for our XMLPort.
Make sure you set the properties accordingly as we are exporting the data in XML Format.
Save the XMLPort at available id and suitable name.
Step 2: Create a Codeunit to call XML Port and retrieve data in XML Format in Text Variable.
Here we will create a Codeunit with few helpful functions which will call the XMLPort to Export the data and save in temp file.
Further retrieve the data from the file in XML Format.
Return the data retrieved above to the calling program/ function.
To start with let us start with creating some Global Variables.
Next we will add one Function as below.
Next we will add one more Function as below.
Save the Codeunit at available Id and suitable Name.
Step 3: Expose/Publish the Codeunit as web service.
Open Web Services Page and add your Codeunit created above. Use your relevant ID on which you saved your Codeunit.
Tick the Published to Expose the Codeunit as Web Service.
Rest in my Next post.
To Be Continued……