Service Desk Practitioners Forum
cancel

OVSD4.5 SP22 Can't save a new service call via Web-API

Highlighted
Ben H.B.
Valued Contributor.

OVSD4.5 SP22 Can't save a new service call via Web-API

I try to use the web-api to create a service call, but failed.
IAssignment assign = servicecall.getAssignment();
assign.setAssWorkgroup(workgroup);
assign.setAssigneePerson(caller1);
assign.transfer();
System.out.println("start to save");
servicecall.save();

it gives me the following error:
start to save
For service call the following fields are required:

assignment workgroup.
java.lang.RuntimeException: For service call the following fields are required:


assignment workgroup.
at com.hp.ifc.apiserver.ApiServerEntity.insert(Unknown Source)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.hp.ifc.net.itp.AppItpRequest.localInvoke(Unknown Source)
at com.hp.ifc.net.itp.AppItpRequestHandler.process(Unknown Source)
at com.hp.ifc.net.tcp.AppTcpConnection.processRequest(Unknown Source)
at com.hp.ifc.net.tcp.AppTcpThread.run(Unknown Source)
10 REPLIES
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

And if I try to print the asignment info. before save, the printed asignment is what I expected, but the error message changed:

System.out.println("workgroup:"+servicecall.getAssignment().getAssWorkgroup().getName());

start to save
Failed communicating with the server.
Failed communicating with the server.
Nested exception is:
com.hp.ifc.io.AppStreamException: Unable to serialize object: com.hp.ifc
.types.ApiAttributeValues@c3c749
at com.hp.ifc.net.itp.AppItpClient.failConnection(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.execute(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.execute(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.remoteInvoke(Unknown Source)
at com.hp.ifc.net.itp.AppItpProxy.__objectInvoke(Unknown Source)
at com.hp.ifc.net.itp.AppItpProxy.__voidInvoke(Unknown Source)
at com.hp.ifc.apiserver.ps.PApiServerEntity.insert(Unknown Source)
at com.hp.ifc.api.ApiHome.insert(Unknown Source)
at com.hp.ifc.api.ApiEntity.save(Unknown Source)
at ovsd.OVSD17A.main(OVSD17A.java:212)
Radovan Skolnik
Acclaimed Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

Seems you probably have different SP web-api.jar than is installed on your server...
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

Open the client application, it shows "hp Open View service desk 4.5.0588.2205 (SP22)",
and check the web-api verion:
java -cp -classpath=.;D:\OVSD\web-api.jar com.hp.ifc.sys.AppVersionInfo
Acronym: SD
Version: 4.5.0588.2205 (SP22)
Company: hp OpenView
Copyright: Copyright (c) 2004 Hewlett-Packard Development Company, L.P. All
Rights Reserved.
Description: service desk is a family member of the hp OpenView suite.
ProductID: B4321
ProductName: hp OpenView service desk

it seems the same, thank you!
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

can anyone help on this?
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

btw, my jvm version
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

I try to use another version jvm, and with same error message.
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

can anybody help on this :(
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

I can modify existed service call via web-api, but can not creat new.

servicecall = servicecallHome.openServicecall(330062L);
servicecall.setSolution("Done, should include more detail.");
servicecall.save();
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

use updated web api, and add
servicecall.setServiceCallWorkgroup2(workgroup);

issue resolved.
Ben H.B.
Valued Contributor.

Re: OVSD4.5 SP22 Can't save a new service call via Web-API

because we use some customed fields, so update web-api, and add setting methods, it works now.