<div dir="ltr">Is there a reason for having to add a new complextype and not just use the one already there and add your attributes? It would look like below,<div><br></div><div><div><xsd:schema elementFormDefault="qualified"</div><div>            targetNamespace="<a href="http://example.com/xml/ns/mySchema">http://example.com/xml/ns/mySchema</a>"</div><div>            xmlns:tns="<a href="http://example.com/xml/ns/mySchema">http://example.com/xml/ns/mySchema</a>"</div><div>            xmlns:a="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3">http://prism.evolveum.com/xml/ns/public/annotation-3</a>"</div><div>            xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</div><div>            xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"></div><div> </div><div>    <xsd:complexType name="UserExtensionType"></div><div>        <xsd:annotation></div><div>            <xsd:appinfo></div><div>                <a:extension ref="c:UserType"/></div><div>            </xsd:appinfo></div><div>        </xsd:annotation></div><div>        <xsd:sequence></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span><xsd:element name="idExercicio" type="xsd:string" minOccurs="1"></xsd:element></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span><xsd:element name="dataInicioExercicio" type="xsd:dateTime" minOccurs="1"></xsd:element></div><div>        <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><xsd:element name="dataFimExercicio" type="xsd:dateTime" minOccurs="0"></xsd:element>            </div><div>        </xsd:sequence></div><div>    </xsd:complexType></div><div></xsd:schema></div></div><div><br></div><div><br></div><div><br></div><div>As for your way I think you have to reference the type,</div><div><br></div><div><div style="font-size:12.8px">    <xsd:complexType name="ExercicioType"></div><div style="font-size:12.8px"><div style="font-size:12.8px">        <xsd:annotation></div><div style="font-size:12.8px">            <xsd:appinfo></div><div style="font-size:12.8px">                <a:extension ref="c:UserType"/></div><div style="font-size:12.8px">            </xsd:appinfo></div><div style="font-size:12.8px">        </xsd:annotation></div></div><div style="font-size:12.8px">        <xsd:sequence></div><div style="font-size:12.8px">            <xsd:element name ="idExercicio" type="xsd:string" minOccurs="1"></xsd:element>                      </div><div style="font-size:12.8px">            <xsd:element name="dataInicioExercicio" type="xsd:dateTime" minOccurs="1"></xsd:element>                      </div><div style="font-size:12.8px">            <xsd:element name="dataFimExercicio" type="xsd:dateTime" minOccurs="0"></xsd:element>                      </div><div style="font-size:12.8px">        </xsd:sequence></div><div style="font-size:12.8px">    </xsd:complexType></div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">JASON</div></div></div>
<br><div class="gmail_quote">On Mon, Jun 19, 2017 at 3:35 PM, Alcides Carlos de Moraes Neto <span dir="ltr"><<a href="mailto:alcides.neto@gmail.com" target="_blank">alcides.neto@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I'm trying to create a user extension attribute that is a complexType. I'm able to import the schema, but I cannot save the object using the XML editor.</div><div><br></div><div>Here's my XSD:</div><div><br></div><div><div><xsd:schema elementFormDefault="qualified"</div><div>            targetNamespace="<a href="http://example.com/xml/ns/mySchema" target="_blank">http://<wbr>example.com/xml/ns/mySchema</a>"</div><div>            xmlns:tns="<a href="http://example.com/xml/ns/mySchema" target="_blank">http://example.com/<wbr>xml/ns/mySchema</a>"</div><div>            xmlns:a="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3" target="_blank">http://prism.<wbr>evolveum.com/xml/ns/public/<wbr>annotation-3</a>"</div><div>            xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>common/common-3</a>"</div><div>            xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/<wbr>2001/XMLSchema</a>"></div><div> </div><div>    <xsd:complexType name="UserExtensionType"></div><div>        <xsd:annotation></div><div>            <xsd:appinfo></div><div>                <a:extension ref="c:UserType"/></div><div>            </xsd:appinfo></div><div>        </xsd:annotation></div><div>        <xsd:sequence></div><div>        <span class="m_4111756959779423308gmail-Apple-tab-span" style="white-space:pre-wrap"> </span><xsd:element name="exercicio" minOccurs="0" maxOccurs="unbounded" type="tns:ExercicioType"></<wbr>xsd:element>            </div><div>        </xsd:sequence></div><div>    </xsd:complexType> </div><div><br></div><div>    <xsd:complexType name="ExercicioType"></div><div>        <xsd:sequence></div><div>            <xsd:element name ="idExercicio" type="xsd:string" minOccurs="1"></xsd:element>                      </div><div>            <xsd:element name="dataInicioExercicio" type="xsd:dateTime" minOccurs="1"></xsd:element>                      </div><div>            <xsd:element name="dataFimExercicio" type="xsd:dateTime" minOccurs="0"></xsd:element>                      </div><div>        </xsd:sequence></div><div>    </xsd:complexType></div><div></xsd:schema></div></div><div><br></div><div>Here's my user. It's a very simple user I created first using the GUI. I then added the <extension> </div><div><br></div><div><div><user xmlns="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>common/common-3</a>"</div><div>      xmlns:q="<a href="http://prism.evolveum.com/xml/ns/public/query-3" target="_blank">http://prism.<wbr>evolveum.com/xml/ns/public/<wbr>query-3</a>"</div><div>      xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>common/common-3</a>"</div><div>      xmlns:t="<a href="http://prism.evolveum.com/xml/ns/public/types-3" target="_blank">http://prism.<wbr>evolveum.com/xml/ns/public/<wbr>types-3</a>"</div><div>      xmlns:icfs="<a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>connector/icf-1/resource-<wbr>schema-3</a>"</div><div>      xmlns:ri="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>resource/instance-3</a>"</div><div>      oid="542aba1d-457f-43bc-9664-<wbr>3b91e30ea416"</div><div>      version="2"></div><div>   <name>Fulano</name></div><div>   <extension xmlns:ex="<a href="http://example.com/xml/ns/mySchema" target="_blank">http://example.com/<wbr>xml/ns/mySchema</a>"></div><div>       <ex:exercicio></div><div>           <ex:idExercicio>123</ex:<wbr>idExercicio></div><div>           <ex:dataInicioExercicio>2017-<wbr>06-19T17:02:31.468Z</ex:<wbr>dataInicioExercicio></div><div>       </ex:exercicio></div><div>   </extension></div><div>   <metadata></div><div>      <requestTimestamp>2017-06-<wbr>19T17:02:31.468Z</<wbr>requestTimestamp></div><div>      <requestorRef oid="00000000-0000-0000-0000-<wbr>000000000002" type="c:UserType"><!-- administrator --></requestorRef></div><div>      <createTimestamp>2017-06-<wbr>19T17:02:31.540Z</<wbr>createTimestamp></div><div>      <creatorRef oid="00000000-0000-0000-0000-<wbr>000000000002" type="c:UserType"><!-- administrator --></creatorRef></div><div>      <createChannel><a href="http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user" target="_blank">http://<wbr>midpoint.evolveum.com/xml/ns/<wbr>public/gui/channels-3#user</a></<wbr>createChannel></div><div>      <modifyTimestamp>2017-06-<wbr>19T17:17:08.229Z</<wbr>modifyTimestamp></div><div>      <modifierRef xmlns:tns="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>common/common-3</a>"</div><div>                   oid="00000000-0000-0000-0000-<wbr>000000000002"</div><div>                   type="tns:UserType"><!-- administrator --></modifierRef></div><div>      <modifyChannel><a href="http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user" target="_blank">http://<wbr>midpoint.evolveum.com/xml/ns/<wbr>public/gui/channels-3#user</a></<wbr>modifyChannel></div><div>   </metadata></div><div>   <activation></div><div>      <effectiveStatus>enabled</<wbr>effectiveStatus></div><div>      <enableTimestamp>2017-06-<wbr>19T17:02:31.493Z</<wbr>enableTimestamp></div><div>   </activation></div><div>   <iteration>0</iteration></div><div>   <iterationToken/></div><div></user></div></div><div><br></div><div>I get the following error:</div><div>Cannot parse as {<a href="http://example.com/xml/ns/mySchema%7DExercicioType" target="_blank">http://example.com/xml/ns/<wbr>mySchema}ExercicioType</a>: ( {<a href="http://example.com/xml/ns/mySchema%7DidExercicio" target="_blank">http://example.com/xml/ns/<wbr>mySchema}idExercicio</a> => parser ValueParser(DOMe, {<a href="http://example.com/xml/ns/mySchema%7DidExercicio" target="_blank">http://example.com/xml/ns/<wbr>mySchema}idExercicio</a>: 123) {<a href="http://example.com/xml/ns/mySchema%7DdataInicioExercicio" target="_blank">http://example.com/xml/ns/<wbr>mySchema}dataInicioExercicio</a> => parser ValueParser(DOMe, {<a href="http://example.com/xml/ns/mySchema%7DdataInicioExercicio" target="_blank">http://example.com/xml/ns/<wbr>mySchema}dataInicioExercicio</a>: 2017-06-19T17:02:31.468Z) )<br></div><div><br></div><div>Is this not possible? I have not seen any examples or questions.</div><div><br></div><div><br></div><div><br></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>