AnsweredAssumed Answered

export data from XOG for read projects

Question asked by slima24 on Aug 29, 2013
Latest reply on Aug 29, 2013 by Dave
hy every body i used this script , and i succesfully have the session ID but in the part of reading the output and extractins some information related to prj_projects_read.xml i don't know how can you please give me some clarification or some code to help mee PLZZ




<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: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="http://nikuvm:80" var="XOGURL"/>

<gel:parameter default="svong" var="XOGUsername"/>

<gel:parameter default="svong" secure="true" var="XOGPassword"/>



<!-- Log into XOG and get a session ID -->

<soap:invoke endpoint="${XOGURL}/niku/xog" var="auth">


<soap:message>



<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xog="http://www.niku.com/xog">




<soapenv:Header/>




<soapenv:Body>





<xog:Login>






<xog:Username>${XOGUsername}</xog:Username>






<xog:Password>${XOGPassword}</xog:Password>





</xog:Login>




</soapenv:Body>



</soapenv:Envelope>


</soap:message>

</soap:invoke>


<!-- Checking whether a sessionID is returned. If not, it means that Login was unsuccessful -->

<gel:set asString="true" select="$auth/SOAP-ENV:Envelope/SOAP-ENV:Body/xog:SessionID/text()" var="sessionID"/>

<core:choose>


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



<gel:out>Couldn't Log in. Check the username/password.</gel:out>


</core:when>


<core:otherwise></core:otherwise>

</core:choose>


<!--Run XOG and attach an input file...alternatively the Body section can be the NikuDatabus section of an input file-->

<soap:invoke endpoint="${XOGURL}/niku/xog" var="runresult">


<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:parse var="xmlindoc" file="C:\Clarity\XOG\xml\rsm_resources_read.xml"/>





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




</soapenv:Body>



</soapenv:Envelope>


</soap:message>

</soap:invoke>

Outcomes