Following are the salient points of the design:
1. Ability to provide grouping of properties.
For example: jms:message has following groups
JMS Message messageType textPart JMS Message Headers correlationIdPart deliveryModePart Encoding use encodingStyle2. Ability to specify order of groups.
1. Create a xml snippet based on nb_all\xml.wsdlui\src\org\netbeans\modules\xml\wsdl\ui\property\model\propertyCustomization.xsd (See Notes below)
2. Add this snippet into the element(whose attributes are customized in this xml snippet). The snippet should be added under:
<xsd:annotation>
<xsd:appinfo>
<prop:ElementProperties xmlns:prop="http://xml.netbeans.org/schema/wsdlui/property">
.
.
.
</prop:ElementProperties>
</xsd:appinfo>
</xsd:annotation>
3. For BuiltinCustomizers, the documentation can be found in appropriate sections of propertyCustomization.xsd and most of the names are self-explanatory.
4. In case of NewCustomizer, a SPI needs to be implemented (create the class and add in META-INF\services etc)
org.netbeans.modules.xml.wsdl.ui.spi.WSDLLookupProvider
public interface WSDLLookupProvider {
Lookup.Provider getProvider(String namespace);
}
This is unique per namespace (or schema). So each BC will have one implementation of WSDLLookupProvider.
public interface NewCustomizerProvider {
Node.Property getProperty(ExtensibilityElement element,
QName elementQName,
QName attributeQName);
}
This provides the custom chooser in the form of Node.Property instance. Single instance of NewCustomizerProvider, acts like a factory to create different NewCustomizer(s) based on the elementQName and attributeQName.
When NewCustomizer is specified, the wsdl editor will first try to get the WSDLLookupProvider for the namespace and then ask for a instance of NewCustomizer.class from the lookup. And call getProperty on the NewCustomizer, which should provide the Node.Property (which will have the customizer implemented)
Also note that only implementation of WSDLLookupProvider needs to go into META-INF\services folder.
Example for WSDLLookupProvider and NewCustomizerProvider can be found at WSDLExtLookupProvider in wsdlui for showing bpel property name attribute.
Validate your schema after your changes using Netbeans schema editor or better if you use it to edit it too
Also open your BC schema file in Schema editor, select the element that you want to customize. Select\Add annotation and add appinfo under annotation.
Open WSDL Editor and create the node which represents the element that you want to customize. Open the property sheet.
Looking at the attributes in the property sheet, you can edit the XML file in netbeans editor. Once you are done configuring the element, copy the xml snippet from the root node "ElementProperties" and paste it in the appinfo element in your schema. Make sure that you delete the xmlns:xsi and xsi:schemaLocation attributes from the ElementProperties in your schema file.
Examples can be found:
in wsdlExtension: jms-ext.xsd
in wsdlextui : soap.xsd
in wsdlui: ws-bpel_varprop.xsd