[midPoint] Custom Schema Extenstion

Radovan Semancik radovan.semancik at evolveum.com
Wed Sep 18 11:13:06 CEST 2013


Hi,

Multiple schemas are supported. Just place more than file with xsd 
extension in the schemas directory. However, there is catch. Only one of 
the schemas may have annotation <a:extension ref="c:UserType"/>. This is 
somehow implied by XSD principles. Therefore practically you can have 
(only) one extension schema for user, one extension schema for resource, 
etc.

But now that I think about it ... it should be quite easy to merge 
several complex type definitions into one. It would not be strictly 
correct in XSD way, but it would be OK in midPoint/prism way (we have 
unordered elements, Prism is designed to support this). And we are not 
XSD fundamentalists anyway. I guess this would be a nice feature. We 
will implement it. I have created a jira issues to track this:
https://jira.evolveum.com/browse/MID-1600

Thanks for the idea.

-- 

                                            Radovan Semancik
                                           Software Architect
                                              evolveum.com



On 09/17/2013 06:48 PM, Paul Heaney wrote:
> Hello,
>
> Does midPoint support multiple custom schema extensions?  The
> documentation at
> https://wiki.evolveum.com/display/midPoint/Custom+Schema+Extension
> indicates that it does though when I create two schemas with different
> namespaces I get the following exception on start up:
>
> Caused by: com.evolveum.midpoint.util.exception.SchemaException:
> Duplicate definition of extension for type
> {http://midpoint.evolveum.com/xml/ns/public/common/common-2a}UserType:
> CTD ({http://example.co.uk/xml/ns/example/core}UserExtensionTypeCore)
> and CTD ({http://example.co.uk/xml/ns/example/schema2}UserExtensionTypeSchema2)
> at com.evolveum.midpoint.prism.schema.SchemaRegistry.detectExtensionSchema(SchemaRegistry.java:336)
> ~[prism-2.2.jar:na]
> at com.evolveum.midpoint.prism.schema.SchemaRegistry.parsePrismSchema(SchemaRegistry.java:328)
> ~[prism-2.2.jar:na]
> at com.evolveum.midpoint.prism.schema.SchemaRegistry.parsePrismSchemas(SchemaRegistry.java:312)
> ~[prism-2.2.jar:na]
> at com.evolveum.midpoint.prism.schema.SchemaRegistry.initialize(SchemaRegistry.java:282)
> ~[prism-2.2.jar:na]
> at com.evolveum.midpoint.prism.PrismContext.initialize(PrismContext.java:75)
> ~[prism-2.2.jar:na]
> at com.evolveum.midpoint.schema.MidPointPrismContextFactory.createInitializedPrismContext(MidPointPrismContextFactory.java:70)
> ~[schema-2.2.jar:na]
>
> The reason I wish to use multiple extensions is that for our customer
> base there is a common set of additional attributes across them all
> then we wish to add industry specific extensions as well e.g. academia
> requires schools and courses where was commercial does not and this is
> an attempt to keep the core configuration as similar as possible
>
> Regards
> Paul
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint





More information about the midPoint mailing list