Clarity

  • 1.  What is the difference between XOG client and XOG from GEL?

    Posted Jan 10, 2017 09:59 AM

    Hi all,

     

    I am trying to write a GEL script that fills a custom subobject of project. I have no problem with the GEL. It loops, generates Xog bodies and sends it. but the response is a little bit strange. You may see the generated xogbody that I have serialized from GEL. The response is also given below. 

     

    The strange thing is; when I am getting the error below with GEL, everything works fine when I use this xog body with xog client without any change. What is the difference and how can XOG in this from GEL?

     

    Regards...

     

    XOG Body

    -------------------------------

    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
    <Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="8.0"/>
    <customObjectInstances objectCode="z_project_document">
    <instance instanceCode="" objectCode="z_project_document">
    <CustomInformation>
    <ColumnValue name="code">PD-005018001-003</ColumnValue>
    <ColumnValue name="name">PD-005018001-003</ColumnValue>
    <ColumnValue name="odf_parent_id">5018001</ColumnValue>
    <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
    <ColumnValue name="z_project_status">z_capacity_planning</ColumnValue>
    <ColumnValue name="z_document_type">z_bus_req_doc</ColumnValue>
    </CustomInformation>
    </instance>
    </customObjectInstances>
    </NikuDataBus>

     

    Response

    ---------------

     

    <?xml version="1.0" encoding="UTF-8"?>

    -<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <soapenv:Header/>
    -<soapenv:Body>
    -<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">

    <Status state="FAILURE" elapsedTime="0.0 seconds"/>

    <Statistics updatedRecords="0" totalNumberOfRecords="0" insertedRecords="0" failureRecords="0"/>
    -<ErrorInformation>

    <Severity>FATAL</Severity>

    <Description>Exception while processing client request</Description>

    <Exception type="com.niku.xog.XOGException">main node not found Users</Exception>

    </ErrorInformation>

    </XOGOutput>

    </soapenv:Body>

    </soapenv:Envelope>



  • 2.  Re: What is the difference between XOG client and XOG from GEL?

    Posted Jan 10, 2017 10:13 AM

    The "XOG body" needs to be enclosed in a SOAP envelope when sending from GEL ; I'm not sure from your question whether you are going that? (apologies if you are).



  • 3.  Re: What is the difference between XOG client and XOG from GEL?
    Best Answer

    Posted Jan 10, 2017 10:38 AM

    Yes I did... But you found it  My fault...  I was using a previous Xog in GEL script  that was for user object... I had forgetten  to change the method...

     

    Sorry for you time... Worked fine...

     

    Regards...

     

    ...

    <tns:WriteUser>
    <gel:include select="$xogbody"/>
    </tns:WriteUser>
    ...

     

    ...

    <tns:WriteCustomObjectInstance>
    <gel:include select="$xogbody"/>
    </tns:WriteCustomObjectInstance>
    ...