AnsweredAssumed Answered

How to XOG out (read) resource using filter for Termination Date attribute

Question asked by akort on Jun 20, 2012
Latest reply on Jun 29, 2012 by StevenJames
We need to be able to do a filter in a XOG XML read file for Resources with a Termination Date before the current date. Using the following code results in an error:

"<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

<Header version="6.0.13" action="read" objectType="resource" externalSource="NIKU">


<args name="include_contact" value="true"/>


<args name="include_management" value="true"/>


<args name="include_custom" value="true"/>


<args name="include_financial" value="true"/>

</Header>

<Query>


<Filter name="isActive" criteria="EQUALS">true</Filter>


<Filter name="terminationDate" criteria="BEFORE">2012-6-20</Filter>

</Query>
</NikuDataBus>"


Testing with only the first query (isActive) works fine, but the second filter for "terminationDate" is apparently invalid. Here is the text of the resulting error file:

"<ErrorInformation>
<Severity>FATAL</Severity>
<Description>[Error] :0:0: attribute "name" has a bad value: the value is not a member of the enumeration.
</Description>
<Exception type="java.lang.Exception"><![CDATA[
java.lang.Exception: Invalid xml data

at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:115)

at com.niku.xog.service.ObjectHandler.process(ObjectHandler.java:90)

at com.niku.xog.service.XOGDispatch.processMessage(XOGDispatch.java:114)

at com.niku.xog.service.XOGSOAPServlet.processMessage(XOGSOAPServlet.java:266)

at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:88)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)..."

What is the correct way to filter on this attribute?

Outcomes