[midPoint] ModelClient Question
Alexander Grzesik
alexander.grzesik at medisite.de
Thu Mar 27 18:29:43 CET 2014
Hi,
I am trying to use the ModelClient to use Midpoint as IDM Backend for an external application.
Based on the ModelSample I was able to create, delete, modify roles and change password of a user.
What I did not found out is how to modify a simple attribute of a User (e.g. givenName).
My code looks like this:
Document doc = ModelClientUtil.getDocumnent();
ObjectModificationType userDelta = new ObjectModificationType();
userDelta.setOid(oid);
ItemDeltaType delta = new ItemDeltaType();
delta.setModificationType(ModificationTypeType.REPLACE);
delta.setPath(ModelClientUtil.createPathElement("givenName", doc));
ItemDeltaType.Value value = new ItemDeltaType.Value();
value.getAny().add(
ModelClientUtil.toJaxbElement(ModelClientUtil.COMMON_VALUE,
ModelClientUtil.createPolyStringType((String) newValue, doc)));
delta.setValue(value);
userDelta.getModification().add(delta);
modelPort.modifyObject(ModelClientUtil.getTypeUri(UserType.class), userDelta);
I get the following error:
com.evolveum.midpoint.xml.ns._public.common.fault_1_wsdl.FaultMessage: Looking for definition of class class com.evolveum.midpoint.prism.PrismContainerDefinition but found PPD:{.../common/common-2a}givenName {http://prism.evolveum.com/xml/ns/public/types-2}PolyStringType[0,1],RCU
Could you give me an example how to modify properties of a User via the ModelClient api?
Thanks
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140327/7a001e4b/attachment.htm>
More information about the midPoint
mailing list