Custom extension XSD files
Custom extension XSD files are used for defining custom extension schema.
Custom extension XSD files are used for defining custom extension
schema, including new property, entity and control types. Virtual
member manager provides a sample extension XSD file called wimextension.xsd
with the namespace URI, http://www.yourco.com/wim/ext. You can create
your own XSD files, as long as you import the virtual member manager
built-in schema (wimdatagraph.xsd) and have a namespace different
from the virtual member manager built-in namespace, http://www.ibm.com/websphere/wim.
Note: The
wimdatagraph.xsd and supporting files are now located in VMM_SCHEMA_HOME/model
directory. If you were already using the wimextension.xsd file before
upgrading to WebSphere Application Server version 7, you must update
the wimextension.xsd file to point to new location of the wimdatagraph.xsd
file after upgrading to WebSphere Application Server version 7.
You can put your custom extension XSD files in any location, however,
you must define the path in the wimconfig.xml file so that virtual
member manager can find the files. If you put your extension XSD files
under <VMM_HOME>\model directory, you do not need to define the
path.
Note: VMM_HOME
is directory where the sample extension schema file is located. This
location is either the system property wim.home or user.install.root/config/cells/local.cell/wim.
VMM_SCHEMA_HOME is the directory where the system schema files are
located. This location is set to either the system property wim.schema.home
or was.install.root/etc/wim/schema.
The following extensions can be defined in custom extension XSD
files:
- New custom properties such as the organizationalStatus property in the example that follows.
- New entity types and associated properties. New entity types have to extend from the virtual member manager built-in entity types (for example, the EPerson entity which extends from wim:PersonAccount in the example that follows).
- New control types. New control types have to extend from the virtual member manager built-in control types.
Note: In these XSD files, new property types cannot be added
to the virtual member manager built-in entity types like PersonAccount
or Group.
The following example shows the beginning structure of the wimextension.xsd
file.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.yourco.com/wim/yourext"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:yourext="http://www.yourco.com/wim/yourext"
ecore:package="com.ibm.websphere.wim.model.ext"
xmlns="http://www.ibm.com/websphere/wim">
<xsd:import schemaLocation="wimdatagraph.xsd"
namespace="http://www.ibm.com/websphere/wim"/>
<!-- Custom properties -->
<xsd:element name="organizationalStatus" type="xsd:string"/>
<!-- Custom entities -->
<xsd:complexType name="EPerson">
<xsd:complexContent>
<xsd:extension base="PersonAccount">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" ref="yourext:organizationalStatus"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
If multiple custom extension XSD files exist (for example, MyExt1.xsd, MyExt2.xsd and MyExt3.xsd), they must import from one to another one like a chain (MyExt3.xsd imports MyExt2.xsd, MyExt2.xsd imports MyExt1.xsd). The last one imports the virtual member manager built-in schema (MyExt1.xsd imports wimdatagraph.xsd).