A simple way to extract MES Queries from the current MES User Interface is to use Fiddler: http://www.fiddler2.com/fiddler2/

 Install this program on your computer.

 To grab the MES Query for a specific list box take the following actions (see below for the corresponding screen grabs):

  1. Open the MES System
  2. Select the list box you would like to get the MES Query from (The query that created the data that is shown in the listbox)
  3. Open the fiddler program.
  4. Press CNTR X to clear all displayed events
  5. Press the Excel Export button in the MES Application
  6. This will show a couple of new lines in Fidler
  7. Click the line above the /ExcelExport.ashx
  8. In the right panel click the Inspectors main tab
    1. Click the Header sub tab
    2. Scroll down and see if under ‘Miscellaneous’ it shows:
      X-AjaxPro-Method: mGenerateExcelFile
    3. If so, you have the correct request.
  9. Go to the TextView sub tab. This will show you the query that was sent to the server to get you the Excel Data for the listbox.

10)  You can view it in the Notepad editor


After opening Fiddler and pressing CTRL X press the Excel Export in the MES Application. If you were fast you will get what is show in the above picture, with only 2 sessions shown in the left pane.
The first sends the list box query to the server. The second is the reply of the server. To get the MES Query, click the first session.


In the right pane, click the Inspectors tab and click the Headers sub-tab and scroll down. Here you will see the name of the request sent to the server under under ‘Miscellaneous’ it shows:

X-AjaxPro-Method: mGenerateExcelFile


 When you click the TextView sub tab, you will get a display of the full command that was sent to the server. From this text you can extract the 4 parameters you need for the EZ_SoapReader.


To make it easier you can click the ViewInNotepad button.

To test the query in the EZ_SoapReader you have to extract the EZ_SoapReader arguments:

  1. "arJSColm" is S_arJSColm.
    Copy the square brackets behind the colon (in cluding al content, it can help you put in some carriage returns, but remember to remove them when you cut and paste into the EZ_SoapReader)
  2. "o" is S_o
    Copy the curly brackets with the content and paste it into the EZ_SoapReader
  3. "arCheckVals" = S_arCheckVals
    Copy the square brackets with content.
  4. "oSort" = S_oSort
    Copy the curly brackets with content

[…] Square brackets represent an Array in JSON


 {…} Curly brackets represent an Object in JSON


Source: http://www.json.org/


Useful Links