Develop > Business logic layer > Work with the data service layer > Create a query
Validate the query template file syntax
WebSphere Commerce Developer provides a JSP file that you can use to validate the query template file syntax. Query template file syntax validation can only be performed on local instances of WebSphere Commerce. This JSP file cannot be used for remote access and testing.
Procedure
- Open WebSphere Commerce Developer.
- Verify the WebSphere Commerce test server is running.
- Launch the query template validation JSP file by navigating to the following URL: http://localhost/webapp/wcs/admin/servlet/dsl.jsp
The validation JSP file only works correctly when viewed using the Internet Explorer browser.
- Specify the query to validate by providing the following input:
- In the Component list, select the service module that contains the query template file to validate.
- In the XPath keys list, select the XPath key for the query.
- In the XPath entry field, type a WebSphere Commerce extended XPath notation expression to test.
- In the Access Profile list, select an access profile to test.
- In the Store Id field, select the StoreId.
- In the Language Id field, select the Language ID.
- Click Submit Query to test the query.
Results
The page reloads with the following information (where appropriate) about the query:
- Search expression
- Paging count SQL (if the query has paging SQL)
- The XPath to SQL query.
- Parameters (the parameters used in the SQL statements)
- The number of rows returned
- A table of the result rows
- The name of the associated XPath query.
- The associated SQL statement.