Service Desk Practitioners Forum
cancel

Web api Installation

SOLVED
Go to solution
Highlighted
Carlos_211
Super Contributor.

Web api Installation

Hi,

I've read all Web_api_pg document, and after that I've tried to execute the examples that are included there. I've compiled sucessfully the files, but when I execute the example, I cannot connect to the server. My server is in localhost:30999 so the line to connect is

session = ApiSDSession.openSession("localhost:30999", "CARLFRE", "servicedesk");

There Must be a process running in the server to allow web-api access to service desk?

Thanks in advance for your solutions,

Carlos
6 REPLIES
Jasper Verweij
Acclaimed Contributor.

Re: Web api Installation

Be sure you use web-api.jar of the servicepack SD is currently running with. Otherwise you might get an error. PLease post exact error message if that isn't the solution.

I guess the client connects pretty well to this app server?

Jasper
Carlos_211
Super Contributor.

Re: Web api Installation

Here are my lines.
------------------------------------------
javac -classpath .\web-api.jar examples\Example1.java

c:\j2sdk1.4.2_10\bin\java.exe -cp ..\web-api.jar;. Example1 localhost CARLFRE servicedesk

Failed reading response from the server.
-------------------------------------------

As you said, it seems to connect well, but then I cannot read the response from the server.
I don't know what is happening. Any Idea?

I attach my file
Jasper Verweij
Acclaimed Contributor.

Re: Web api Installation

Carlos,

for sure this indicates that web-api.jar file isn't from the same SP level as client, app server and database OR the files starting with 'api' in server\lib don't have exact date as file servicepack.jar in same directory.

Jasper
Ganesha Sridhar
Outstanding Contributor.
Solution

Re: Web api Installation

Hello Carlos,

As stated the problem is due to mismatch in the versions of WEB-API service pack version.

My OVSD Application Server running with SP15:

I tried with web-api.jar fo SP8 version and the output is:
C:\temp>java -cp .\web-api.jar;.; Example1 ixa08 system servicedesk
Failed reading response from the server.


With proper SP15 web-api.jar:
C:\temp>java -cp .\web-api.jar;.; Example1 ixa08 system servicedesk
Display name of this account = System administrator
The language of this user = English
The email address of this user = null
Persons using the same account :
The timezone of this user = EST



HTH

Regards
Ganesha Sridhara
Carlos_211
Super Contributor.

Re: Web api Installation

HI,

I've solved my problem.

I've checked the version of my Service Desk Server (sd_version) and then the version of web-api.jar (java -cp .\web-api.jar com.hp.ifc.sys.AppVersionInfo)

And now, both are the same. The problem was that I installed service pack 14, but I was using the web-api without the service pack. The new web-api.jar is included in the service pack.

Thanks for solve my problem
Carlos_211
Super Contributor.

Re: Web api Installation

As always, a great solution has been provided and I close the thread

Thanks