AnsweredAssumed Answered

update Xog results through Xpath

Question asked by shiva.s43 on Oct 12, 2015
Latest reply on Oct 19, 2015 by shiva.s43



I was trying to create new user from xog out results of other user by changing unique values and some other basic information of user. I successfully xog out the user and trying to update the values through xpath but when I use it its throwing invalid xml error.


Here is the gel script syntax.


<gel:parse var="V_username">

  <Filter criteria="EQUALS" name="userName">skumar</Filter>


<core:catch var="exception">

  <core:if test="${sessionID.length() > 0}">

  <soap:invoke endpoint="${myXogUrl}" var="xogdata">









  <NikuDataBus xmlns:xsi="" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

  <Header action="read" externalSource="NIKU" objectType="user" version="6.0.11"/>


  <gel:include select="$V_username"/>










  <core:when test="${exception != null}">

  <core:set value="${exception.text()}" var="error_message"/>

  <gel:log>error while logging n: ${error_message}</gel:log>





<!-- Dispaly xog results xml -->

<gel:set asString="true" select="$xogdata" var="printme"/>

<gel:log level="info" message="XOG RESPONSE = ${printme}"/>



<gel:parse var="exeTag">

  <PersonalInformation lastName="New_lastname" firstName="new_firstname"/>


<gel:set select="$xogdata/soapenv:Envelope/soapenv:Body/NikuDataBus/Header/Users/User/PersonalInformation" value="${exeTag}" insert="true"/>

<!-- <gel:set select="$xogdata/soapenv:Envelope/soapenv:Body/NikuDataBus/Header/Users/User" value="${exeTag}" insert="true"/> tried this syntax also-->

<!-- Dispaly updated xog results xml-->

<gel:set asString="true" select="$xogdata" var="printme2"/>

<gel:log level="info" message="XOG RESPONSE updated = ${printme2}"/>


The requirement is to create a new user in clarity similar to existing user selected in the copy from field of create new user request form. The new user should have same groups, department/OBS/skills/Financial details etc.