<div dir="ltr">HI<div><br></div><div>Thanks for the information, this works.</div><div><br></div><div>One more thing Our requirement is to reconcile users associated to some specific role, So is there a way to get the users associated to a role without iterating all the users.</div><div><br></div><div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 3:27 PM, Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hello Manish,<br>
      <br>
      I've just pushed a sample code that demonstrates this.<br>
      <br>
      Here is the java code - actually, it's an empty modification with
      RECONCILE option set (see red lines):<br>
      <br>
      
      <p><span><span>    </span>private
          static void
          reconcileUser(ModelPortType modelPort, String oid) throws
          FaultMessage {<u></u><u></u></span></p>
      <span style="font-family:"Courier New""><u></u> <u></u></span>
      <p><span><span>        </span>ObjectDeltaType
          userDelta = new
          ObjectDeltaType();<u></u><u></u></span></p>
      <p><span><span>        </span>userDelta.setOid(oid);<u></u><u></u></span></p>
      <p><span><span>       
          </span>userDelta.setObjectType(ModelClientUtil.getTypeQName(UserType.class));<u></u><u></u></span></p>
      <p><span><span> </span><span>      
          </span>userDelta.setChangeType(ChangeTypeType.MODIFY);<u></u><u></u></span></p>
      <p><span><u></u> <u></u></span></p>
      <p><span><span>        </span>ObjectDeltaListType
          deltaList = new
          ObjectDeltaListType();<u></u><u></u></span></p>
      <p><span><span>        </span>deltaList.getDelta().add(userDelta);<u></u><u></u></span></p>
      <p><span><u></u> <u></u></span></p>
      <p><font color="#cc0000"><span style="font-family:"Courier New""><span>        </span>ModelExecuteOptionsType
            optionsType =
            new ModelExecuteOptionsType();<u></u><u></u></span></font></p>
      <font color="#cc0000">
      </font>
      <p><font color="#cc0000"><span style="font-family:"Courier New""><span>        </span>optionsType.setReconcile(true);<u></u><u></u></span></font></p>
      <font color="#cc0000">
      </font>
      <p><span><span>        </span>modelPort.executeChanges(deltaList,
          optionsType);<u></u><u></u></span></p>
      <p><span><span>    </span>}<u></u><u></u></span></p>
      
      
      
      
      
      
      
      
      <br>
      This is how it looks like in XML:<br>
      <br>
      <font size="-1"><soap:Body><br>
                <ns8:executeChanges <br>
                   
        xmlns:ns2=<a href="http://prism.evolveum.com/xml/ns/public/types-3" target="_blank">"http://prism.evolveum.com/xml/ns/public/types-3"</a> <br>
                   
        xmlns:ns3=<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>
        <br>
                   
        xmlns:ns8=<a href="http://midpoint.evolveum.com/xml/ns/public/model/model-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/model/model-3"</a>
        <br>
                   
xmlns:ns9=<a href="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"</a>><br>
        <br>
                    <ns8:deltaList><br>
                        <ns9:delta><br>
                           
        <ns2:changeType>modify</ns2:changeType><br>
                           
        <ns2:objectType>ns3:UserType</ns2:objectType><br>
                           
        <ns2:oid>c0c010c0-d34d-b33f-f00d-11111111ec1e</ns2:oid><br>
                        </ns9:delta><br>
                    </ns8:deltaList><br>
        <font color="#cc0000">            <ns8:options><br>
                         
          <ns3:reconcile>true</ns3:reconcile><br>
                      </ns8:options><br>
        </font>        </ns8:executeChanges><br>
            </soap:Body></font><br>
      <br>
      Hope this helps.<br>
      Pavol<div><div class="h5"><br>
      <br>
      On 10. 2. 2015 22:40, Manish Baid wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:14px">
        <div dir="ltr">Hi,</div>
        <div dir="ltr">Using
          webservice client, can you please share some pointers on how
          to: programmatically "reconcile a user"?</div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Basically,
          we are trying to re-enforce role-inducement updates to
          "affected" users.<br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Thanks<br>
        </div>
        <div dir="ltr"> </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>

</blockquote></div><br></div>