wimxmlextension.xml 文件用于以 XML 格式存储定制的实体类型和属性类型的模式。
在 wimschema.xsd 中定义此 XML 文件的模式。
当开发人员调用 virtual member manager 创建的 API,以在运行时创建新属性和实体类型时,这些新类型的模式将以 XML 格式写入到 wimxmlextension.xml 文件。当 virtual member manager 启动时,它会在装入 XSD 文件中的模式后读取此 XML 文件,并将在此文件中定义的模式动态添加到内存中的 ECore 模型。
您也可以在部署时将新模式直接添加到此 XML 文件。
<?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>