AnsweredAssumed Answered

XOG WSDL update project allocations

Question asked by ppCa on Feb 2, 2016
Latest reply on Feb 4, 2016 by ppCa

I want to update project allocations via C# webservice. What have I done so far:

1. Added webservice reference to servername../niku/wsdl/Object/Projects

2. I tested Auth function - It works (I tried to read project data and it works).

 

What I want is updating allocations for some project. But I do not know the proper structure of that XML structure. Which type of header method action should I use to preform update? I do know only write and read option for action parameter. Is there an 'update' option?

Currently I'm using below function from service reference. Is that correct function to execute update?

wsdl.PNG

 

Below is attached an write example for creating project. Probably, update XML structure should be pretty similar.

<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
<Header action="write" externalSource="NIKU" objectType="project" version="12.0.0.5028"/>
<Projects>
<Project active="true" alignment="100" approved="true"
  approvedForBilling="1" asOf="2009-01-02T00:00:00"
  billingCurrencyCode="USD" billingType="S"
  calculateFinancialMetrics="true" chargeCodeExtID="Expense"
  closed="false"
  currencyISOcode="USD"
  description="A Test Project Description11" 
  equipmentCostSource="Financial Cost and Rate Matrix"
  equipmentExchageRateType="AVERAGE"
  equipmentRateSource="Financial Cost and Rate Matrix"
  expenseCostSource="Financial Cost and Rate Matrix"
         expenseExchageRateType="AVERAGE"
            expenseRateSource="Financial Cost and Rate Matrix"
            financialStatus="O" finish="2009-12-31T17:00:00"
            flexibilityRisk="0"
            setBudgetValuesEqualToPlannedValues="true" format="0"
            fundingRisk="0" goalCode="IMPROVE_INFRASTRUCTURE"
            humanInterfaceRisk="0" implementationRisk="0"
            interdependenciesRisk="0"
            laborCostSource="Financial Cost and Rate Matrix"
            laborExchageRateType="AVERAGE"
            laborRateSource="Financial Cost and Rate Matrix"
            lastUpdatedBy="admin" lastUpdatedDate="2009-02-11T09:42:05"
            managerResourceID="paulMartin"
            materialCostSource="Financial Cost and Rate Matrix"
            materialExchageRateType="AVERAGE"
            materialRateSource="Financial Cost and Rate Matrix"
            name="A Test Project" objectivesRisk="0"
            openForTimeEntry="true" organizationalCultureRisk="0"
            pageLayoutCode="projmgr.projectPageFrame"
            plannedBenFinish="2010-01-01T00:00:00"
            plannedBenStart="2009-12-01T00:00:00" plannedBenTotal="1000"
            plannedBreakEven="2010-01-01T00:00:00"
            plannedCostFinish="2010-01-01T00:00:00"
            plannedCostStart="2009-01-01T00:00:00"
            plannedCostTotal="1000" plannedNPV="0" plannedROI="0"
            priority="10" processCode="IT" program="false" progress="0"
            projectID="project1111" requiredForScenarios="false"
            resourceAvailabilityRisk="0" sponsorshipRisk="0"
            stageCode="CSK_INITIATION" start="2009-01-01T08:00:00"
            status="1" statusComment="Status Comment Text"
            statusIndicator="1" supportabilityRisk="0"
            syncInvestmentAndBudgetDates="true" technicalRisk="0"
            template="false" trackMode="2">
            <Resources>
                <Resource availFrom="2009-01-01T08:00:00"
                    availTo="2009-12-31T17:00:00" bookingStatus="5"
                    defaultAllocation="1" isProjectManager="false"
                    lastUpdatedBy="admin"
                    lastUpdatedDate="2009-02-11T09:39:40"
                    openForTimeEntry="true"
                    projectRoleID="csk.Architect" resourceID="artKatect">
                    <Baselines/>
                    <AllocCurve/>
                    <CustomInformation>
                        <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                    </CustomInformation>
                    <SkillAssocs/>
                </Resource>
                <Resource availFrom="2009-01-01T08:00:00"
                    availTo="2009-12-31T17:00:00" bookingStatus="5"
                    defaultAllocation="1" isProjectManager="true"
                    lastUpdatedBy="admin"
                    lastUpdatedDate="2009-02-11T09:40:11"
                    openForTimeEntry="true"
                    projectRoleID="csk.Project Manager" resourceID="paulMartin">
                    <Baselines/>
                    <AllocCurve/>
                    <CustomInformation>
                        <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                    </CustomInformation>
                    <SkillAssocs/>
                </Resource>
            </Resources>
            <Tasks>
                <Task finish="2009-12-31T17:00:00"
                    internalTaskID="5000578" key="false"
                    lastUpdatedBy="admin"
                    lastUpdatedDate="2009-02-11T09:39:40"
                    lockedForScheduling="false" milestone="false"
                    name="A Test Project" orderID="1" outlineLevel="1"
                    percComp="0" start="2009-01-01T08:00:00" status="0"
                    summary="false" taskID="~rmw" topDownPercent="0">
                    <Assignments>
                        <TaskLabor actualWork="0" baselineWork="0"
                            estPattern="3" finish="2009-12-31T17:00:00"
                            lastUpdatedBy="admin"
                            lastUpdatedDate="2009-02-11T09:39:41"
                            remainingWork="2088" resourceID="artKatect"
                            roleID="csk.Architect"
                            start="2009-01-01T08:00:00" unpostedActuals="0">
                            <Baselines/>
                            <EstCurve>
                                <Segment finish="2010-01-01T00:00:00"
                                    start="2009-01-01T00:00:00" sum="2088.0000"/>
                            </EstCurve>
                            <ActCurve/>
                            <CustomInformation>
                                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                            </CustomInformation>
                        </TaskLabor>
                        <TaskLabor actualWork="0" baselineWork="0"
                            estPattern="3" finish="2009-12-31T17:00:00"
                            lastUpdatedBy="admin"
                            lastUpdatedDate="2009-02-11T09:40:11"
                            remainingWork="2088" resourceID="paulMartin"
                            roleID="csk.Project Manager"
                            start="2009-01-01T08:00:00" unpostedActuals="0">
                            <Baselines/>
                            <EstCurve>
                                <Segment finish="2010-01-01T00:00:00"
                                    start="2009-01-01T00:00:00" sum="2088.0000"/>
                            </EstCurve>
                            <ActCurve/>
                            <CustomInformation>
                                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                            </CustomInformation>
                        </TaskLabor>
                    </Assignments>
                    <estimateRules/>
                    <CustomInformation>
                        <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                    </CustomInformation>
                </Task>
                <Task chargeCodeExtID="Expense"
                    finish="2009-12-31T17:00:00"
                    internalTaskID="5000585" key="true"
                    lastUpdatedBy="admin"
                    lastUpdatedDate="2009-02-11T09:41:22"
                    lockedForScheduling="false" milestone="false"
                    name="Task1" nextSiblingOf="~rmw" orderID="2"
                    outlineLevel="1" percComp="0"
                    start="2009-01-01T08:00:00" status="0"
                    summary="false" taskID="Task1">
                    <Baselines/>
                    <Assignments>
                        <TaskLabor actualWork="0" baselineWork="0"
                            estPattern="3" finish="2009-12-31T17:00:00"
                            lastUpdatedBy="admin"
                            lastUpdatedDate="2009-02-11T09:41:03"
                            remainingWork="2088" resourceID="artKatect"
                            roleID="csk.Architect"
                            start="2009-01-01T08:00:00" unpostedActuals="0">
                            <Baselines/>
                            <EstCurve>
                                <Segment finish="2010-01-01T00:00:00"
                                    start="2009-01-01T00:00:00" sum="2088.0000"/>
                            </EstCurve>
                            <ActCurve/>
                            <CustomInformation>
                                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                            </CustomInformation>
                        </TaskLabor>
                        <TaskLabor actualWork="0" baselineWork="0"
                            estPattern="3" finish="2009-12-31T17:00:00"
                            lastUpdatedBy="admin"
                            lastUpdatedDate="2009-02-11T09:41:03"
                            remainingWork="2088" resourceID="paulMartin"
                            roleID="csk.Project Manager"
                            start="2009-01-01T08:00:00" unpostedActuals="0">
                            <Baselines/>
                            <EstCurve>
                                <Segment finish="2010-01-01T00:00:00"
                                    start="2009-01-01T00:00:00" sum="2088.0000"/>
                            </EstCurve>
                            <ActCurve/>
                            <CustomInformation>
                                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                            </CustomInformation>
                        </TaskLabor>
                    </Assignments>
                    <estimateRules/>
                    <CustomInformation>
                        <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                    </CustomInformation>
                </Task>
            </Tasks>
            <CustomInformation>
                <ColumnValue name="obj_align_factor1">50</ColumnValue>
                <ColumnValue name="obj_align_factor2">50</ColumnValue>
                <ColumnValue name="obj_align_factor3">50</ColumnValue>
                <ColumnValue name="obj_align_factor4">50</ColumnValue>
                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
            </CustomInformation>
            <General addedBy="admin" addedDate="2009-02-11"/>
            <OBSAssocs completed="false">
                <OBSAssoc id="Business Unit" name="Business Unit" 
                    unitPath="/All Business Units/Business Operations/Operational Systems"/>
                <OBSAssoc id="corp_dept" name="CORP Department OBS" unitPath="/CORP IT"/>
                <OBSAssoc id="Security OBS" name="Security OBS" 
                    unitPath="/Corporate/IT/Portfolio"/>
            </OBSAssocs>
            <BurdeningAssocs>
                <BurdeningAssoc transactionType="Labor"/>
                <BurdeningAssoc transactionType="Material"/>
                <BurdeningAssoc transactionType="Expenses"/>
                <BurdeningAssoc transactionType="Equipment"/>
            </BurdeningAssocs>
        </Project>
    </Projects>
    <XOGOutput>
        <Object type="project"/>
        <Status state="SUCCESS"/>
        <Statistics failureRecords="0" insertedRecords="0"
            totalNumberOfRecords="1" updatedRecords="0"/>
        <Records/>
    </XOGOutput>
</NikuDataBus>


I would really appreciate any help.

Outcomes