Clarity

  • 1.  Deprecation message in xog output

    Posted Dec 01, 2014 09:53 AM

    Hello,

     

    we have got a problem, when we try to xog in new custom object instance we get following message with warning. I tried to find some advice here but I found nothing usefull

     

    <WriteCustomObjectInstanceResponse xmlns = "http://www.niku.com/xog/Object" xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">    

                                   <XOGOutput xsi:noNamespaceSchemaLocation = "../xsd/status.xsd">      

                                                   <Object type = "customObjectInstance"/>      

                                                   <Status elapsedTime = "0.32 seconds" state = "SUCCESS"/>      

                                                   <Statistics failureRecords = "0" insertedRecords = "1" totalNumberOfRecords = "1" updatedRecords = "0"/>      

                                                   <Records/>      

                                                   <DeprecationInformation>        

                                                                   <Severity>WARNING</Severity>        

                                                                   <Description>DEPRECATION MESSAGE</Description>        

                                                                   <Exception type = "java.lang.Exception">The action and objectType attributes in the Header have been deprecated, and the listed value of 'customobjectinstance' conflicts with the requested objectType 'customObjectInstance'.</Exception>      

                                                   </DeprecationInformation>    

                                   </XOGOutput>  

                    </WriteCustomObjectInstanceResponse>

     

    The instance is created, but in our interface we need no warnings. Can you please help me with this?

     

    Here is Input message:

    <NikuDataBus xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "../xsd/nikuxog_customObjectInstance.xsd">

                                                   <Header action = "write" externalSource = "NIKU" objectType = "customObjectInstance" version = "13.3.0.286">

                                                                   <args name = "overrideAutoNumbering" value = "false"/>

                                                   </Header>

                                                   <customObjectInstances objectCode = "c_timesheetdata">  

                                                                   <instance instanceCode = "-1" objectCode = "c_timesheetdata">    

                                                                                  <CustomInformation>      

                                                                                                  <ColumnValue name = "partition_code">NIKU.ROOT</ColumnValue>      

                                                                                                  <ColumnValue name = "name">jmeno</ColumnValue>      

                                                                                                  <ColumnValue name = "code">-1</ColumnValue>      

                                                                                                  <ColumnValue name = "page_layout">odf.c_timesheetdataFrame</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_irn">121212/2013</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_tsk_id">120</ColumnValue>       

                                                                                                  <ColumnValue name = "c_tsh_date">2014-10-06T00:00:00</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_status">0</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_wbs">12021011</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_pin">1010</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_hours">1.25</ColumnValue>      

                                                                                                  <ColumnValue name = "c_tsh_type">1</ColumnValue>    

                                                                                  </CustomInformation>  

                                                                   </instance>

                                                   </customObjectInstances>

                                   </NikuDataBus>

     

    Regards,

    Martin



  • 2.  Re: Deprecation message in xog output

    Posted Dec 01, 2014 06:45 PM

    Just remove the action and objectType attributes from the header.  The listed value of 'customobjectinstance' will go away once you remove the objectType attribute (customobjectinstance -- wrong case = customObjectInstances)

     

    <NikuDataBus xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "../xsd/nikuxog_customObjectInstance.xsd">
        <Header externalSource = "NIKU" version = "13.3.0.286">
            <args name = "overrideAutoNumbering" value = "false"/>
        </Header>
        <customObjectInstances objectCode = "c_timesheetdata"> 
            <instance instanceCode = "-1" objectCode = "c_timesheetdata">   
                <CustomInformation>     
                    <ColumnValue name = "partition_code">NIKU.ROOT</ColumnValue>     
                    <ColumnValue name = "name">jmeno</ColumnValue>     
                    <ColumnValue name = "code">-1</ColumnValue>     
                    <ColumnValue name = "page_layout">odf.c_timesheetdataFrame</ColumnValue>     
                    <ColumnValue name = "c_tsh_irn">121212/2013</ColumnValue>     
                    <ColumnValue name = "c_tsh_tsk_id">120</ColumnValue>      
                    <ColumnValue name = "c_tsh_date">2014-10-06T00:00:00</ColumnValue>     
                    <ColumnValue name = "c_tsh_status">0</ColumnValue>     
                    <ColumnValue name = "c_tsh_wbs">12021011</ColumnValue>     
                    <ColumnValue name = "c_tsh_pin">1010</ColumnValue>     
                    <ColumnValue name = "c_tsh_hours">1.25</ColumnValue>     
                    <ColumnValue name = "c_tsh_type">1</ColumnValue>   
                </CustomInformation> 
            </instance>
        </customObjectInstances>
    </NikuDataBus>
    
    

     

     

    V/r,

    Gene



  • 3.  Re: Deprecation message in xog output

    Posted Dec 02, 2014 03:23 AM

    Hello,

    I tried that, but I get following error:

     

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

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

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

      <ErrorInformation>

        <Severity>FATAL</Severity>

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

        <Exception type="com.niku.xog.XOGException">Invalid XOG Service Request.  Make sure there is a valid namespace associated to the root element of the request document.</Exception>

      </ErrorInformation>

    </XOGOutput>

     

    So It ditn't help Have you got any Idea with this error?

     

    Regards,

    Martin



  • 4.  Re: Deprecation message in xog output
    Best Answer

    Posted Dec 02, 2014 03:29 PM

    So I usually us SOAPUI to test my soap payloads to get them right and then back into them via my code.

     

    So this request payload for WriteCustomObjectInstance

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
      <soapenv:Header>
          <obj:Auth>
            <obj:Username>admin</obj:Username>
            <obj:Password>password</obj:Password>
          </obj:Auth>
      </soapenv:Header>
      <soapenv:Body>
          <obj:WriteCustomObjectInstance>
            <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Header externalSource="NIKU" version="13.3.0.286"/>
                <customObjectInstances objectCode="mhs_financialtask">
                  <instance instanceCode="FTK00000037" objectCode="mhs_financialtask">
                      <CustomInformation>
                        <ColumnValue name="page_layout">odf.mhs_financialtaskFrame</ColumnValue>
                        <ColumnValue name="mhs_cshblnc">640762.8</ColumnValue>
                      </CustomInformation>
                  </instance>
                </customObjectInstances>
            </NikuDataBus>
          </obj:WriteCustomObjectInstance>
      </soapenv:Body>
    </soapenv:Envelope>
    

     

    returns this response payload.

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header/>
       <soapenv:Body>
          <SessionID xmlns="http://www.niku.com/xog">23105379__86913F4B-5725-468E-BA0E-43E3E6DD7A4A</SessionID>
          <WriteCustomObjectInstanceResponse xmlns="http://www.niku.com/xog/Object">
             <XOGOutput xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
                <Object type="customObjectInstance"/>
                <Status elapsedTime="0.136 seconds" state="SUCCESS"/>
                <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="1"/>
                <Records/>
             </XOGOutput>
          </WriteCustomObjectInstanceResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    

     

    So no "deprecation message" in the response.  The only difference I see now is that I don't have the xsi:noNamespaceSchemaLocation = "../xsd/nikuxog_customObjectInstance.xsd" namespace attribute for NikuDataBus.


    V/r,

    Gene



  • 5.  Re: Deprecation message in xog output

    Posted Dec 05, 2014 02:49 AM

    Hello Gene,

     

    I'm sorry, I was doing test wrong way, after explanation from Alessandro from CA Support I do it right way and it really works as you described. Thank you for your time and help.

     

    Regards,

    Martin