<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Custom Java Classes with Call Studio</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11939384" />
  <subtitle>Custom Java Classes with Call Studio</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11939384</id>
  <updated>2013-05-21T21:21:24Z</updated>
  <dc:date>2013-05-21T21:21:24Z</dc:date>
  <entry>
    <title>RE: Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12508769" />
    <author>
      <name>Birendra Hansda</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12508769</id>
    <updated>2013-03-01T05:19:28Z</updated>
    <published>2013-03-01T05:19:28Z</published>
    <summary type="html">[quote=Mark Applebee]This is my first Java code. I was trying to use a template posted by you. Here it is:
 
import com.audium.server.AudiumException;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.session.ActionElementData;
 
public class TEST1 extends ActionElementBase
{
 public void doAction(String name, ActionElementData data) throws AudiumException
 {
 String callid=(String)data.getSessionData("callid");
 data.addToLog("callid",callid);
 data.setElementData("LANG","ENG");
 }
 
}
 
Please let me know whether I am doing it right.[/quote]
 
Hi Mark
For the audium element to show up in the studio, you will have to implement the ElementInterface in your class.  Apart from CVP programming guide, you will also need the javadoc for CVP API. You can download some sample custom elements and the javadocs from [url=http://developer.cisco.com/web/cvp/home]http://developer.cisco.com/web/cvp/home[/url] 
Regards
Birendra Hansda
 </summary>
    <dc:creator>Birendra Hansda</dc:creator>
    <dc:date>2013-03-01T05:19:28Z</dc:date>
  </entry>
  <entry>
    <title>Re: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12494882" />
    <author>
      <name>Janine Graves</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12494882</id>
    <updated>2013-02-28T21:03:19Z</updated>
    <published>2013-02-28T21:03:19Z</published>
    <summary type="html">This is a 'Standard Action' - it doesn't show up as a new element in 
Studio.

To use this code, you drag in the Studio element named 'Action'. You can 
then name the element in Studio if you like.

In the right side, configuration pane, enter the Java class name 
(without a file extension) -  'TEST1'  (omit the quotes).

That's all.

Janine</summary>
    <dc:creator>Janine Graves</dc:creator>
    <dc:date>2013-02-28T21:03:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12493780" />
    <author>
      <name>Mark Applebee</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12493780</id>
    <updated>2013-02-28T20:22:20Z</updated>
    <published>2013-02-28T20:22:20Z</published>
    <summary type="html">This is my first Java code. I was trying to use a template posted by you. Here it is:
 
import com.audium.server.AudiumException;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.session.ActionElementData;
 
public class TEST1 extends ActionElementBase
{
 public void doAction(String name, ActionElementData data) throws AudiumException
 {
 String callid=(String)data.getSessionData("callid");
 data.addToLog("callid",callid);
 data.setElementData("LANG","ENG");
 }
 
}
 
Please let me know whether I am doing it right.</summary>
    <dc:creator>Mark Applebee</dc:creator>
    <dc:date>2013-02-28T20:22:20Z</dc:date>
  </entry>
  <entry>
    <title>Re: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12491238" />
    <author>
      <name>Janine Graves</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12491238</id>
    <updated>2013-02-28T19:19:19Z</updated>
    <published>2013-02-28T19:19:19Z</published>
    <summary type="html">Once you close the app out of the Studio workspace, and then 
double-click app.callflow, the element should show up under Local 
Elements. If it doesn't then there's usually an array indexing problem 
in your java code.

In Studio, look under Window &gt; Show View &gt; Call Studio Error Log.  This 
will display at the bottom of the Studio window, near the Studio 
Problems tab. You should select the error, and right-click, select 
Properties. This will pop up a box and give you an error message and 
Java stack trace.

Usually the error is in the method named GetSettings or GetElementData 
or GetExitStates. Each of these has an array. You must specify the size 
of the array. And then you MUST initialize each row of the array.

If you either fail to initialize one of the array rows, or if you 
initialize a row of the array but the array dimension is smaller than 
that (indexOutOfBounds) then the element will fail to show up in the 
Studio pane.

Feel free to post your java file online and I'll fix it for you.</summary>
    <dc:creator>Janine Graves</dc:creator>
    <dc:date>2013-02-28T19:19:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490685" />
    <author>
      <name>Hemal Mehta</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490685</id>
    <updated>2013-02-28T18:54:19Z</updated>
    <published>2013-02-28T18:54:19Z</published>
    <summary type="html">The JDK compliance on 8.5 extends to only 6 only.  I would therefore first compile with 1.6 and make sure that there are no errors.
Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, February 28, 2013 12:00 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Mark Applebee in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Custom Java Classes with Call Studio

Mark Applebee has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Janine..as you descrbied above, I managed to create a class file using one of the template in the developer forum. Then I copied the class file into appname/deploy/java/application/classe folder and restarted the app as you mentioned. But the file is not appearing in local elements. I am using call studio version 8.5 and JDK is 1.7. Do I need to use JDK 1.6 or is it some other issue?
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/12485582 or simply reply to this email.</summary>
    <dc:creator>Hemal Mehta</dc:creator>
    <dc:date>2013-02-28T18:54:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490507" />
    <author>
      <name>Hemal Mehta</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490507</id>
    <updated>2013-02-28T18:48:19Z</updated>
    <published>2013-02-28T18:48:19Z</published>
    <summary type="html">Sorry , not sure if JDK 1.7 is  supported with CVP Studio 8.5. Confirming that.  Use 1.6 and compile with that.
Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, February 28, 2013 12:00 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Mark Applebee in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Custom Java Classes with Call Studio

Mark Applebee has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Janine..as you descrbied above, I managed to create a class file using one of the template in the developer forum. Then I copied the class file into appname/deploy/java/application/classe folder and restarted the app as you mentioned. But the file is not appearing in local elements. I am using call studio version 8.5 and JDK is 1.7. Do I need to use JDK 1.6 or is it some other issue?
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/12485582 or simply reply to this email.</summary>
    <dc:creator>Hemal Mehta</dc:creator>
    <dc:date>2013-02-28T18:48:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490428" />
    <author>
      <name>Hemal Mehta</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490428</id>
    <updated>2013-02-28T18:46:19Z</updated>
    <published>2013-02-28T18:46:19Z</published>
    <summary type="html">Assuming the class is compiled correctly and there are no errors, I would bundle it into  jar and deploy it under the lib dir.   JDK is not an issue.
Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, February 28, 2013 12:00 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Mark Applebee in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Custom Java Classes with Call Studio

Mark Applebee has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Janine..as you descrbied above, I managed to create a class file using one of the template in the developer forum. Then I copied the class file into appname/deploy/java/application/classe folder and restarted the app as you mentioned. But the file is not appearing in local elements. I am using call studio version 8.5 and JDK is 1.7. Do I need to use JDK 1.6 or is it some other issue?
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/12485582 or simply reply to this email.</summary>
    <dc:creator>Hemal Mehta</dc:creator>
    <dc:date>2013-02-28T18:46:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490359" />
    <author>
      <name>GEOFFREY THOMPSON</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12490359</id>
    <updated>2013-02-28T18:41:19Z</updated>
    <published>2013-02-28T18:41:19Z</published>
    <summary type="html">&gt;&gt;&gt;&gt;Do you have anything showing in your Call Studio Error Log? If the element is failing to load, an error or warning should be displayed there.

In my experience, a much better place to look is in the Tomcat logs.

Regards,
Geoff
.</summary>
    <dc:creator>GEOFFREY THOMPSON</dc:creator>
    <dc:date>2013-02-28T18:41:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12488193" />
    <author>
      <name>Asher Schweigart</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12488193</id>
    <updated>2013-02-28T18:27:03Z</updated>
    <published>2013-02-28T18:27:03Z</published>
    <summary type="html">Do you have anything showing in your Call Studio Error Log? If the element is failing to load, an error or warning should be displayed there.</summary>
    <dc:creator>Asher Schweigart</dc:creator>
    <dc:date>2013-02-28T18:27:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12485582" />
    <author>
      <name>Mark Applebee</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=12485582</id>
    <updated>2013-02-28T18:00:21Z</updated>
    <published>2013-02-28T18:00:21Z</published>
    <summary type="html">Janine..as you descrbied above, I managed to create a class file using one of the template in the developer forum. Then I copied the class file into appname/deploy/java/application/classe folder and restarted the app as you mentioned. But the file is not appearing in local elements. I am using call studio version 8.5 and JDK is 1.7. Do I need to use JDK 1.6 or is it some other issue?</summary>
    <dc:creator>Mark Applebee</dc:creator>
    <dc:date>2013-02-28T18:00:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11971688" />
    <author>
      <name>Mark Applebee</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11971688</id>
    <updated>2013-02-15T14:42:37Z</updated>
    <published>2013-02-15T14:42:37Z</published>
    <summary type="html">Thanks Janine,this is really helpful!</summary>
    <dc:creator>Mark Applebee</dc:creator>
    <dc:date>2013-02-15T14:42:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11942283" />
    <author>
      <name>Janine Graves</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11942283</id>
    <updated>2013-02-14T18:38:49Z</updated>
    <published>2013-02-14T18:38:49Z</published>
    <summary type="html">Personally, I feel it's easier to get started by using Studio/Eclipse because, as you say, it'll provide intellisense and suggest corrections. It usually does auto-compile and then to test your java class, you can simply copy the compiled java .class file into your Studio application and put it under appname/deploy/java/application/classes. If the code creates a new element (or say it smart), then close the Studio application from the workspace and re-open it by double-clicking app.callflow and the new element will appear under Elements/Local Elements.
 
To create the Java project, select New/Project/JavaProject/ Enter a name for your Java project and click 'Next'.
Then in the wizard, click on the Libraries tab and click 'Add External Jars' - you'll need to select  'framework.jar', 'servlet.jar' (was called servlet2.3.jar until cvp 9), and if you're extending existing studio elements you'll need 'elements.jar' - do a Search ahead of time, these files are all in the Studio/eclipse/plugins folder somewhere.
Then copy some of the Cisco examples into your Java project. Eclipse will compile. You can then copy the compiled class files into your Studio application and test them (as described above).
 
 
 
 
 
 
 
[quote=Mark Applebee] I am new to Custom Java and trying to learn it by using the templates in the Cisco site.Whats the best way to write custom java classes.
Is it better to use callstudio or some IDE like Eclipse. I feel like IDEs are more helpful for writing and fixing syntax errors.
For example if I want to use Eclipse as an IDE, do I need to add any audium files to it before start using import commands in the java code?
 
 [/quote]</summary>
    <dc:creator>Janine Graves</dc:creator>
    <dc:date>2013-02-14T18:38:49Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11940886" />
    <author>
      <name>Hemal Mehta</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11940886</id>
    <updated>2013-02-14T18:33:26Z</updated>
    <published>2013-02-14T18:33:26Z</published>
    <summary type="html">Call studio is based off eclipse and has the IDE  built in. So you can same the same studio to write java code.  You can use the java perspective from the studio.  You can write code in separate eclipse too as there are advanced eclipse version with added features and built in plugins.  Since you are just starting, I would just suggest using Studio as it has pretty much everything you need to write your java code.
Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, February 14, 2013 11:59 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Mark Applebee in Customer Voice Portal (CVP) - General Discussion - All Versions: Custom Java Classes with Call Studio

Mark Applebee has created a new message in the forum "General Discussion - All Versions": --------------------------------------------------------------  I am new to Custom Java and trying to learn it by using the templates in the Cisco site.Whats the best way to write custom java classes.
Is it better to use callstudio or some IDE like Eclipse. I feel like IDEs are more helpful for writing and fixing syntax errors.
For example if I want to use Eclipse as an IDE, do I need to add any audium files to it before start using import commands in the java code?


--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/11939383 or simply reply to this email.</summary>
    <dc:creator>Hemal Mehta</dc:creator>
    <dc:date>2013-02-14T18:33:26Z</dc:date>
  </entry>
  <entry>
    <title>Custom Java Classes with Call Studio</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11939383" />
    <author>
      <name>Mark Applebee</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11939383</id>
    <updated>2013-02-14T17:59:08Z</updated>
    <published>2013-02-14T17:59:08Z</published>
    <summary type="html"> I am new to Custom Java and trying to learn it by using the templates in the Cisco site.Whats the best way to write custom java classes.
Is it better to use callstudio or some IDE like Eclipse. I feel like IDEs are more helpful for writing and fixing syntax errors.
For example if I want to use Eclipse as an IDE, do I need to add any audium files to it before start using import commands in the java code?
 
 </summary>
    <dc:creator>Mark Applebee</dc:creator>
    <dc:date>2013-02-14T17:59:08Z</dc:date>
  </entry>
</feed>

