Oracle Commerce Workbench can pass information to an extension through URL tokens in order to enable the extension to authenticate users, connect to the EAC Central Server, and maintain its state if a user navigates away from the extension and back again during the same session.
You use URL tokens by specifying them in the url attribute of the
extension definition in
%ENDECA_TOOLS_CONF%\conf\ws-extensions.xml
. The name of
the URL parameter does not have to match the id of the token as listed in the
preceding table.
For example, the following extension definition creates a URL that passes the EAC host, port, and application to the extension:
<?xml version="1.0" encoding="UTF-8"?> <extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensions.xsd"> <extension id="testExtension" defaultName="Test Extension" defaultDescription="Demonstrates extensions with tokens." url="http://www.example.com:8989/TestExtension/index.jsp?eac-host= ${EAC_HOST}&eac-port=${EAC_PORT}&eac-app=${EAC_APP}"> </extension> </extensions>
Note the use of the & entity in the url attribute in place of the
ampersand in the URL. In general, you should ensure that the
ws-extensions.xml
file validates against the provided
schema before updating Oracle Commerce Workbench with the new configuration.