<div dir="ltr">Hi Pavol<div><br></div><div>Thanks for the information. I will try if i can pull the latest code and give it another try.</div><div><br></div><div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 4:18 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 Dharmendra,<br>
      <br>
      I strongly believe this is a manifestation of a bug that I've
      fixed some time ago. So after upgrading to current master, it
      should probably work with your wf aspects.<br>
      <br>
      However, in past few days I've implemented a working set of
      resource assignment aspects (see <a href="https://wiki.evolveum.com/display/midPoint/Workflow+configuration" target="_blank">https://wiki.evolveum.com/display/midPoint/Workflow+configuration</a>;
      although with some limitations: <a href="https://jira.evolveum.com/browse/MID-2279" target="_blank">https://jira.evolveum.com/browse/MID-2279</a>).
      I'm just pushing that.<br>
      <br>
      In my case, the namespace problem is not present. The following
      assignment was created after approval of a resource assignment to
      a user:<br>
      <br>
      <small><tt>   <assignment id="1"></tt><tt><br>
        </tt><tt>      <construction></tt><tt><br>
        </tt><tt>         <resourceRef
          oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3fafe"
          type="c:ResourceType"><!-- Localhost CSVfile
          --></resourceRef></tt><tt><br>
        </tt><tt>         <attribute></tt><tt><br>
        </tt><tt>            <c:ref><b><font color="#cc0000">ri:lastname</font></b></c:ref>   
              <font color="#cc0000"><!-- note that ri: is defined
            earlier in the file --></font></tt><tt><br>
        </tt><tt>            <outbound></tt><tt><br>
        </tt><tt>               <strength>strong</strength></tt><tt><br>
        </tt><tt>               <expression></tt><tt><br>
        </tt><tt>                  <value>LN1</value></tt><tt><br>
        </tt><tt>               </expression></tt><tt><br>
        </tt><tt>            </outbound></tt><tt><br>
        </tt><tt>         </attribute></tt><tt><br>
        </tt><tt>      </construction></tt><tt><br>
        </tt><tt>      <activation></tt><tt><br>
        </tt><tt>        
          <administrativeStatus>enabled</administrativeStatus></tt><tt><br>
        </tt><tt>      </activation></tt><tt><br>
        </tt><tt>   </assignment></tt><tt><br>
        </tt></small><br>
      You can try that. Either with my or with your aspects. If you use
      your ones, don't forget to disable addUserResourceAssignmentAspect
      and modifyUserResourceAssignmentAspect in workflow configuration.<br>
      <br>
      Best regards,<br>
      Pavol<div><div class="h5"><br>
      <br>
      <br>
      On 31. 3. 2015 12:07, Dharmendra Parakh wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hi
        <div><br>
        </div>
        <div>We have implemented few custom aspects which creates
          approval request on resource assignment to user and role.</div>
        <div><br>
        </div>
        <div>When we enable these aspects and user requests a resource
          approval request is raised appropriately and on approving the
          user request resource is assigned correctly. </div>
        <div><br>
        </div>
        <div>Now the problem we see after this assignment if we try to
          search this user/ role using web service, search is failing
          with following error:</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
          <div>
            <div><font color="#ff0000" size="1">2015-03-31 14:33:14,270
                [] [http-bio-8080-exec-10] WARN
                (org.apache.cxf.phase.PhaseInterceptorChain):
                Interceptor for {<a href="http://midpoint.evolveum.com/xml/ns/public/model/model-3%7DmodelWebService#%7Bhttp://midpoint.evolveum.com/xml/ns/public/model/model-3%7DsearchObjects" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/model-3}modelWebService#{http://midpoint.evolveum.com/xml/ns/public/model/model-3}searchObjects</a>
                has thrown exception, unwinding now</font></div>
          </div>
          <div>
            <div><font color="#ff0000" size="1">org.apache.cxf.interceptor.Fault:
                Could not generate the XML stream caused by:
                javax.xml.stream.XMLStreamException: Non-default
                namespace can not map to empty URI (as per Namespace 1.0
                # 2) in XML 1.0 documents.</font></div>
          </div>
          <div>
            <div><font color="#ff0000" size="1"><span style="white-space:pre-wrap"> </span>at
                org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:94)
                ~[cxf-core-3.0.1.e3.jar:3.0.1.e3]</font></div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>After some research I found that if a resource assignment
          is going through approval cycle somehow midpoint is not
          storing the namespace of assignment attributes. I tried
          disabling the workflow and namespace for every attribute was
          set correctly.</div>
        <div><br>
        </div>
        <div>Without approval:</div>
        <div>
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <div>
              <div>   <assignment id="1"></div>
              <div>      <construction></div>
            </div>
          </blockquote>
        </div>
        <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <div>
              <div> <attribute></div>
            </div>
          </blockquote>
          <div>
            <div>            <ref xmlns:qn650="<a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" target="_blank">http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3</a>">qn650:name</ref></div>
          </div>
          <div>
            <div>            <outbound></div>
          </div>
          <div>
            <div>               <expression></div>
          </div>
          <div>
            <div>                  <value>Test1</value></div>
          </div>
          <div>
            <div>               </expression></div>
          </div>
          <div>
            <div>            </outbound></div>
          </div>
          <div>
            <div>         </attribute></div>
          </div>
        </blockquote>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <div>..............</div>
          </blockquote>
        </blockquote>
        <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
          <div><br>
          </div>
        </blockquote>
        With approval:
        <div>
          <div>
            <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
              <div>   <assignment id="1"></div>
              <div>      <construction></div>
            </blockquote>
          </div>
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"> <attribute></blockquote>
            <div>            <ref>qn650:name</ref></div>
            <div>            <outbound></div>
            <div>               <expression></div>
            <div>                  <value>Test2</value></div>
            <div>               </expression></div>
            <div>            </outbound></div>
            <div>         </attribute></div>
          </blockquote>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div>
            <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
              <div>...................</div>
              <div><br>
              </div>
            </blockquote>
          </div>
        </blockquote>
        <div>I think the approval engine is somehow ignoring the
          namespaces. This has broken our solution so i request you to
          provide some quick solution/workaround if possible.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Regards</div>
        <div>Dharmendra</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" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>