Clarity

  • 1.  Reading Timesheets via XOG

    Posted Oct 12, 2010 07:07 AM
    Hi, I'm trying to read the Timesheets for a certain resource but no results :(  I'm using SoapUI to test the web service call, the message is:  
       
             
          xxxxxxxx
          yyyyyyy
             
       
       
             
         
         
               
               
                      2009-01-01
                      myResourceName
               
         
             
          but always i'm getting: Error getting response; java.lang.Exception: java.net.SocketTimeoutException: Read timed out   I tried using other web service call, and I get the response OK.  Anyone know how can I solve it?  Thanks!  


  • 2.  Re: Reading Timesheets via XOG

    Posted Oct 12, 2010 07:07 AM
    Hi,         Please try from XOG Client, to read or write timesheet for a particular resource. if you are not installed XOG Client from your machine, just use the below URL Which dave already provided for us.     http:// : /niku/app?action=xog.client   if ssl enabled   https:// : /niku/app?action=xog.client     and also attached sample read and write file which is used to read or write a timesheet for a particular resource Message Edited by senthil on 09-24-2009 02:17 PM [left]


  • 3.  Re: Reading Timesheets via XOG

    Posted Oct 12, 2010 07:07 AM
    Thanks Senthil and Sundar,  The problem is that i was using   http://www.niku.com/xog/Object instead of http://www.niku.com/xog/ as xog namespace. When I change this, It didn't throw Read timeout anymore...now I get "no rights" :P  Thank again for your time!    


  • 4.  Re: Reading Timesheets via XOG

    Posted Oct 12, 2010 07:07 AM
    Sergio,  Have u got the XOG Administrator Global Rights?Cheers,Sundar        


  • 5.  Re: Reading Timesheets via XOG

    Posted Oct 12, 2010 07:07 AM
    Sergio,  Hope you have done the Xog invoke via SOAP as mentioned in the Tech guide.  How to Invoke XOG Directly Using SOAP?

    The following steps describe the general process for invoking XOG directly using SOAP:

    1. Call Login to establish a session.
    admin admin
    where Login Input elements are:
    Login
    The log in request main body element. Login returns a SessionID that you may use in subsequent requests.
    Username
    The name of the user doing the work.
    Password
    The password for the user.
    [session id]

    2)   Invoke the request using the SessionID. [session id]    where Request Input Elements are:
    SessionID
    The authentication string.NikuDataBus
    The Write Object request's main body element.
    When making multiple requests with the same SessionID (such as when an external process wakes up at defined intervals) the SessionID may time out. This is the equivalent of a Logout request. To establish a new SessionID, log in again. The session timeout duration is the same as that set for web browser user sessions; you can configure this setting from the System Options in the Administrator Tool.

    3. Call Logout to invalidate the SessionID and close the session.
    [session id]
    where Logout Input elements are:
    SessionID
    The authentication string that identifies the session to be invalidated.Logout
    The Logout request main body element.  Cheers,Sundar


  • 6.  RE: Re: Reading Timesheets via XOG

    Posted May 21, 2013 09:41 AM
    Same problem.
    I have the following code:
    <!-- 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>${clarityUser}</xog:Username>
    
    
    
    
    
    
    <xog:Password>${claritypwd}</xog:Password>
    
    
    
    
    
    </xog:Login>
    
    
    
    
    </soapenv:Body>
    
    
    
    </soapenv:Envelope>
    
    
    </soap:message>
    
    </soap:invoke>
    
    <!--
    
    
    Checking wheter 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:log level="ERROR">Couldn't Log in. Check the username/password
    
    
    
    </gel:log>
    
    
    </core:when>
    
    
    <core:otherwise>
    
    
    
    <gel:log>Log in Ok</gel:log>
    
    
    
    <gel:log>SessionID: ${sessionID}</gel:log>
    
    
    </core:otherwise>
    
    </core:choose>
    the login appears correctly

    The script follows:
    <!-- ottengo l'id del timesheet -->
    
    
    <gel:log>Timesheet id: ${gel_objectInstanceId}</gel:log>
    
    
    
    
    
    
    <!-- recuepero i timesheet approved-->
    
    
    <gel:parse var="leggi">
    
    
    
    
    
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    
    
    
    
    <Header version="6.0.11" action="read" objectType="timeperiod" externalSource="NIKU"/>
    
    
    
    
    <Query>
    
    
    
    
    
    <Filter name="status" criteria="EQUALS">4</Filter>
    
    
    
    
    
    
    
    </Query>
    
    
    
    </NikuDataBus>
    
    
    
    
    </gel:parse>
    
    
    <gel:set asString="true" select="$leggi" var="cosa_chiedo"/>                                                                                                                           
    
    
    <gel:log>Request:: ${cosa_chiedo}</gel:log>
    
    
    
    
    
    <!-- Inoltro richiesta -->
    
    
    <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:include select="$leggi"/>
    
    
    
    
    
    </soapenv:Body>
    
    
    
    
    </soapenv:Envelope>
    
    
    
    </soap:message>
    
    
    </soap:invoke>
    
    
    <gel:set asString="true" select="$runresult" var="write_status"/>                                                                                                                           
    
    
    <gel:log>TimePeriods Approved: ${write_status}</gel:log>
    
    
    
    
    
    <!--  per ogni time time entry scrivo codice progetto e ETC -->
    
    
    <gel:forEach select="$runresult/soapenv:Envelope/soapenv:Body/NikuDataBus/TimePeriods//TimePeriod//TimeSheets//TimeSheet//TimeSheetEntries//TimeSheetEntry" var="tm_row">
    
    
    
    <gel:log>TtimesheetEntry Approved: ${tm_row}</gel:log> 
    ...
    The log "TimePeriods Approved: ${wr...}" does not appear in the result.
    By the way I have a log where I am supposed to write a sentence for each timesheet entry.
    The resutl is 18 pages in the log with:

    "TimesheetEntry Approved: : [TimeSheetEntry: null]"


    copy and paste whathever else xog in the parse tag I see the result,
    running:
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    
    
    
    
    <Header version="6.0.11" action="read" objectType="timeperiod" externalSource="NIKU"/>
    
    
    
    
    <Query>
    
    
    
    
    
    <Filter name="status" criteria="EQUALS">4</Filter>
    
    
    
    
    
    
    
    </Query>
    
    
    
    </NikuDataBus>
    I have correct result both via URL and Desktop XOG Client.

    CANNOT FIND A WAY TO GET THE TIME PERIOD VIA GEL SCRIPT USING XOG.
    HELP!!!!!