CVP Java Class return - URGENT!

Unanswered Question
Jul 26th, 2008

I write a java class, and I trying to figure out how to refernce the return of that class in my FromEXTVXML array. so I can test that the java is working. the element is Action_01 I figures its like Action_01.?? something.. Also

QuerySOAP.GetInformationByAccountNumber("test","20"); is what I used within my action element. does this look correct?

Also does anyone have any of this sample java code from.

its not on their anymore, the programming guide doesnt havea single example of extending ActionElementBase, I just need an example!


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Chad Stachowicz Sun, 07/27/2008 - 01:36

After finding some dev code, and piecing together bits and pieces from vaious guides, I indeed have some java doing what I want! However I am unsure how to suck info in from VXML into my java. I see a getElementData, however where can I set the Element data before? Somewhere in Call Studio?

Chad Sun, 07/27/2008 - 08:10

You can write the result into a Session variable in your action element.

String sessionVar = "MySessionVariable";

String stringValue = "the_value";



actionData.setSessionData(sessionVar, new String(stringValue));


"Set Session." + sessionVar +

" to " + stringValue);


catch (com.audium.server.AudiumException ex)



"EXCEPTION _ cannot set Session." +

sessionVar + " to " + stringValue);


You can supply data to your Action Element in one of two ways:

1. Through the Settings array. This is the most common way of supplying fixed or interpreted data (through Substitution), like the IP address of your AXL host, user name, password etc.

2. By fetching a Session variable that you have already set, perhaps in a previous Action Element or (if a String), with a simple Session data on a previous Audium element. This is an object.

public void doAction(String arg0,

ActionElementData actionData) throws AudiumException


Object obj = null;

obj = actionData.getSessionData("RecentTransList");

Now it's up to you to know EXACTLY what Java type this is, and you then cast it. In my case, this was a list.


// Now cast the object to the right type


ArrayList recentTransList = (ArrayList) obj;

You should have on your hard drive the Java doc for all the Audium classes. It's going to be easy to work from the reference material then.



Chad Stachowicz Sun, 07/27/2008 - 08:26

Thanks got everything working I think. Here is another questions. There is only 4 FromEXTVXML's what if I need to return 10 fields into ICM, is there a procedure or better way to do this?


Chad Stachowicz Sun, 07/27/2008 - 09:03


I am having a bit of confusion about 2 things. First I can't find this settings array in Call Studio, I think my issue is where to set something on Call Studio. Next how would I persay pull in the ANI from CallData.ANI ? I think this would answer things once and for all. :)


Chad Stachowicz Sun, 07/27/2008 - 11:04


Got it working by passing ToEXTVXML[1] = "name=value" that I saw from a previous post of yours. Then I used getSessionData, everything it working great now. All I have to do is build out all my classes to fit this model, and do a bit of editing now! Cheers thanks for all the guidance!

Chad Sun, 07/27/2008 - 12:14

Not sure if you are still interested in an answer to this.

Returning data to ICM.

Since ICM has a very nice function for breaking strings at fixed positions, one way that I find convenient is to pass quite a bit of data in a structured string, with fixed field widths. Pass it up in (say) FromExtVXML[0] and break it apart in the Script Editor and stuff the values into ECCs for later reference.



Chad Stachowicz Sun, 07/27/2008 - 12:56


By breaking strings at fixed positions, does this mean by spaces, or like in PERL when I use the function split. Which function is it?

Chad Mon, 07/28/2008 - 06:44


Neither. The ICM Script substring function uses fixed positions.

substring(pos, length).

So if your string is "FOOBAGIZMO"

a = substring(1,3) = "FOO"

b = substring(4,2) = "BA"

A little different to the way most substring functions work, which normally go substring(pos1, pos2) - but workable.




This Discussion