Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| vendors:cisco:uc:ucce:cvp:java [2019/02/20 12:01] – gerardorourke | vendors:cisco:uc:ucce:cvp:java [2025/02/06 12:52] (current) – [Convert a Number to a String type with an intger value] gerardorourke | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Call Studio Java Examples ====== | ====== Call Studio Java Examples ====== | ||
| + | |||
| + | Reference: https:// | ||
| + | |||
| + | ===== Create custom Java Code for CVP===== | ||
| + | Add the below two “external Jar” to the Library | ||
| + | *C: | ||
| + | *C: | ||
| + | |||
| + | |||
| + | ===== Convert a Number to a String type with an integer value ===== | ||
| + | Note - you don't need to do this - you can use Set value as follows: | ||
| + | |||
| + | === JavaScript in Set Value node - can also do this ==== | ||
| + | as you can see from below - do NOT use " | ||
| + | < | ||
| + | var pollDurationInt; | ||
| + | pollDurationInt = {Data.Session.pollDuration}; | ||
| + | pollDurationInt = parseInt(pollDurationInt, | ||
| + | pollDurationInt = pollDurationInt .toString(); | ||
| + | pollDurationInt; | ||
| + | </ | ||
| + | |||
| * Set a session variable myInt to be your number, such as the string " | * Set a session variable myInt to be your number, such as the string " | ||
| * The below Call Studio Action Java Class will retrieve this value and set the session variable " | * The below Call Studio Action Java Class will retrieve this value and set the session variable " | ||
| - | ==== Convert a Number to a String type with an intger value ==== | ||
| <code java> | <code java> | ||
| import com.audium.server.AudiumException; | import com.audium.server.AudiumException; | ||
| Line 85: | Line 106: | ||
| </ | </ | ||
| - | ==== Simulate a delay ==== | + | ===== Simulate a delay ===== |
| <code java> | <code java> | ||
| // Simple Action Element to Simulate a Delay | // Simple Action Element to Simulate a Delay | ||
| Line 182: | Line 203: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== XML Element Extract Value ===== | ||
| + | <code java> | ||
| + | /** | ||
| + | * Author: Gerry O' | ||
| + | * Date: 01 July 2021 | ||
| + | | ||
| + | * This Java Class extract a value of a specific XML element. | ||
| + | * In my use case I extract from the below SOAP XML response from LCM the value of the < | ||
| + | | ||
| + | <?xml version=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||