Hi Dave,
you are correct , i see correct xml when use serialize and write to file ..
i was struck there by just using these debug statements .
could you please help me in finding the source of the problem , here i am copying the script .
<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql"
xmlns:util="jelly:util"
xmlns:xog="http://www.niku.com/xog"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:parameter default="admin" var="XOGUSER"/>
<!-- get the Project Code and Name from the DB -->
<gel:setDataSource dbId="Niku"/>
<core:catch var="v_queryerrorf">
<sql:query var="prjdet"> <![CDATA[select
inv.name proj_name
,inv.code proj_code
from
inv_investments inv
where inv.id=6195025 ]]>
</sql:query>
</core:catch>
<core:if test="${v_queryerrorf != Null}">
<gel:log level="ERROR">SQL ERROR = ${v_queryerrorf} </gel:log>
</core:if>
<!-- get session id for the user -->
<core:catch var="v_queryError">
<sql:query var="version">
SELECT MAX(INSTALLED_VERSION) INSTALLED_VERSION
FROM CMN_INSTALL_HISTORY
WHERE INSTALL_ID = 'release_version'
</sql:query>
</core:catch>
<core:if test="${v_queryError != Null}">
<gel:log level="ERROR">SQL ERROR = ${v_queryError} </gel:log>
</core:if>
<core:set value="${version.rows[0].INSTALLED_VERSION}" var="clarity_version"/>
<core:catch var="xogerr">
<!-- Retrieve Session ID -->
<core:new className="com.niku.union.security.DefaultSecurityIdentifier" var="secId"/>
<core:invokeStatic className="com.niku.union.security.UserSessionControllerFactory" method="getInstance" var="userSessionCtrl"/>
<core:set value="${userSessionCtrl.init(XOGUSER, secId)}" var="secId"/>
<core:set value="${secId.getUserName()}" var="XOGUsername"/>
<core:set value="${secId.getSessionId()}" var="sessionID"/>
</core:catch>
<!-- create xml to do XOG -->
<core:forEach items="${prjdet.rowsByIndex}" var="rowinit">
<core:set var="proj_name">${rowinit[0]}</core:set>
<core:set var="proj_code">${rowinit[1]}</core:set>
<gel:log category="INFO">${proj_name}</gel:log>
<gel:parse var="xogBody">
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
<Header action="write" externalSource="NIKU" objectType="project" version="14.3.0.298"/>
<Projects>
<Project financialStatus="C" name="${proj_name}" projectID="${proj_code}"/>
</Projects>
</NikuDataBus>
</gel:parse>
<gel:serialize fileName="E:\CA\clarity\ravi_test.xml" var="${xogBody}"/>
<core:catch var="XOGOP">
<soap:invoke endpoint="internal" var="firstLoadresult">
<soap:message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
<soapenv:Header>
<xog:Auth>
<xog:SessionID>${sessionID}</xog:SessionID>
</xog:Auth>
</soapenv:Header>
<soapenv:Body>
<gel:include select="$xogBody"/>
</soapenv:Body>
</soapenv:Envelope>
</soap:message>
</soap:invoke>
</core:catch>
<core:if test="${XOGOP != Null}">
<gel:log level="ERROR">XOG ERROR = ${XOGOP}</gel:log>
</core:if>
<gel:set var="prj_xml" select="$xogBody" asString="true"/>
<gel:log category="XOG" level="DEBUG">${prj_xml}</gel:log>
<gel:set var="xog2" select="$firstLoadresult" asString="true"/>
<gel:log category="XOG" level="DEBUG">${xog2}</gel:log>
</core:forEach>
</gel:script>