Service Desk Practitioners Forum
cancel

Problem with web-api

Highlighted
Carlos_211
Super Contributor.

Problem with web-api

Hi,

I've a problem progamming with web-api in Java.

When I try to filter serviceCall or Services by the Organization, i get an error.

=======
IServicecallHome sch = session.getServicecallHome();
IServicecall[] sc = sch.findAllServicecall();
IOrganizationHome orgh = session.getOrganizationHome();
IOrganization[] org = orgh.findAllOrganization();

IServiceWhere servWhere = null;

for (int i = 0; i < org.length; i++) {
servWhere.addCriteriumOnServiceOrganization1(org[i]);

=========

And the error is:
"Excepcion: java.lang.NullPointerException"

The error occurs when I try to add the criterium

Any suggestion?

Thanks in advance.

Carlos
1 REPLY
Carlos_211
Super Contributor.

Re: Problem with web-api

Solved:

I have made the following:

IServicecallHome sch = session.getServicecallHome();
IServicecall[] sc = sch.searchOnCallerOrganization(IOrganization value);

Thanks anyway.