<div dir="ltr">Pavol,<div><br></div><div>Thank you for taking the time to answer. We'll see how we proceed.</div><div><br></div><div>Best regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-09 13:17 GMT-03:00 Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Ana,</p>
    <p>I see that nobody seems to have an idea. It's quite hard to help
      you with this, because model-client was designed to be used
      separately from the other midPoint components. (Perhaps we should
      revisit that decision in the future.)<br>
    </p>
    <p>What comes to my mind is this: you could extract only the
      relevant classes (e.g. ProtectedStringType etc) into separate
      module, and use that one within your project. Would that help you?</p>
    <p>Best regards,<br>
    </p><span class="">
    <pre class="m_889180452754164666moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
    </span><div><div class="h5"><div class="m_889180452754164666moz-cite-prefix">On 07.03.2017 15:31, Ana Pereyra wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>I bring this up again because we are performing tests with
          another scenario and faced an issue related to this one.</div>
        <div><br>
        </div>
        <div>We have a project that needs to consume data from midpoint
          users, and that's why its pom has a dependency for the <b>client-model</b>
          artifact.</div>
        <div><br>
        </div>
        <div>One of the user attributes need to be decrypted, and for
          that, we need classes that are included in the <b>prism </b>artifact.
          We add the dependency to the pom (model-client dependency
          first, then prism dependency) and somehow the <i>ItemDeltaType
          </i>class gets overwritten and we loose some some methods or
          get the same methods with different definitions (RawType issue
          referenced in previous messages in this thread).</div>
        <div><br>
        </div>
        <div>If we switch the order of the dependencies in the pom file
          (prism first, then model-client dependency) we get the same
          issue but this time, we loose the definition of <i>ProtectedStringType
          </i>class and <i>ProtectedDataType </i>class.</div>
        <div><br>
        </div>
        <div>Any ideas why this happens or how to prevent this
          overwriting issue from occurring? </div>
        <div><br>
        </div>
        <div>Thanks in advance</div>
        <div>Regards</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-01-10 14:52 GMT-03:00 Ana Pereyra
          <span dir="ltr"><<a href="mailto:apereyra@identicum.com" target="_blank">apereyra@identicum.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi Pavol,
              <div><br>
              </div>
              <div>Thanks for answering. We were having trouble with
                this, but it's working now. In our test, we had a
                midpoint project, with an overlay that extended the
                admin-gui. In that context, we thought it should work,
                but had that conversion type error.</div>
              <div><br>
              </div>
              <div>What we ended up doing, was creating a new project,
                adding the model-client dependency to the pom file and
                it worked.</div>
              <div><br>
              </div>
              <div>Thanks a lot for your time!</div>
              <div>Regards,</div>
            </div>
            <div class="m_889180452754164666HOEnZb">
              <div class="m_889180452754164666h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">2017-01-09 10:03 GMT-03:00
                    Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <p>Hello Ana.</p>
                        <p>This is really strange. I've tested your
                          scenario with both midPoint 3.4.1 and master
                          (3.6-snapshot, almost equal to 3.5), and it
                          works:</p>
                        <p><font size="-1"><tt>"Endpoint URL: <a class="m_889180452754164666m_1629603007263075654m_271802167605248676moz-txt-link-freetext" href="http://localhost:8080/midpoint/model/model-3" target="_blank">http://localhost:8080/midpoint<wbr>/model/model-3</a></tt><tt><br>
                            </tt><tt>Got system configuration</tt><tt><br>
                            </tt><tt>Got administrator user:
                              00000000-0000-0000-0000-000000<wbr>000002</tt><tt><br>
                            </tt><tt>Got Sailor role</tt><tt><br>
                            </tt><tt>Resources (0)</tt><tt><br>
                            </tt><tt>Users (1)</tt><tt><br>
                            </tt><tt>Tasks (3)</tt><tt><br>
                            </tt><tt>Created user guybrush, OID:
                              9baf4217-47ec-4792-805a-a9e7f6<wbr>c6145a</tt><tt><br>
                            </tt><tt>Fetched user guybrush:</tt><tt><br>
                            </tt><tt>Users fullName: Guybrush Threepwood</tt><tt><br>
                            </tt><tt>Created user lechuck, OID:
                              c0c010c0-d34d-b33f-f00d-111111<wbr>11ec1e</tt><tt><br>
                            </tt><tt>Changed user password</tt><tt><br>
                            </tt><tt>Changed user given name</tt><tt><br>
                            </tt><tt>Assigned roles</tt><tt><br>
                            </tt><tt>Unassigned roles</tt><tt><br>
                            </tt><tt>Found 0 requestable roles</tt><tt><br>
                            </tt><tt>Created role Sea Superuser, OID:
                              b77019b2-6a45-4d41-aff6-6041ac<wbr>c748b8</tt><tt><br>
                            </tt><tt>Assigned role Sea Superuser to
                              LeChuck</tt><tt><br>
                            </tt><tt>Modified role Sea Superuser -
                              modified resource inducement</tt><tt><br>
                            </tt><tt>Modified role Sea Superuser -
                              changed role inducement</tt><tt><br>
                            </tt><tt>LeChuck reconciled.</tt><tt><br>
                            </tt><tt>Deleted user(s)</tt><tt><br>
                            </tt><tt><br>
                            </tt><tt>Process finished with exit code 0"</tt></font></p>
                        <p>Are you sure you use correct versions of the
                          Java code? I.e. either both 3.4.x or 3.5 (or
                          master)?<br>
                        </p>
                        <pre class="m_889180452754164666m_1629603007263075654m_271802167605248676moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
                        <div>
                          <div class="m_889180452754164666m_1629603007263075654h5">
                            <div class="m_889180452754164666m_1629603007263075654m_271802167605248676moz-cite-prefix">On
                              05.01.2017 19:52, Ana Pereyra wrote:<br>
                            </div>
                          </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div class="m_889180452754164666m_1629603007263075654h5">
                              <div dir="ltr">Hi everyone.
                                <div><br>
                                </div>
                                <div>I'm trying to build a client using
                                  the model-client-sample example in
                                  Github.</div>
                                <div><br>
                                </div>
                                <div>The issue I'm having is with line
                                  339 of class Main (<a href="https://github.com/Evolveum/midpoint/blob/v3.4.1/samples/model-client-sample/src/main/java/com/evolveum/midpoint/testing/model/client/sample/Main.java" target="_blank">https://github.com/Evolveum/m<wbr>idpoint/blob/v3.4.1/samples/mo<wbr>del-client-sample/src/main/jav<wbr>a/com/evolveum/midpoint/testin<wbr>g/model/client/sample/Main.jav<wbr>a</a>):
                                  the method ItemDeltaType.getValue()
                                  returns a list of RawType, and the
                                  ModelClientUtil.createProtecte<wbr>dString()
                                  returns a ProtectedString not
                                  compatible with RawType.</div>
                                <div><br>
                                </div>
                                <div>Here is the code:</div>
                                <div><br>
                                </div>
                                <div>
                                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">private
                                    static void
                                    changeUserPassword(ModelPortTy<wbr>pe
                                    modelPort, String oid, String
                                    newPassword) throws FaultMessage {<br>
                                    <span class="m_889180452754164666m_1629603007263075654m_271802167605248676gmail-Apple-tab-span" style="white-space:pre-wrap">             </span>ItemDeltaType
                                    passwordDelta = new ItemDeltaType();<br>
                                    <span class="m_889180452754164666m_1629603007263075654m_271802167605248676gmail-Apple-tab-span" style="white-space:pre-wrap">             </span>passwordDelta.setModificationT<wbr>ype(ModificationTypeType.REPLA<wbr>CE);<br>
                                    <span class="m_889180452754164666m_1629603007263075654m_271802167605248676gmail-Apple-tab-span" style="white-space:pre-wrap">             </span>passwordDelta.setPath(ModelCli<wbr>entUtil.createItemPathType("cr<wbr>edentials/password/value"));<br>
                                    <b>       
                                      passwordDelta.getValue().add(M<wbr>odelClientUtil.createProtected<wbr>String(newPassword));</b><br>
                                            ObjectDeltaType deltaType =
                                    new ObjectDeltaType();<br>
                                           
                                    deltaType.setObjectType(ModelC<wbr>lientUtil.getTypeQName(UserTyp<wbr>e.class));<br>
                                           
                                    deltaType.setChangeType(Change<wbr>TypeType.MODIFY);<br>
                                            deltaType.setOid(oid);<br>
                                           
                                    deltaType.getItemDelta().add(p<wbr>asswordDelta);<br>
                                            ObjectDeltaListType
                                    deltaListType = new
                                    ObjectDeltaListType();<br>
                                           
                                    deltaListType.getDelta().add(d<wbr>eltaType);<br>
                                           
                                    modelPort.executeChanges(delta<wbr>ListType,
                                    null);<br>
                                    <span class="m_889180452754164666m_1629603007263075654m_271802167605248676gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>}</blockquote>
                                  <div><br>
                                  </div>
                                  <div>How do I get a RawType from the
                                    result of the <b>createProtectedString
                                    </b>return type?</div>
                                  <div><br>
                                  </div>
                                  <div>Thank you all.</div>
                                  <div>Regards,<br>
                                    -- </div>
                                  <div class="m_889180452754164666m_1629603007263075654m_271802167605248676gmail_signature">
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr">
                                          <div>
                                            <div dir="ltr">
                                              <div>
                                                <div dir="ltr">
                                                  <div>
                                                    <div dir="ltr"><b style="font-size:12.8px">Ana
                                                        Pereyra</b><br>
                                                    </div>
                                                    <div dir="ltr"><font style="font-size:12.8px" face="verdana, sans-serif"><img> Identicum
                                                        S.A.<br>
                                                        <i><font color="#666666">Jorge
                                                          Newbery 3226,
                                                          Argentina<br>
                                                          Tel: +54 (11) </font></i></font><font style="font-size:12.8px" face="verdana, sans-serif" color="#666666"><i>4552.3050</i></font>
                                                      <div style="font-size:12.8px"><font face="verdana,
                                                          sans-serif"><i><font size="1"><a href="mailto:apereyra@identicum.com" style="color:rgb(17,85,204)" target="_blank">apereyra@identicum.com</a></font></i><br>
                                                          <a href="http://www.identicum.com/" style="color:rgb(17,85,204)" target="_blank"><font color="#000000">www.identicum.com</font></a></font></div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <fieldset class="m_889180452754164666m_1629603007263075654m_271802167605248676mimeAttachmentHeader"></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_889180452754164666m_1629603007263075654m_271802167605248676moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_889180452754164666m_1629603007263075654m_271802167605248676moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a>
</pre>
    </blockquote>
    

  </div>


______________________________<wbr>_________________

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" rel="noreferrer" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a>


</blockquote></div>

<div>
</div>-- 
<div class="m_889180452754164666m_1629603007263075654gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b style="font-size:12.8px">Ana Pereyra</b>
</div><div dir="ltr"><font style="font-size:12.8px" face="verdana, sans-serif"><img> Identicum S.A.
<i><font color="#666666">Jorge Newbery 3226, Argentina
Tel: +54 (11) </font></i></font><font style="font-size:12.8px" face="verdana, sans-serif" color="#666666"><i>4552.3050</i></font><div style="font-size:12.8px"><font face="verdana, sans-serif"><i><font size="1"><a href="mailto:apereyra@identicum.com" style="color:rgb(17,85,204)" target="_blank">apereyra@identicum.com</a></font></i>
<a href="http://www.identicum.com/" style="color:rgb(17,85,204)" target="_blank"><font color="#000000">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></div></blockquote></div>

<div>
</div>-- 
<div class="m_889180452754164666gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b style="font-size:12.8px">Ana Pereyra</b>
</div><div dir="ltr"><font style="font-size:12.8px" face="verdana, sans-serif"><img> Identicum S.A.
<i><font color="#666666">Jorge Newbery 3226, Argentina
Tel: +54 (11) </font></i></font><font style="font-size:12.8px" face="verdana, sans-serif" color="#666666"><i>4552.3050</i></font><div style="font-size:12.8px"><font face="verdana, sans-serif"><i><font size="1"><a href="mailto:apereyra@identicum.com" style="color:rgb(17,85,204)" target="_blank">apereyra@identicum.com</a></font></i>
<a href="http://www.identicum.com/" style="color:rgb(17,85,204)" target="_blank"><font color="#000000">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
</div>


<fieldset class="m_889180452754164666mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_889180452754164666moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_889180452754164666moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>

</blockquote>
</div></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><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><div dir="ltr"><div><div dir="ltr"><b style="font-size:12.8px">Ana Pereyra</b><br></div><div dir="ltr"><font face="verdana, sans-serif" style="font-size:12.8px"><img src="http://www.identicum.com/img/favicon.ico"> Identicum S.A.<br><i><font color="#666666">Jorge Newbery 3226, Argentina<br>Tel: +54 (11) </font></i></font><font color="#666666" face="verdana, sans-serif" style="font-size:12.8px"><i>4552.3050</i></font><div style="font-size:12.8px"><font face="verdana, sans-serif"><i><font size="1"><a href="mailto:apereyra@identicum.com" style="color:rgb(17,85,204)" target="_blank">apereyra@identicum.com</a></font></i><br><a href="http://www.identicum.com/" style="color:rgb(17,85,204)" target="_blank"><font color="#000000">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
</div>