<div dir="ltr">Hi,<div><br></div><div>I have been able to make it work. Setting implicit location of xsd solved the issue.</div><div><xsd:import namespace="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>" schemaLocation="<a href="http://serverIp:8080/schema/common-3.xsd=http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://serverIp:8080/schema/common-3.xsd=http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"/><br></div><div><br></div><div>But I have another issue with storing multiple passwords. When I try to write outbound mapping for password in credentials in resource handling I am unable to get to any other variables then the input. Following code throws "com.evolveum.midpoint.util.exception.SchemaException: No variable with name user in source definition in mapping in outbound password mapping in account type Discr(RSD(account (default) @AD-connector-resource))"</div><div><br></div><div><div><credentials></div><div>            <password></div><div>               <outbound></div><div>                  <source></div><div>                     <c:path>$user/extension/googleAppsPassword</c:path></div><div>                  </source></div><div>                  <expression></div><div>                     <script></div><div>                        <code></div><div>                            result = googleAppsPassword;</div><div>                            return result;</div><div>                        </code></div><div>                     </script></div><div>                  </expression></div><div>               </outbound></div><div>            </password></div><div>         </credentials></div></div><div><br></div><div>is there any way how to get to the user variable from the password mapping?</div><div><br></div><div>Best regards</div><div><br></div><div>Oskar Butovič</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-16 14:52 GMT+02:00 Radovan Semancik <span dir="ltr"><<a href="mailto:radovan.semancik@evolveum.com" target="_blank">radovan.semancik@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    Congratulations. It looks like you have found a bug.<br>
    <br>
    This should work exactly the way as you are trying to use it. Please
    report that bug in the Jira. Also please specify the operation that
    you are trying to do when you are getting the exception so we can
    reproduce the issue easier. Thanks.<br>
    <br>
    <pre cols="72">-- 
Radovan Semancik
Software Architect
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
    <br>
    <br>
    <div>On 06/13/2016 10:17 AM, Oskar Butovič -
      AMI Praha a.s. wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr"><span style="font-size:12.8px">Hello Everybody,</span>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">I am trying to add password for
          external application (google apps) as a new attribute for user
          because i need to store it and be able to edit it later. I
          tried to use ProtectedStringType in extension schema. But
          somehow this type doesnt work. Midpoint throws exception.</div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">relevant configuration:</div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">
          <div style="font-size:12.8px"><xsd:schema
            elementFormDefault="qualified"</div>
          <div style="font-size:12.8px">            targetNamespace="<a href="http://avast.com/xml/ns/idmSchema" target="_blank"></a><a href="http://avast.com/xml/ns/idmSchema" target="_blank">http://avast.com/xml/ns/idmSchema</a>"</div>
          <div style="font-size:12.8px">            xmlns:tns="<a href="http://avast.com/xml/ns/idmSchema" target="_blank"></a><a href="http://avast.com/xml/ns/idmSchema" target="_blank">http://avast.com/xml/ns/idmSchema</a>"</div>
          <div style="font-size:12.8px">            xmlns:a="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3" target="_blank"></a><a href="http://prism.evolveum.com/xml/ns/public/annotation-3" target="_blank">http://prism.evolveum.com/xml/ns/public/annotation-3</a>"</div>
          <div style="font-size:12.8px">            xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank"></a><a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</div>
          <div style="font-size:12.8px"><span style="white-space:pre-wrap">                     </span>xmlns:t="<a href="http://prism.evolveum.com/xml/ns/public/types-3" target="_blank"></a><a href="http://prism.evolveum.com/xml/ns/public/types-3" target="_blank">http://prism.evolveum.com/xml/ns/public/types-3</a>"</div>
          <div style="font-size:12.8px">            xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank"></a><a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"></div>
          <div style="font-size:12.8px"> </div>
          <div style="font-size:12.8px">    <xsd:complexType
            name="UserExtensionType"></div>
          <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 style="font-size:12.8px">        <xsd:sequence></div>
          <div style="font-size:12.8px"><span style="white-space:pre-wrap">                     </span><xsd:element
            name="googleAppsPassword" type="t:ProtectedStringType"
            minOccurs="0" maxOccurs="unbounded"></div>
          <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:displayName>Google Apps
            Password</a:displayName></div>
          <div style="font-size:12.8px">                       
            <a:displayOrder>110</a:displayOrder></div>
          <div style="font-size:12.8px">                       
            <a:help>Password for google apps
            account</a:help></div>
          <div style="font-size:12.8px">                   
            </xsd:appinfo></div>
          <div style="font-size:12.8px">               
            </xsd:annotation></div>
          <div style="font-size:12.8px">            </xsd:element></div>
          <div style="font-size:12.8px"><br>
          </div>
          <div style="font-size:12.8px">exception:</div>
          <div style="font-size:12.8px"><br>
          </div>
          <div style="font-size:12.8px">
            <div style="font-size:12.8px">Caused by:
              org.xml.sax.SAXParseException: undefined simple or complex
              type 't:ProtectedStringType'</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:180)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:175)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java:110)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:85)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:135)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:214)
              ~[jaxb-xjc-2.2.10-b140310.1920.jar:2.2.10-b140310.1920]</div>
            <div style="font-size:12.8px">        at
              com.evolveum.midpoint.prism.schema.DomToSchemaProcessor.parseSchema(DomToSchemaProcessor.java:233)
              ~[prism-3.3.1.jar:na]</div>
            <div style="font-size:12.8px">        ... 75 common frames
              omitted</div>
            <div><br>
            </div>
          </div>
        </div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">Is it a right approach for storing
          passwords for external applications? Should i use another
          type? </div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">Thanks.</div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">Regards,</div>
        <div style="font-size:12.8px"><br>
        </div>
        <div style="font-size:12.8px">Oskar Butovič</div>
        <div><br>
        </div>
        -- <br>
        <div data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div dir="ltr">
                      <table style="font-family:Verdana,Arial,Helvetica,sans-serif;border-collapse:collapse;padding:0px;margin:0px;border-width:0px!important;border-style:solid!important;width:482px!important">
                        <tbody>
                          <tr style="padding:0px;margin:0px;border:0px solid gray!important">
                            <td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:160px;vertical-align:bottom;padding:0px;border:0px solid gray!important">
                              <p><span style="font-size:14px;font-weight:bold">Oskar
                                  Butovič</span><br>
                                solution architect<br>
                                <br>
                                gsm: <a href="tel:%5B%2B420%5D%20774%20480%20101" value="+420774480101" target="_blank">[+420] 774 480 101</a><br>
                                e-mail: <a href="mailto:oskar.butovic@ami.cz" target="_blank">oskar.butovic@ami.cz</a></p>
                            </td>
                            <td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);padding:0px;border-top-width:0px!important;border-bottom-width:0px!important;border-left-width:0px!important;border-top-style:solid!important;border-bottom-style:solid!important;border-left-style:solid!important;border-top-color:gray!important;border-bottom-color:gray!important;border-left-color:gray!important">   </td>
                            <td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray!important">   </td>
                            <td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;vertical-align:bottom;padding:0px;width:123px;border:0px solid gray!important">
                              <p>AMI Praha a.s.<br>
                                Pláničkova 11<br>
                                162 00 Praha 6<br>
                                tel.: <a href="tel:%5B%2B420%5D%20274%20783%20239" value="+420274783239" target="_blank">[+420] 274 783 239</a><br>
                                web: <a href="http://www.ami.cz/" target="_blank">www.ami.cz</a></p>
                            </td>
                            <td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);padding:0px;border-top-width:0px!important;border-bottom-width:0px!important;border-left-width:0px!important;border-top-style:solid!important;border-bottom-style:solid!important;border-left-style:solid!important;border-top-color:gray!important;border-bottom-color:gray!important;border-left-color:gray!important">   </td>
                            <td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray!important">   </td>
                            <td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;margin:8px;width:116px;border:0px solid gray!important">
                              <p><img src="http://www.ami.cz/images/podpis/ami_logo.gif" alt="AMI Praha a.s." style="border:0px"></p>
                            </td>
                          </tr>
                          <tr style="padding:0px;margin:0px;border:0px solid gray!important">
                            <td colspan="7" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;width:480px;border:0px solid gray!important"><br>
                              <a href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management" target="_blank"><img src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png" alt="AMI Praha a.s." style="border:0px;width:480px!important;min-height:82px!important"></a></td>
                          </tr>
                          <tr style="padding:0px;margin:0px;border:0px solid gray!important">
                            <td colspan="7" style="color:rgb(128,128,128);font-family:Arial,sans-serif;font-size:11px;padding:0px;border:0px solid gray!important"><br>
                              Textem tohoto e-mailu podepisující
                              neslibuje uzavřít ani neuzavírá za
                              společnost AMI Praha a.s.<br>
                              jakoukoliv smlouvu. Každá smlouva, pokud
                              bude uzavřena, musí mít výhradně písemnou
                              formu.<br>
                              <br>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<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/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><table style="font-family:Verdana,Arial,Helvetica,sans-serif;border-collapse:collapse;padding:0px;margin:0px;border-width:0px!important;border-style:solid!important;width:482px!important"><tbody><tr style="padding:0px;margin:0px;border:0px solid gray!important"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:160px;vertical-align:bottom;padding:0px;border:0px solid gray!important"><p><span style="font-size:14px;font-weight:bold">Oskar Butovič</span><br>solution architect<br><br>gsm: [+420] 774 480 101<br>e-mail: <a href="mailto:oskar.butovic@ami.cz" target="_blank">oskar.butovic@ami.cz</a></p></td><td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);padding:0px;border-top-width:0px!important;border-bottom-width:0px!important;border-left-width:0px!important;border-top-style:solid!important;border-bottom-style:solid!important;border-left-style:solid!important;border-top-color:gray!important;border-bottom-color:gray!important;border-left-color:gray!important">   </td><td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray!important">   </td><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;vertical-align:bottom;padding:0px;width:123px;border:0px solid gray!important"><p>AMI Praha a.s.<br>Pláničkova 11<br>162 00 Praha 6<br>tel.: [+420] 274 783 239<br>web: <a href="http://www.ami.cz/" target="_blank">www.ami.cz</a></p></td><td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);padding:0px;border-top-width:0px!important;border-bottom-width:0px!important;border-left-width:0px!important;border-top-style:solid!important;border-bottom-style:solid!important;border-left-style:solid!important;border-top-color:gray!important;border-bottom-color:gray!important;border-left-color:gray!important">   </td><td style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray!important">   </td><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;margin:8px;border:0px solid gray!important;width:116px"><p><img src="http://www.ami.cz/images/podpis/ami_logo.gif" alt="AMI Praha a.s." style="border:0px"></p></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray!important"><td colspan="7" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;padding:0px;width:480px;border:0px solid gray!important"><br><a href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management" target="_blank"><img src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png" alt="AMI Praha a.s." style="border:0px;width:480px!important;height:82px!important"></a></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray!important"><td colspan="7" style="color:rgb(128,128,128);font-family:Arial,sans-serif;font-size:11px;padding:0px;border:0px solid gray!important"><br>Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.<br>jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.<br><br></td></tr></tbody></table></div></div></div></div></div></div></div>
</div>