The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching files to HPOpenView Service desk using API

Highlighted
Grutta
Occasional Advisor

Attaching files to HPOpenView Service desk using API

I am attempting to attached files to a new and also an existing Ticket service call. Is there any sample of how i would do this? The samples that I see seem to anticipate and existing attachment. Thanks
7 REPLIES
Grutta
Occasional Advisor

Re: Attaching files to HPOpenView Service desk using API

I forgot an important detail. The version of service desk I am connecting to is 4.5.0500.1805(sp18)

thanks
Vasily Kamenev
Honored Contributor

Re: Attaching files to HPOpenView Service desk using API

Hi
Web-Api have a trouble with sending attachments. If you run your script on application server - will working; if you run script on remote machine - no. as you understand the problem in file transferring, like use local system. Example: if you set attach file c:\temp\doc.txt from your machine, the application server try searching doc.txt on local hard drive in c:\temp\ folder. the easy way how to do - transfer file to ftp server,Applic server already have access to ftp and can use it and download file to local folder. By way I just modify the AttachedItem.class and add this functionality to class, you can use it, but compiled was on java 1.5, your sp support 1.4 . If you like compile source file AttachedItem.java, add to archive hotfix.jar and save archive to application server, after restart applic. How to use look at example code. Believe that help you.

Vasily
Grutta
Occasional Advisor

Re: Attaching files to HPOpenView Service desk using API

thanks for the reply...give me a few days to test it out thoroughly and i will give you my response.

Godfrey
Grutta
Occasional Advisor

Re: Attaching files to HPOpenView Service desk using API

I have more question before I start. Our architecture has the HPSD server on one machine and a separate machine that hosts the Web Service that uses the HSPD java API. Our custom web service calls into the HSPD by invoking the HPSD jar files stored locally. Do I need to add the new AttachedItem class to both servers? I noticed that only the Server has the hotfix.jar file (which only has a manifest file in it right now). I also noticed that there are two hotfix.jar files, one in the agent directory and the other one in the server directory(both only contain the manifest file). Where do i apply the new class? On the webservice machine or just the Server?
thanks
Vasily Kamenev
Honored Contributor

Re: Attaching files to HPOpenView Service desk using API

Hi
The fix requared only for application server, web server(web console) using application server, but we spoke about web-api. web-api using for own(customer) applications. If your application will working on web and your web using own application server, then yes(need), by other way not.

Vasily
KMR_1
Acclaimed Contributor

Re: Attaching files to HPOpenView Service desk using API

Hi,
is there any other way to put attachment to ftp server from remote client?
Client2008 is transferring attachments directly to ftp server to its final folder and with final uuided-name without temporary storage (something like direct call of putFileToAttachmentServer).
Analyzing classes in Client2008 seems most of them are identical with web-api... so my question is why we can not directly put attachment to it's final location with uuided-name?
Or this same question from another point of view - if we put attachment to correctly uuided folder with correctly set uuided name, how to join this file with given servicecall?
Vasily Kamenev
Honored Contributor

Re: Attaching files to HPOpenView Service desk using API

The post was about web-api. Client software working by own self way.

Vasily
//Add this to "OnDomLoad" event