[midPoint] Custom Schema and ProtectedString

Radovan Semancik radovan.semancik at evolveum.com
Tue Oct 1 16:49:05 CEST 2013


Hi Paul,

Yes, it should work. However midPoint schema extension is XSD schema as 
any other. If you want to use datatypes from other schema you have to 
import it. Therefore use proper <xsd:import>:

<xsd:schema elementFormDefault="qualified"
             targetNamespace="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
             xmlns:tns="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
             xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-2"
             xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">

     <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"/>

     <xsd:complexType name="UserExtensionType">

................

-- 

                                            Radovan Semancik
                                           Software Architect
                                              evolveum.com




On 10/01/2013 12:32 PM, Paul Heaney wrote:
> Hi,
>
> Within my custom schema I need to store some data in an encrypted form
> so I though I could use the ProtectedStringType though when I try and
> start midPoint I get the following error:
>
> 2013-10-01 11:24:25,447 [main][] ERROR
> (c.evolveum.midpoint.prism.schema.SchemaHandler): Error occured during
> schema parsing: [Error] on line 34 at
> file:///var/lib/tomcat6/SystemId, null undefined simple or complex
> type 'c:ProtectedStringType'
>
> My custom schema includes:
>
> <xsd:schema elementFormDefault="qualified"
>              targetNamespace="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
>              xmlns:tns="http://justidm.salfordsoftware.co.uk/xml/ns/justIDM"
>              xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-2"
>              xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"
>              xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>      <xsd:complexType name="UserExtensionType">
>          <xsd:annotation>
>              <xsd:appinfo>
>                  <a:extension ref="c:UserType"/>
>              </xsd:appinfo>
>          </xsd:annotation>
>
>
>          <xsd:sequence>
>
>              <xsd:element name="topSecret" type="c:ProtectedStringType"
>                  minOccurs="0" maxOccurs="1" />
>          </xsd:sequence>
>
>      </xsd:complexType>
>
> </xsd:schema>
>
> Should this work?
>
> Thanks
> Paul
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint





More information about the midPoint mailing list