Clarity

Expand all | Collapse all

Timesheet Write/ADD faillure

  • 1.  Timesheet Write/ADD faillure

    Posted 01-11-2017 09:29 AM

    Hello guys,

    I'm tryng to ADD a new timesheet but not working, sorry I'm new in Clarity XOG. Can somebody tell me what is wrong in my SOAP request ?

     

    ------------------------------- REQUEST 

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
    <soapenv:Header>
    <obj:Auth>
    <obj:Username>athomID</obj:Username>
    <obj:Password>athomPass</obj:Password>
    </obj:Auth>
    </soapenv:Header>
    <soapenv:Body>
    <obj:WriteTimeperiod>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd">
    <Header version="6.0.11" action="write" objectType="timeperiod" externalSource="NIKU"/>
    <TimePeriods>
    <TimePeriod finish="2017-01-16T00:00:00" start="2017-01-09T00:00:00"/>
    <TimeSheets>
    <TimeSheet ID="-1" resourceID="athom" action="add" status="1" version="1">
    <TimeSheetEntries>
    <TimeSheetEntry assignmentID="5212003" internalTaskID="5126001" projectID="PRJ_ID" >
    <DailyActuals>
    <Actual actualDate="2017-01-09" amount="8"/>
    <Actual actualDate="2017-01-10" amount="8"/>
    <Actual actualDate="2017-01-11" amount="8"/>
    <Actual actualDate="2017-01-12" amount="8"/>
    <Actual actualDate="2017-01-13" amount="8"/>
    <Actual actualDate="2017-01-14" amount="0"/>
    <Actual actualDate="2017-01-15" amount="0"/>
    </DailyActuals>
    </TimeSheetEntry>
    </TimeSheetEntries>
    </TimeSheet>
    </TimeSheets>
    </TimePeriod>
    </TimePeriods>
    </NikuDataBus>
    </obj:WriteTimeperiod>
    </soapenv:Body>
    </soapenv:Envelope>

     

    --------------------------------- RESPONSE 

    HTTP/1.1 403 Forbidden
    Content-Type: text/html;charset=utf-8
    Content-Length: 114
    Date: Wed, 11 Jan 2017 14:23:03 GMT
    Server: CA PPM

    <html><head><script>location.replace("/niku/app?action=union.externalError&c3RhdHVz=NDAz");</script></head></html>

     

    Thanks



  • 2.  Re: Timesheet Write/ADD faillure

    Posted 01-12-2017 04:05 AM

    Dears,

    How can I create a new timesheet through SQL query ?

    I tried this INSERT query but to my great surprise the timesheet created have no timesheet ID, this is amazing !

     

    INSERT INTO PRTIMESHEET(PRTIMEPERIODID, PRRESOURCEID, PRSTATUS, PRVERSION, PRISADJUSTMENT, PRADJUSTEDID, PRMODBY, PRMODTIME)
    VALUES ( 5026003, 5006002, 1, 1, 0, null, 1, SYSDATE);

     

     

    Thanks



  • 3.  Re: Timesheet Write/ADD faillure

    Posted 01-11-2017 10:30 AM

    Trying direct XOG, this is the detailed error message got :



  • 4.  Re: Timesheet Write/ADD faillure

    Posted 01-12-2017 04:13 AM

    ^ don't do that, you will only break things.

    (that sort of thing is absolutely not supported)



  • 5.  Re: Timesheet Write/ADD faillure

    Posted 01-11-2017 11:26 AM

    Up



  • 6.  Re: Timesheet Write/ADD faillure

    Posted 01-11-2017 12:11 PM

    "Up" ?

     

    Looks like the requests aren't being sent to the right URL / application properly - the direct XOG screen shot you posted looks like a technical/setup error rather than a problem with that specific XOG request - can you do any other (simple?) XOGs using the same client?



  • 7.  Re: Timesheet Write/ADD faillure

    Posted 01-11-2017 04:12 PM

    Hi David,

    Yes, other XOG works fine, this is a simple XOG project read:

     

    Thanks



  • 8.  Re: Timesheet Write/ADD faillure

    Posted 01-12-2017 04:12 AM

    You are closing a tag (TimePeriod) too early in your XML.

     

    You have a line;

    <TimePeriod finish="2017-01-16T00:00:00" start="2017-01-09T00:00:00"/>

     

    This should be;

    <TimePeriod finish="2017-01-16T00:00:00" start="2017-01-09T00:00:00">

    (no / at the end)



  • 9.  Re: Timesheet Write/ADD faillure

    Posted 01-12-2017 04:20 AM

    Thanks David, II was not able to this end tag mistake, It's woorking !