<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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">https://wiki.evolveum.com/display/midPoint/Workflow+configuration</a>;
      although with some limitations: <a
        href="https://jira.evolveum.com/browse/MID-2279">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<br>
      <br>
      <br>
      On 31. 3. 2015 12:07, Dharmendra Parakh wrote:<br>
    </div>
    <blockquote
cite="mid:CAJG9dDt6qf467YkwinXbDNoAS6ASE-aBN0sWk1P9na=sGMb-0w@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/model/model-3%7DmodelWebService#%7Bhttp://midpoint.evolveum.com/xml/ns/public/model/model-3%7DsearchObjects">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 class=""
                  style="white-space:pre"> </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
                moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3">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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>