Improve WSDL namespace generation for ESDL service
Description
Conclusion
Attachments
Activity

Tim Klemm March 11, 2021 at 12:58 PM
After offline discussions, it has been agreed that a non-scripted solution is appropriate. The attached namespace.md file describes the solution to be implemented. This solution relies on changes to the ESDL definition and binding; it does not define a new scheme as initially proposed. Also, no conditional content is supported; the ESDL definition and binding both support service- and method-specific rules.

Anthony Fishbeck March 6, 2021 at 7:36 PM
I would say that should '@ver' be part of the string, not something we generate. The version itself should be supported for substitution.
I'm really trying to avoid complex configuration schemes when we have a scripting platform that can be made to allow you to do whatever you want. Basically we can support some substitution but after a point we should have a way of doing it in script instead. Even if a simple script to set the namespace is the only script the service uses. More and more the scripting should be the focus of most flexibility.
We may need to add a script that runs at service init time.
I would say:
Provide a simple explicit namespace configuration with variable substitution.
Perhaps allow the service and method namespaces to be defined separately.
Provide a way for the namespace to be completely overridden in script.
A. open Jira(s) for service and method init scripts, including service level namespace setting
B. open a Jira for adding method level namespace override in scripts
If Marius doesn't get what he needs from 1 and/or 2, then we can discuss accelerating 3. For example we could do the method runtime namespace part of #3 sooner than the rest.

Tim Klemm March 6, 2021 at 5:30 PM
Upon further review, the inclusion of {$method} must be conditional in order to recreate the current default behavior. EsdlBindingImpl::generateNamespace may be called with a method name, when generating for an individual method, or without, when generating for the service. This complicates matters because the delimiter between service and method names is omitted when method is unspecified.
This change must introduce markup that enables the delimiter's inclusion to be conditional upon the method's inclusion. A pattern like `urn:mydomain:{$service}[:{$method}]` could produce `urn:mydomain:myservice` for a service's WSDL and `urn:mydomain:myservice:mymethod` for a method's WSDL. This markup includes the delimiter when the method name is not empty and omits the delimiter when the method name is empty; a non-empty variable value will always be included.

Tim Klemm March 5, 2021 at 12:18 PM
I have a couple questions about implementation. First, I chose `full` for the scheme value because it can be a full, or complete, namespace, but is there a better name. Second, the inclusion of version in the default namespace is `@ver=<client-version>` but I'm unsure how much, if any, of `@ver=` should be part of the substitution and how much we should expect in the template.
Details
Components
Assignee
Tim KlemmTim KlemmReporter
Tim KlemmTim KlemmPriority
MajorCompatibility
MinorFix versions
Pull Request URL
Roadmap
Not applicable
Details
Details
Components
Assignee

Reporter

Esdl service namespace configuration includes a base string and an optional scheme string. If the scheme string is `scapps`, the base is ignored in favor of a hard-coded *seisint* specific URL to which the ESDL defined service name is appended. For all other scheme values, the namespace is a lower case concatenation of the base, service name, method name, request optionals, and client version.**
Define a new scheme (`full` suggested) that treats the base as a template for a complete namespace. The namespace will be the result of converting the base to lowercase and applying the following variable substitutions:
`{$service}` the service name as lowercase text
`{$method}` the method name as lowercase text
`{$optionals}` a comma delimited list of lowercase requested optionals (e.g., "internal") surrounded by parentheses, or empty if no optionals are requested
`{$version}` the requested client version, or default if not specified
`{$esdl-service}` the ESDL defined service name, with case maintained
`{$esdl-method}` the ESDL defined method name, with case maintained
The use of `service`, `method`, `optionals`, and `version` enable the default namespace to be generated. The use of `esdl-service` enables the `scapps` namespace to be generated. A user defined combination of variables enables fuller control over the generated value.