AnsweredAssumed Answered

XOG SOAP request to filter INCIDENTS

Question asked by semih on Jan 22, 2012
Latest reply on Apr 21, 2017 by Danpego
Hello,

I want to query incidents according to "assignedTo" paremeter. ( example : get a list of incidents assigned to resourceID s_sakizi) using SOAPUI.

For this purpose, I use the following WSDL and SOAPUI.

WSDL:
http://SERVER_URL/niku/wsdl/Object/Incidents

If I use "incidentCode" as filter, I can get a successful reply.

<Filter name="incidentCode" criteria="EQUALS">TK-I005315</Filter>

But, If use "assignedTo" as filter, it gives the following error.

<Filter name="assignedTo" criteria="EQUALS">s_sakiz</Filter>

<Severity>FATAL</Severity>
<Description>[Error] :0:0: attribute "name" has a bad value: the value is not a member of the enumeration.</Description>


How can I query the incidents that are assigned to resourceID(s_sakiz) by using SOAPUI ??
help please...


Here are the sample calls for successfull reques and responses.

SUCCESSFULL SOAPUI REQUEST:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
<soapenv:Header>
<obj:Auth>
<!--Optional:-->
<obj:SessionID>28757203__4BDE27E3_1340E46E4B7_-7FEE</obj:SessionID>
<!--Optional:-->
<obj:Username>?</obj:Username>
<!--Optional:-->
<obj:Password>?</obj:Password>
</obj:Auth>
</soapenv:Header>
<soapenv:Body>
<obj:ReadIncident>

<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
<Header version="12.1.1.1208" objectType="incident" externalSource="NIKU">
</Header>

<Query>

<Filter name="incidentCode" criteria="EQUALS">TK-I005315</Filter>

</Query>
</NikuDataBus>

</obj:ReadIncident>
</soapenv:Body>
</soapenv:Envelope>


SUCCESSFULL RESPONSE:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ReadIncidentResponse xmlns="http://www.niku.com/xog/Object">
<NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_incident.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header externalSource="NIKU" version="12.1.1.1208"/>
<incidents>
<incident assignedProjectManagerCode="s_sakiz" assignedTo="s_sakiz" categoryCode="POTA" flagForConversion="true" impactCode="1" incidentCode="TK-I005315" isPriorityOverriden="false" reportedBy="s_sakiz" statusCode="GELISTIRMETEST" subject="test" typeCode="INCIDENT" urgencyCode="1">
<description/>
<notes/>
<efforts enterOnce="true"/>
<contacts>
<contact email="SSAKIZ@THY.COM"/>
</contacts>
<CustomInformation>
<ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
<ColumnValue name="ztac_kullanicistatu">NEW</ColumnValue>
<ColumnValue name="ztac_talepsahibi">SAKIZ, SEMİH/ColumnValue>
<ColumnValue name="z_notfy_inc_assing">false</ColumnValue>
<ColumnValue name="z_notify_inc_creator">false</ColumnValue>
<ColumnValue name="ztac_cozmud">PPM_TalepYonetimi</ColumnValue>
<ColumnValue name="ztac_kgbt_flag">true</ColumnValue>
</CustomInformation>
</incident>
</incidents>
<XOGOutput>
<Object type="incident"/>
<Status state="SUCCESS"/>
<Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
<Records/>
<DeprecationInformation>
<Severity>WARNING</Severity>
<Description>DEPRECATION MESSAGE</Description>
<Exception type="java.lang.Exception">The objectType attribute in the Header has been deprecated.</Exception>
</DeprecationInformation>
</XOGOutput>
</NikuDataBus>
</ReadIncidentResponse>
</soapenv:Body>
</soapenv:Envelope>



SOAPUI REQUEST THAT GETS ERROR:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
<soapenv:Header>
<obj:Auth>
<!--Optional:-->
<obj:SessionID>28757203__4BDE27E3_1340E46E4B7_-7FEE</obj:SessionID>
<!--Optional:-->
<obj:Username>?</obj:Username>
<!--Optional:-->
<obj:Password>?</obj:Password>
</obj:Auth>
</soapenv:Header>
<soapenv:Body>
<obj:ReadIncident>

<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
<Header version="12.1.1.1208" objectType="incident" externalSource="NIKU">
</Header>

<Query>

<Filter name="incidentCode" criteria="EQUALS">TK-I005315</Filter>

<Filter name="assignedTo" criteria="EQUALS">s_sakiz</Filter>

</Query>
</NikuDataBus>

</obj:ReadIncident>
</soapenv:Body>
</soapenv:Envelope>




SOAP RESPONSE THAT CONTAINS ERROR:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ReadIncidentResponse xmlns="http://www.niku.com/xog/Object">
<XOGOutput xsi:noNamespaceSchemaLocation="../xsd/status.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Object type="incident"/>
<Status state="FAILURE"/>
<Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
<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>Invalid xml data</Exception>
</ErrorInformation>
<DeprecationInformation>
<Severity>WARNING</Severity>
<Description>DEPRECATION MESSAGE</Description>
<Exception type="java.lang.Exception">The objectType attribute in the Header has been deprecated.</Exception>
</DeprecationInformation>
</XOGOutput>
</ReadIncidentResponse>
</soapenv:Body>
</soapenv:Envelope>

Outcomes