Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

UCCX 8 file paths for using java methods

UCCX 8.0.2SU4

I am trying to use java methods to read an xml file out of the Document repository.  I was able to do this in UCCX 7 and prior, but in 8 it seems i need a different file path syntax for the 'java.io.file' variable.

Example:

I would like to do the following:

javaDoc =  new java.io.File(/opt/cisco/uccx/Documents/User/default/mydoc.xml)  

doesFileExist = javaDoc.exists()

I am not having success with these steps, as the result is always false, even though the file does exist.

any help is appreciated.

thanks,

Mike


2 REPLIES
VIP Super Bronze

UCCX 8 file paths for using java methods

Your access to the file system is severly restricted. There are security measures in place that only allow you access to the "customer directory". You'll want to use a Create XML Document step to retrieve a file from the document repository using the DOC[/folder/file.xml] syntax. Note the root (i.e. the first forward slash) is the root of the document repository as seen in the /appadmin UI.

Please remember to rate helpful responses and identify helpful or correct answers.

UCCX 8 file paths for using java methods

The two best ways I've found to do this in a script are:

1. Cache part or all of the document using the Cache Document step and handle the DocumentNotFoundException

2. Convert the Document to a String using the set step and handle the ExpressionEvaluationException

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
394
Views
0
Helpful
2
Replies
CreatePlease login to create content