This application uses the <object> element with the VRBE extensions to call a telephony application written in Java.
<?xml version="1.0" encoding="UTF-8"?> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <form id="Javaapp"> <object name="vrbe1" classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeJavaApplication" type="javacode-ext"> <param name="setApplicationToInvoke" value="app2" /> <param name="setApplicationData" expr="new java.util.Vector()" /> <param name="setWaitForReturn" expr="true" /> <filled> <log> Data returned from application is: <value expr="vrbe1.applicationData" /> Completion code is: <value expr="vrbe1.completionCode" /> Completion text is: <value expr="vrbe1.completionCodeText" /> </log> </filled> </object> <block> <log>The output from the object is <value expr="vrbe1.applicationData"/></log> <if cond="(vrbe1.applicationData == 'Whatever')"> <log>Application data received from Java class so invocation passed</log> <else/> <log>Application data not received, so invocation failed</log> </if> </block> </form> </vxml>
This application uses the <object> element with the VRBE extensions to call a state table application.
<?xml version="1.0" encoding="UTF-8"?> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <var name="parmArray" expr="new Array('TestDB', customer_id, '')"/><form id="state_table"> <object name="vrbe1" classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeStateTable" codetype="javacode-ext"> <param name="setName" value="Welcome" /> <param name="setEntryPoint" value="begin" /> <param name="setParms" expr="parmArray" /> <filled> <prompt> completion code text is <value expr="vrbe1.completionCodeText" /> completion code is <value expr="vrbe1.completionCode" /> return code is <value expr="vrbe1.returnCode" /> number of parms is <value expr="vrbe1.parms.length" /> parm 1 is <value expr="vrbe1.parms[0]" /> parm 2 is <value expr="vrbe1.parms[1]" /> </prompt> </filled> </object> <block> <log>The output from the object is <value expr="vrbe1.applicationData"/></log> <if cond="(vrbe1.applicationData == 'Whatever')"> <log>Application data received from Java class so invocation passed</log> <else/> <log>Application data not received, so invocation failed</log> </if> </block> </form> </vxml>