UCCX GET XML Document data - how to force language path
Hi,
I saw that with UCCX, If the trigger have is language FR_CA, when I will use the Get XML Document Data (docTemp, etc,etc )
It will get the value of the file located in the path of FR_CA in the document management.
Lets say, If the trigger language is FR_CA, Is there any way I can use the GET XML Document to open a file in the EN_CA in the document management ?
How can I do that ?
ps : The upload document have this function, we can force a language but I have no idea how to handle this with the Get XML Document.
Thanks
I will attach a screenshot of how you can specify the language folder that the Document lives in, regardless of the language of the Trigger or Contact.
Notice that in the variable I am simply referencing the Document filename. This will assume the language of the Contact.
But also notice that within the step, I am saying that the Source document should be found in the L[en_CA] language folder. This does not change the language of the Contact; it simply tells the system to look in a different folder for the file.
Of course, if your Document is not language specific, you could always put it in the Default language folder and then it will be available to all Contacts regardless of Language setting.
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
Similar Messages
-
Cisco UCCX 10.6 Get XML Document Data XPath count() function
Hi
I'd like to retrieve the number of XML nodes in a document to make a script more efficient.
e.g. with this XML, I'd like to know how many <message> nodes there are:
<messages>
<message>contentA</message>
<message>contentA</message>
<message>contentA</message>
</messages>
I've tried iNodeCount = Get XML Document Data (inputXMLfile, "count(//messages/message)")
If I try this in an XPath expression tester then I get the result I'm expecting - an integer of 3. However, in UCCX this produces the error "Can not convert #NUMBER to a NodeList!"... What am I doing wrong?
ThanksHi,
you may want to use a Set or a Do step to execute Java code.
First, reference the XML file (within the repository) by calling DOC[myFile.xml] and of course, assigning this value to a Document type variable, e.g.:
Set myDocument = DOC[myFile.xml]
Then add a Do step that actually does the XPath part of the job.
There's a nice step by step explanation of it here: http://viralpatel.net/blogs/java-xml-xpath-tutorial-parse-xml/
Remember, you can get the Inputstream object of the myDocument variable using the getInputStream() method on it.
G. -
How to check empty return from Get XML Document Data?
If Get XML Document Data doesn't return a result, how do you test it? String.isEmpty() doesn't do the trick, it still throws the exception "java.lang.NullPointerException". I can't seem to be able to match that up to a cisco exception with a "On Exception Goto" step (which I put right before the XML Document Data step). Any clues anyone?
Hi,
Try this:
variable=Get XML Document Data ()
if(variable == null) then
true
false
Gabriel. -
UCCX XPath on Get XML Document Data Step always returns null
Hello,
Can someone tell whats wrong with my XPath, because it always returns null. I have tried different variations and nothing. I'm using UCCX 7.0
XML
<?xml version="1.0" encoding="utf-8" ?>
<GetManagersResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.labdomain.com/">
<ClaimManagersList>
<X_CLAIM_MANAGER>
<ClaimManagerUserName>test</ClaimManagerUserName>
</X_CLAIM_MANAGER>
</ClaimManagersList>
</GetManagersResult>
XPATH
"/descendant::GetManagersResult/child::ClaimManagersList/child::X_CLAIM_MANAGER/child::ClaimManagerUserName"
During debug, this is the value of the xml document when it reaches the Get XML Document Data step:
TEXT[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetManagersResult xmlns=\"http://www.labdomain.com/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n <ClaimManagersList>\r\n <X_CLAIM_MANAGER>\r\n <ClaimManagerUserName>test</ClaimManagerUserName>\r\n </X_CLAIM_MANAGER>\r\n </ClaimManagersList>\r\n</GetManagersResult>]It's your XML namespace in the root element.
First off, I have never seen the CRS Editor play nice when XML namespaces are involved.
Secondly, with your namespace in place, not even a generic xpath expression tester can find your data. See attachements.
I think that if you find a way to either: not send, or remove the namespace from your document, your xpath expression will work.
With Namespaces
Without Namespaces -
Xpath and Get XML Document Data
Good Morning,
I have just recently gotten involved in a project that requires communicating with some web services (axis2). We have existing scripts that handle this already, but they were built when we weren't on axis2 so now the XML output from the web service call is slightly different and i am no longer able to use the same xpath statement in the Get XML Document Data step.
I am receiving either null values or a prefix namespace error. I am new to xpath and have been reading as best i can from http://www.w3schools.com/xpath/ to try and understand how to write my statements to pull out the data i want correctly.
I have read that sometimes the editor has problems if the XML contains namespace declarations, etc.
Below is an example XML output where I'd like to be able to read the value in the ax211:success. My xpath gets prefix namespace errors as it doesn't recognize ax211.
Xpath: /descendant::ns:validateCertificationResponse/child::ns:return/child::ax211:success
Perhaps my xpath statement is just incorrect and wouldn't retrieve what i expect it to....
Any advice is appreciated.
Thanks,
KevinHi,
well, it appears that text() is automatically appended to the XPath query for some reason in UCCX, this is why you actually see the text node within the ax211:success element. This //*[local-name()="success"] select the whole node, not its first child (which is actually the first element, which also happens to be a text).
Anyway,
// - anywhere
* - any node
And within this "everything" you actually search with the condition within the angular brackets.
G. -
After tweak bunch of times the argument inside "Get XML Document Data" I´m still not able to obtain a no null value. Could someone help me to find out what i´m doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<Holidays>
<Holiday>Date=1/2/2013</Holiday>
<Holiday>Date=1/2/2013</Holiday>
<Holiday>Date=8/4/2013</Holiday>
<Holiday>Date=9/4/2013</Holiday>
<Holiday>Date=1/5/2013</Holiday>
<Holiday>Date=17/5/2013</Holiday>
<Holiday>Date=27/5/2013</Holiday>
<Holiday>Date=6/6/2013</Holiday>
<Holiday>Date=23/6/2013</Holiday>
<Holiday>Date=6/4/2013</Holiday>
<Holiday>Date=25/12/2013</Holiday>
<Holiday>Date=26/12/2013</Holiday>
</Holidays>
Xpath:
"/descendant::Holidays/child::Holiday[attribute::symbol='DateString']/child::LAST"
thank in advance.Hi,
The script first obtain today´s date in this format 1/2/2013 and stores in DateString variable. Then create a XML document based on this:
<?xml version="1.0" encoding="UTF-8"?>
Date=1/2/2013
Date=1/2/2013
Date=8/4/2013
Date=9/4/2013
Date=1/5/2013
Date=17/5/2013
Date=27/5/2013
Date=6/6/2013
Date=23/6/2013
Date=6/4/2013
Date=25/12/2013
Date=26/12/2013
that i´ve upload to uccx. it uses get XML Document Data function and stores the result in DataResult variable.
if
DataResult == null meets True it makes a call redirect to an extension
if false that means "1/2/2013" was found inside the XML archive and sends to another extension.
The problem i see through reactive debug is that always return null,
In brief: I do not know how to tell using the function "find 1/2/2013 inside Holidays.xml document"
this is what I putted inside get XML Document Data function:
"/descendant::Holidays/child::Holiday[attribute::symbol='DateString']/child::LAST" -
Get XML Document Data step always returns NULL
Hi All,
I was hoping someone might be able to help with this.
I'm writing a holiday script, it uses XML to check whether the date is a holiday or halfday. XML below
<?xml version="1.0" encoding="ISO-8859-1"?>
<Holidays>
<Holiday Date="1/1/2012">Holiday</Holiday>
<Holiday Date="3/1/2012">Halfday</Holiday>
<Holiday Date="6/1/2012">Holiday</Holiday>
<Holiday Date="5/4/2012">Halfday</Holiday>
<Holiday Date="6/4/2012">Holiday</Holiday>
<Holiday Date="8/4/2012">Holiday</Holiday>
<Holiday Date="9/4/2012">Holiday</Holiday>
<Holiday Date="30/4/2012">Halfday</Holiday>
<Holiday Date="1/5/2012">Holiday</Holiday>
<Holiday Date="17/5/2012">Holiday</Holiday>
<Holiday Date="27/5/2012">Holiday</Holiday>
<Holiday Date="6/6/2012">Holiday</Holiday>
<Holiday Date="23/6/2012">Holiday</Holiday>
<Holiday Date="6/4/2012">Holiday</Holiday>
<Holiday Date="3/11/2012">Halfday</Holiday>
<Holiday Date="25/12/2012">Holiday</Holiday>
<Holiday Date="26/12/2012">Holiday</Holiday>
<Holiday Date="19/10/2012">Halfday</Holiday>
</Holidays>
However when I debug the script the result of the Get XML Document step always returns null.
Xpath work great in notepad++
My code is attached, anyone with any pointers?
Regards,
AndyYour XPATH of:
"/Holidays/Holiday[@Date='+DateString+']"
Needs to be:
"/Holidays/Holiday[@Date='"+DateString+"']"
Good luck and happy scripting!
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches. -
Has anyone found a way to overcome the SSL certificate error via UCCX editor? See attached screenshots. Thanks!
Hi, not easily, no.
But I guess this has already been discussed/answered by Sam Womack in a later post. What you need to do is talk to TAC and have them upload the client certificate into your UCCX's keystore.
G. -
Error while getting xml document with default connection in 8iJServer
I had used GZIP utility to zip and store the document in
the CLOB. If i use thin drivers and GZIP to retieve this document it works fine.
instead of thin drivers if i use oracle8iJserver defalut
connection i get the follwing error
:Error while getting xml document Not in GZIP format.
your response is appreciated.
thanks
sanjay.Hi Yepin Jin,
I am facing the same issue did you solved it?
Regards,
Orlando Covault -
Get xml Document result via Toplink.
Hi.
I want to get XML Document result instead of the entities of the table by using the Toplink.
Who have some advices?
Thanks.Please try the toplink forum.
-
How to get xml-document in 10g in simplest way ?
Hi,
I'm new in xml, there are so many tools to work with xml:
what is the simplest way to get a xml-file from 10g-database ?
I have : 10g R2 and a xsd.file to describe the xml-structure
thank you
NorbertThere is no automatic way to generate XML documents from an arbitary set of relational tables using the information contained in an XML Schema. Typically the easiest way to generate XML from relational data is to use the SQL/XML operators (XMLElement, XMLAGG, XMLAttribtues, XMLForest). There are many examples of using these operators in the forums You can validate the generated XML against the XML Schema by registering the XML Schema with XML DB and then using the XMLType.SchemaValidate() method
-
How do we get the change document data to be used in a workflow,
I have made entry in swec , there i associated the change object and my zbo delegeted from standard bo and specified the event as "on change". now i want to send a mail using this changed data.
I have two options either i use an exit fm to trigger the mail or use a workflow to trigger tha mail, but how do i use the changed data that i get from cdhdr, i need to specify these fields in tha mail body.
or if i choose to use an exit fm how to do it.
regards,
кu03B1ятu03B9кHello,
Create a new background method in the ZBO to get all the required details from CDHDR and CDPOS tables. Export them from the method as separate variables or as an internal table.
Create a task in the workflow to execute this method before the sendmail step. Once the data is exported from the method, it is going to be available in the workflow container and so you can use the same in the SENDMAIL step.
Hope this will help.
Thanks,
Samson -
Database table updation with XML Document data
import java.io.*;
import java.lang.*;
import java.net.URL;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import oracle.xml.sql.dml.OracleXMLSave;
import org.w3c.dom.Document;
public class updateXMLData
public static void main( String argv[] ) throws SQLException,Exception
String tabName = "emp";
Connection conn = null;
String xmlString;
Document doc;
URL filename;
try
//init a JDBC connection using Oracle's JDBC Drivers
String host = "maple"; // change,these won't work
String port = "1521";
String sid = "PBSI";
String s1 = "jdbc:oracle:thin:@" + host + ":" + port + ":" + sid;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection( s1,"scott","tiger");
// Instructions for updating the database rows from XML Document
OracleXMLSave sav = new OracleXMLSave(conn,tabName);
filename = sav.getURL("pbsiempupd.xml");
sav.setRowTag("EMP");
String[] tempArr = new String[2];
tempArr[0]="EMPNO";
tempArr[1]="ENAME";
sav.setKeyColumnList(tempArr);
sav.setUpdateColumnList(tempArr);
int noRows = sav.updateXML(filename);
System.out.println("No of rows updated : " + noRows);
catch (SQLException se)
System.out.println("An SQL exception has occured ");
System.out.println("The error code is : " + se.getErrorCode());
System.out.println("The SQL State is : " + se.getSQLState());
System.out.println("The message is : " + se.getMessage());
catch (Exception e)
System.out.println("Unknown exception has occured");
System.out.println("The class is : "+ e.getClass());
System.out.println("The message is : "+e.getMessage());
finally
if (conn != null) conn.close();
The input XML Document is given below :- in 'pbsiempupd.xml'
<?xml version="1.0"?>
<ROWSET>
<EMP>
<EMPNO>8888</EMPNO>
<ENAME>RAO THOTAKURA</ENAME>
</EMP>
<EMP>
<EMPNO>9999</EMPNO>
<ENAME>BAVA MANI</ENAME>
</EMP>
<EMP>
<EMPNO>7777</EMPNO>
<ENAME>SRINIVAS M</ENAME>
</EMP>
</ROWSET>
After executing this class with 'java updataXMLData' I'm getting following runtime error message :-
Unknown exception has occured
The class is : class oracle.xml.sql.OracleXMLSQLException
The message is : Exception 'java.sql.SQLException:Missing IN or OUT parameter at index:: 1'
encountered during processing ROW element 0All prior XML row changes were rolled back.
in the XML document.
Please anybody could explain how to solve it.
Thanks
Sambasivarao ThotakuraSee my reply to your other question. thanks.
-
Getting xml document out from clob
Hi All,
How could we get the xml document according to the user queries if we store the xml document as it is to the clob.
Can I use the XSU to store the xml document to the clob and retrieve xml from the clob according to user queries.Is it possible?
How could intermedia help me in solving this problem.
Thanks in advance
Dinu Varghese.
nullOTN has some sample apps that might interest you:
[list]
[*]Customizing Web Content
[*]B2B with XML
[list]
Regards,
-rh -
How to get xml Element , data and its Childs
hi,
I am trying to get entire Element and its childs depending on condition.
suppose
if(doc.element.name== "despatch"){
// here i want entire despatch element with data and childs and copy into one string like
// eg: String dsp = <despatch><name>body1</name> <value>value1<value>
</despatch>
<?xml version="1.0">
<handler>
<name>header1</name>
<value>value1</value>
</handler>
<despatch>
<name>body1</name>
<value>value1<value>
</despatch>
<gov>
<name>env</name>
<value>value1</value>
</gov>I managed to get number of elements depending on the Element name but i need to get the entire block.
nodeList = document.getElementsByTagName("despatch").item(0).getChildNodes();
for(int i=0;i<nodeList.getLength();i++){
System.out.println("i :"+document.getElementsByTagName("m:Security").item(i));
}any kind of help is appreciated.
Han.
Edited by: HANRAM on Apr 24, 2008 2:48 AMHi Kartik,
This one is similar to my question to print and email invoice at same time. I pass itcpo-tdgetotf = 'X' in order to get otfdata and send email with the attachment of otfdata.
Now I have data in otfdata, but when I call print_otf function, I clear out itcpo-tdgetotf, and passed
itcpo-tddest = device_type but I still get error message said 'Handler not valid for open spool request'.
Can you give me a working example that you have otfdata table and print data from that table. I also post my question on other thread
submit report and export to memory
thanks
Maybe you are looking for
-
Newbie Alert: How can I include a JSF in a JSF
Sorry for what must be a really stupidly easy question but I have tried every way I can think to get one JSF page to include another JSF page. For instance I want to include a standard site wide header. I am using jspx and have tried <f:subview id="h
-
How can I get iPhoto to be the default imaging application to down load pictures from email? I right click on the picture and get a menu that gives me the following choices: Open Attachment, Open With (arrow link), Save Attachment, Save to downloads
-
My iMac is literally out of control....
Help! My iMac (Mac OSX 10.6.8, snow leopard, 2ghz intel core duo, 4 yrs old) has gone crazy. I can barely control it. Ive posted a video to youtube as its esier than explaining it. http://m.youtube.com/index?client=mv-google&desktop_uri=%2F&gl=US&rdm
-
MSI R9 270x 3 Monitor VGA DVI HDMI
I've just bought a new monitor. So now I have a VGA a DVI and a HDMI. The VGA is being converted through a passive converter and is in a DVI port. The other DVI is in the bottom DVI slot. The HDMI is in the HDMI slot. With all of this I can only use
-
Hi everyone, I'm the happy owner of an X61S Thinkpad. Well, not quite happy at the very moment I must say. I've had this laptop for quite a while already. In fact, I'm not using it as primary computer since 2012 or something. Recently I decided to co