Creates an URL from the template URL assigning values to the parameters that appear in the template.
The parameters are passed as a dictionary, the key is the parameter name, the value is the value of the parameter. The function URL encodes the parameter values. An exception is thrown if a mandatory parameter cannot be found in the dictionary.