Data Mapping Editor buttons
New – To create a new data mapping record click New.
Cancel – Use Cancel to cancel the creation of an new entry. The Cancel button replaces the New button a save of the entry is made.
Save – Click Save to save a new record or any changes to an existing record. New records will appear under the List of Data Mappings column on the left hand side of the editor.
Delete – After selecting an existing mapping record from the List of Data Mappings list on the left hand column, click Delete to delete the record.
Data Mapping Editor parameters
Choosing Data Element Names – The names that are used for Data Elements must ensure that no Special Characters or Reserved Keywords are used. Refer to Govern Keywords for a list of keywords that should not be used.
Oracle Users and Data Element Names
Due to the case sensitivity of table names, a convention of all Uppercase or all Lowercase names should be decided upon. Do not use any Oracle Keywords for Data Element Names.
Data Element Name
Specify a Data Element Name for the mapping record. This is a unique name that must be included in the request from the external application to the Web service.
NOTE: This field has a maximum of 15 characters; no special characters or spaces are allowed. |
Enter a descriptive name for the mapping record that will be used in the following parameters:
English Short Description – Enter a short description for the mapping record. This is useful for fast data entry and look-ups if space is limited on the forms.
English Long Description – Enter a long description for the mapping record. This will be displayed for look-ups on forms and is normally used for reporting.
Second Language Fields
When there is a 2nd language, or multiple languages, ensure that these description fields are also completed; i.e. French Short Description, and French Long Description.
Table Name – From the drop down menu, select the name of the Govern table that the data will be mapped to. Available tables are:
- PC_LEGAL_INFO
- PC_AREA
- PC_PARCEL
Column Name – The table columns that are listed are filtered according to the table that is selected in the Table Name parameter.
Creating a Data Map record
To create a data map record, use a Data Element Name that will be acceptable to the requesting external application. This name will be used in the method that will be sent to the Web service.
- On the GNA ribbon, select Editors (tab) > Data Mapping Editor…
- Click New in the Data Mapping Editor.
- Locate the parameter called Data Element Name; enter the Data Element Name.
- If not expanded click the expansion arrow (A) to display the additional parameters in the form; complete the parameters.
- Select a table from the Table Name drop down menu.
- Choose a column name within the table that was selected.
- Click Save to save the mapping record to database.
When the external application makes a request to the web service, if the Data Element Name is in the method, the data will be retrieved, updated or deleted from the Govern database.
Testing a Web Service Request
As an example, we want to make a request that will obtain the tax map and the zoning information of the following Parcel ID’s, 16800, 16804, and 16807. This can be done in three (3) steps.
STEP 1 – Create the data mapping records
It is necessary to create the data mapping records for the elements that will be called in the method structure. For our example we will be using the pcTaxMap and areaZoning elements.
- On the GNA ribbon, select Editors (tab) > Data Mapping Editor…
- Click New, to create a new Data Mapping Record.
- Enter a Data Element Name of pcTaxMap.
- Click to expand the fields and enter an English Short and Long Description; enter PC Tax Map as a description.
- The tax map information will be coming from is the PC_AREA table in the ZONING column; select PC_PARCEL for the Table Name, and TAX_MAP for the Column Name.
- Click Save to save your mapping record.
Repeat the above steps to create the areaZoning data element. Use PC Area Zone as the description. The Table Name and Column Name are PC_AREA and ZONING
STEP 2 – Create the XML request structure
Refer to the Service Contract section of the MS Govern Property Control System Service API guide; this will provide you with the expected structure of the MSGovern_GetElementValue function. From the guide we obtain the following information:
Function MSGovern_GetElementValue (
ByVal strXmlElement As String ) As String
The retrieve elements must in structure of xml:
<?xml version=”1.0″ encoding=”utf-8″?>
<getElementValue>
<ParcelIds>
<ParcelId value=”16800″/>
<ParcelId value=”16807″/>
<ParcelId value=”23452″/>
</ParcelIds>
<ElementItems>
<ElementItem name=”areaZoning”/>
<ElementItem name=” areaSchDist “/>
</ElementItems>
</getElementValue>
For our example we will use the following…
<?xml version=”1.0″ encoding=”utf-8″?>
<getElementValue>
<ParcelIds>
<ParcelId value=”16800″/>
<ParcelId value=”16804″/>
<ParcelId value=”16807″/>
</ParcelIds>
<ElementItems>
<ElementItem name=”pcTaxMap”/>
<ElementItem name=”areaZoning”/>
</ElementItems>
</getElementValue>
The Parcel ID’s that we are requesting are specified within the <ParcelIds> tags. our Element Items are specified within the <ElementItems> tags. Note that the names are identical to what was specified in GNA in STEP 1 above.
NOTE: Verify that the XML structure is identical to specifications in the MS Govern Property Control System Service API document. |
Always ensure that the Element Item name is identical to the one created in GNA.
STEP 3 – Validate the XML request with the Test Client
Locate the WcfTestClient.exe application that is included with the WCF PC Web Services package. This program is usually located in a folder called Test Application. Refer to the MS Govern Property Control Service Setup and Configuration guide for details about using the test application.
- Start the test application; add the WCF Service.
- On the left hand side, under the list of available methods in the service, locate the MSGovern_GetElementValue() method.
- Double click on the method to load it in the Test Client.
NOTE: A limitation of the supplied test client is that Return characters and Line feeds are not recognized. These characters must be manually removed in the editor. |
As an example, the following formatting will become a single line when the returns and line feeds are removed.
<?xml version=”1.0″ encoding=”utf-8″?>
<getElementValue>
<ParcelIds>
<ParcelId value=”16800″/>
<ParcelId value=”16804″/>
<ParcelId value=”16807″/>
</ParcelIds>
<ElementItems>
<ElementItem name=”pcTaxMap”/>
<ElementItem name=”areaZoning”/>
</ElementItems>
</getElementValue>
becomes…
<?xml version=”1.0″ encoding=”utf-8″?><getElementValue><ParcelIds><ParcelId value=”16800″/><ParcelId value=”16804″/><ParcelId value=”16807″/></ParcelIds><ElementItems><ElementItem name=”pcTaxMap”/><ElementItem name=”areaZoning”/></ElementItems></getElementValue>
The above is only a charateristic of this test client; other clients may differ in behavior.
4. Copy the single line version of your XML code and paste it into the Value field in the Test Client.
5. Click Invoke; any errors will be displayed in a dialog box.
6. When the action is successful, a response is displayed in the Response pane of the Test Client.
Viewing the Results
In the Test Client, the request and response parameters can be displayed in two (2) modes, Formatted, and XML. You can switch between the two views with a click on the corresponding tabs along the bottom of the Request pane. When you are in XML mode results from the successful requests to the Service can be observed.