[midPoint] RE : RE : Namespace problem
Katarina Valalikova
k.valalikova at evolveum.com
Fri Sep 27 17:59:58 CEST 2013
Hi Vincent,
I think the problem is in the way you sepcify resourceRef (targetRef).
You must provide the prefix of the namespace in which the object comes
from (it's some jaxb problem) as shown bellow:
<resourceRef oid="00000000-0000-0000-0000-000000000008"
type="c:ResourceType"/>
I've attached fixed xml files (object-templates samples).
Hope this helps you,
Regards,
Katarina Valalikova
Dn(a 27. 9. 2013 17:40 Belleville-Rioux, Vincent wrote / napísal(a):
> Hmmm... That's strange...
>
> Even stranger is the error I'm now having when trying to extend the
> usertype schema :
>
> <c:message>Failed to import:
> com.evolveum.midpoint.util.exception.SystemException: Synchronization
> action failed, reason: Missing namespace in reference type in
> {http://midpoint.evolveum.com/xml/ns/public/common/common-2a}targetRef</c:message>
>
> I've been following pretty hard the explanation on the wiki, but I
> don't find where the trouble is...
>
> Attached are the files I believe are related to that...
>
> Vincent
>
>
> ------------------------------------------------------------------------
> *De :* midpoint-bounces at lists.evolveum.com
> [midpoint-bounces at lists.evolveum.com] de la part de Ivan Noris
> [ivan.noris at evolveum.com]
> *Date d'envoi :* 27 septembre 2013 10:05
> *À :* midPoint General Discussion
> *Objet :* Re: [midPoint] RE : Namespace problem
>
> Hi Vincent,
>
> and now I'm confused :-)
>
> The object template does not need to specify any assignment. For
> example, our default "Default user template" specifies only "Fullname"
> attribute (to be concatenated from Given name and Family name attributes).
>
> In some customer setups however, we have mappings in object templates,
> which are used to assign some resources/roles/organizations - based on
> conditions.
>
> Can't tell what was wrong with your previous setup as I don't have all
> of your objects.
>
> If you have any other issues, just ask and we will try to help you.
>
> Regards,
> Ivan
>
> On 09/27/2013 03:52 PM, Belleville-Rioux, Vincent wrote:
>> Actually I just found the problem. I guess I didn't read the manual
>> enough...
>>
>> What was happening is that I created a new Object Template without
>> putting the ResourceType assignment. I'm not entirely sure why I
>> need that mapping, but adding it to the Object Template did fix the
>> problem.
>>
>> <c:mapping
>> xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"
>>
>> xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-2"
>> xmlns:t="http://prism.evolveum.com/xml/ns/public/types-2"
>>
>> xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-2"
>> xmlns:q="http://prism.evolveum.com/xml/ns/public/query-2"
>>
>> xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-2"
>>
>> xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-2"
>>
>> xmlns:wfcf="http://midpoint.evolveum.com/xml/ns/model/workflow/common-forms-2"
>>
>> xmlns:m="http://midpoint.evolveum.com/xml/ns/public/model/model-context-2"
>> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
>> xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
>> <c:expression>
>> <c:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <c:assignment>
>> <c:construction>
>> <resourceRef
>> oid="00000000-0000-0000-0000-000000000008" type="ResourceType"/>
>> </c:construction>
>> </c:assignment>
>> </c:value>
>> </c:expression>
>> <c:target>
>> <c:path
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">assignment</c:path>
>> </c:target>
>> </c:mapping>
>>
>> Vincent
>>
>>
>> ------------------------------------------------------------------------
>> *De :* midpoint-bounces at lists.evolveum.com
>> [midpoint-bounces at lists.evolveum.com] de la part de Radovan Semancik
>> [radovan.semancik at evolveum.com]
>> *Date d'envoi :* 27 septembre 2013 05:14
>> *À :* midpoint at lists.evolveum.com
>> *Objet :* Re: [midPoint] Namespace problem
>>
>> Hi,
>>
>> Ivan is right. It is most likely XML prefixes. These got destroyed by
>> the XML libraries quite often. There is no practical way how to fix
>> it now so the way that Ivan recommends is perhaps the best one. This
>> is one of the "nuances" of XML and XML libraries that we need to live
>> with. For now. I do not want to go deep into the philosophy of why we
>> really want QNames but why XML is making that painful. To make the
>> long story short: we are looking into a practical way how to support
>> also JSON in a very near future. The JSON way may be much more
>> comfortable for some people. The architecture allows JSON support to
>> be introduced quite easily. We just need to figure out few practical
>> issues and as the devil is in the detail this may take some time. So
>> for now we need to live with XML. At least for a while.
>>
>> --
>>
>> Radovan Semancik
>> Software Architect
>> evolveum.com
>>
>>
>> On 09/27/2013 09:22 AM, Ivan Noris wrote:
>>> Hi Vincent,
>>>
>>> On 09/26/2013 10:14 PM, Belleville-Rioux, Vincent wrote:
>>>> Hi there,
>>>>
>>>> Anyone of you have any idea why I get a namespace problem when
>>>> trying to import objects from a CSV file and sending them to a
>>>> specific obect template?
>>>>
>>>
>>> I suppose that both of your problems may be related to that strange
>>> generated xml prefixes. (The reason why they are generated would be
>>> better explained by some of my coleagues in the core team.)
>>>
>>> I recommend to always create, maintain and edit the XML files on
>>> disk, make all of your modifications there, and import using either
>>> Import from file or Import from embedded editor (via copy & paste).
>>> To create the XML files I highly recommend to use our samples
>>> (samples/resources/...) until the resource wizard is finished. This
>>> way you can also put your files to CSV, svn, git etc. We do it in
>>> our customer projects.
>>>
>>> Do you have the files stored on disk? Does the problem occur when
>>> (re)importing them? Do you have the strange generated prefixes in
>>> your files as well? (I see gen914 in your synchronization fragment
>>> of your resource configuration.)
>>>
>>> Regarding the *resourceRef* problem - are you perhaps using some
>>> assignments/roles in the object template? The assignments do
>>> reference resources using resourceRef elements, the namespace
>>> problem could be there.
>>>
>>> Regards,
>>> Ivan
>>> --
>>> Ing. Ivan Noris
>>> Consultant
>>> Evolveum, s.r.o
>>> ___________________________________________________
>>> "Semper cautus - semper paratus - semper idem Vix."
>>>
>>>
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>
> --
> Ing. Ivan Noris
> Consultant
> Evolveum, s.r.o
> ___________________________________________________
> "Semper cautus - semper paratus - semper idem Vix."
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20130927/9acb4858/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: object template - etudiant provenant du registrariat.xml
Type: text/xml
Size: 1904 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20130927/9acb4858/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: object template - tous les utilisateurs.xml
Type: text/xml
Size: 2063 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20130927/9acb4858/attachment-0001.xml>
More information about the midPoint
mailing list