Service Desk Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

SD 4 Web Api - listing all non-closed calls.

James Mohr

SD 4 Web Api - listing all non-closed calls.

Hi All!

To create a work around so that customers can see all calls from their origanization, I have created my own JSPs. Amazingly enough, I am already at the point where I can display **all** of the call from the organization with no problem. I can display all of the closed calls or all of the in progress call,etc. However, I can only display each status them one at a time. That is, first I list registered, then in progress and so on.

Using addCriteriumOnStatus (or whatever) I can add criteria, but this is an AND. So I cannot simply add the necessary stati. It would take forevery to look through all of the calls multiple times, first for one status and then the next. I also though about using a range, but a "range" of statis does not make sense (maybe not?).

Any pointers would be greatly appreaciated.


Acclaimed Contributor

Re: SD 4 Web Api - listing all non-closed calls.

as I can see you have created your own JSP.
Sorry that I cannot help you - but maybe you can help me :-)
Do you have some documentation how to create my own JSP for ServiceDesk 4.0 ?
I??d like to have more fields as the default Page shows me.
I trying it with J++ but have no more ideas to use it


Dirk dsa
Michael O'Conno

Re: SD 4 Web Api - listing all non-closed calls.

Hotline you can get the documentation for using the Web API for SD from OVWEB.

Hope this helps :)

James Mohr

Re: SD 4 Web Api - listing all non-closed calls.

Welcome to the club! In my opinion, the documentation is typical HP. It says you "can" do something, but not how. The examples they provide are only really useful if you are using the Java API, not through the JSPs. There are some very minor, but vital things missing out of the doc. You're expected to be an very experienced Java programmer before you can even begin. The Web API Programmer???s Guide does have some useful overview information, but not the nuts and bolts.

Fortunately, the company I work for develops Java Internet apps. I went to one of the developers and explained the situation. "Oh, I know what's wrong," he said and within 20 minutes we were up and running.

First, there is no compiler provider with tomcat. Find a JDK with the same version as the JRE you are running (i.e. 1.3). "Sometimes", you run into problems if they do no match (or so I was told). Under /lib create a sub-directory jdk and copy the tools.jar file from the JDK. In your /conf/ file, add this line to your class path:


I found nothing in the Web API doc that says this.

Next you need to import the classes into the HTML file like they are supposed to. The examples are only valid if you are trying to create an applet or a stand-alone, not a JSP. The import lines should something look like this:

<%@ page import="java.util.Properties"%>
<%@ page import="com.hp.itsm.api.*"%>
<%@ page import="com.hp.itsm.api.interfaces.*"%>

Even the example in the "Web API" file are not intended for JSPs. Someone apparently just did a cut-n-paste of the old Java API examples.

To make sure that the JSP engine works, simply create a straight HTML page and give it the ending .jsp. If that page is displayed with no errors, then you know what the JSP engine is working.

What you need to do to create a connection to the app server is play around with the examples, and remove the two lines:

public class Example1

plus the matching '}'. Everying that is part of the API is included in <% %>, like ASPs. Hardcode the server, username and password, just to see if you connect.

Also you should still unpack "Web API". That lists all of the classes and methods. You still need a lot of work to figure out exactly how to use it. The biggest thing is the difference.

If you still run into problems, drop me a line at and I'll send you my version of example1.


Acclaimed Contributor

Re: SD 4 Web Api - listing all non-closed calls.

Did you ever find a way to retrieve all open calls i.e. non-closed calls? I have exactly the same requirement but for a different reason. I need to find all non-closed calls, incidents, problems and changes and do something with them.
There doesn't seem to be a way of adding criteria that is NOT what you specify (i.e. NOT closed) and you cant add criteria that are to be treated as OR or ANY.
I don't want to have to scan several times for each of the status values that are not 'closed'.

//Add this to "OnDomLoad" event