WSDL extensibility element processing

When extensibility elements are encountered during the processing of a WSDL document, WSRR will check to see if any parser extensions have been registered for that element's namespace; if any are found, the parseElement() method of the extensions will be invoked.

The parseElement() method is passed a WSRR ExtensionLogicalObject SDO instance where the "name", "namespace", "version" and "description" properties have been preset based on the enclosing WSDL element. The "extensionNamespace" property will also have been preset to the namespace of the extensibility element. In addition, the method is passed an org.w3c.doc.Element parameter that contains a standard DOM representation of the XML for the extensibility element itself.

The parser extension can examine the contents of the DOM representation and add metadata properties to the WSRR ExtensionLogicalObject; these properties will be persisted in the WSDL models stored in WSRR for later use. Such properties are added using the BSRSDOHelper.addProperty() method. An "extensions" property on the stored WSDL objects can be used to locate any ExtensionLogicalObject objects that were processed in the corresponding WSDL element.

When processing the extensibility elements contained in any given WSDL element, only one WSRR ExtensionLogicalObject per extension namespace will be created. This same object instance will be passed to all parseElement() calls related to that namespace in the WSDL element. In the example, three ExtensionLogicalObjects will be stored in WSRR, as follows:

When processing the extensibility elements in the <binding> element, the parseElement() method calls, for the two elements in the "ns1" namespace, will both receive the same ExtensionLogicalObject instance, to which they can add their own specific metadata properties.