[Midpoint-dev] Urgent: Attribute namespace information is Lost if approval is enabled

Dharmendra Parakh dharmendra at confluxsys.com
Tue Mar 31 12:07:41 CEST 2015


Hi

We have implemented few custom aspects which creates approval request on
resource assignment to user and role.

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.

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:

2015-03-31 14:33:14,270 [] [http-bio-8080-exec-10] WARN
(org.apache.cxf.phase.PhaseInterceptorChain): Interceptor for {
http://midpoint.evolveum.com/xml/ns/public/model/model-3}modelWebService#{http://midpoint.evolveum.com/xml/ns/public/model/model-3}searchObjects
has thrown exception, unwinding now
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.
at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:94)
~[cxf-core-3.0.1.e3.jar:3.0.1.e3]


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.

Without approval:

   <assignment id="1">
      <construction>

 <attribute>

            <ref xmlns:qn650="
http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3
">qn650:name</ref>
            <outbound>
               <expression>
                  <value>Test1</value>
               </expression>
            </outbound>
         </attribute>

..............


With approval:

   <assignment id="1">
      <construction>

 <attribute>

            <ref>qn650:name</ref>
            <outbound>
               <expression>
                  <value>Test2</value>
               </expression>
            </outbound>
         </attribute>

...................

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.



Regards
Dharmendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolveum.com/pipermail/midpoint-dev/attachments/20150331/55edb731/attachment.html>


More information about the midPoint-dev mailing list