The wimxmlextension.xml file
The wimxmlextension.xml file is used to store the schema of the custom entity types and property types in XML format.
The schema of this XML file is defined in wimschema.xsd.
When exploiters call the virtual member manager create API to create new property and entity types at run time, the schema of these new types is written to the wimxmlextension.xml file in XML form. When virtual member manager starts up, after loading the schema from XSD files, virtual member manager reads this XML file and dynamically adds the schema defined in this file to the ECore model in memory.
You can also directly add new schema to this XML file at deployment time.
The following extensions can be defined in the wimxmlextension.xml
file:
- New entity types and associated properties. New entity types have to extend from the virtual member manager built-in entity types (for example, ContactPerson entity extends from wim:PersonAccount in the example that follows).
- New property types that are added to the virtual member manager built-in entity types and new entity types. (for example, the property cellPhone is added to both PersonAccount and ContactPerson in the example that follows).
The following is a sample wimxmlextension.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sdo="commonj.sdo"
xmlns:wim="http://www.ibm.com/websphere/wim">
<!-- Define a new entity type called ContactPerson in a different namespace -->
<wim:entitySchema nsPrefix="yourext"
nsURI="http://www.ibm.com/websphere/yourext"
entityName="ContactPerson"
parentEntityName="PersonAccount">
</wim:entitySchema>
<!-- Define a new property type called cellPhone and add it to both ContactPerson and PersonAccount.-->
<wim:propertySchema nsPrefix="yourext"
nsURI="http://www.ibm.com/websphere/yourext"
dataType="String"
multiValued="true"
propertyName="cellPhone">
<wim:applicableEntityTypeNames>ContactPerson</wim:applicableEntityTypeNames>
<wim:applicableEntityTypeNames>PersonAccount</wim:applicableEntityTypeNames>
</wim:propertySchema>
</sdo:datagraph>
Note: For more information about using the propertySchema and extensionPropertySchema
data objects, see the section, Extending property schema in
the topic, Programming prerequisites. Also read
about Configuring a property extension
repository in a federated repository configuration in the WebSphere
Application Server information center.