We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Subdialog parameters

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
adriannaude
Posts: 34
Joined: Mon Nov 07, 2005 11:27 am
Location: United Kingdom

Subdialog parameters

Post by adriannaude »

I am invoking a Java servlet using the <subdialog> tag but the parameters I specify don't appear in the program.

I have tried two forms;
<subdialog fetchhint="safe" method="post" name="doSaveRecording" namelist="varRecord_Value varRecord_Name Message_recipient_id" src="**servlet**storeRecording" />

and

<subdialog fetchhint="safe" method="post" name="doSaveRecording1" src="**servlet**storeRecording" >
<param name="Message_recipient_id" expr="Message_recipient_id"/>
<param name="varRecord_Name" expr="varRecord_Name"/>
<param name="varRecord_Value" expr="varRecord_Value"/>
</subdialog>

(The **servlet** bit gets resolved at run-time)

The servlet definitely gets invoked but the parameter values are all null, almost as if they aren't getting passed across.

All three parameter variables contain data. I have proved this using prompt tags just prior to the <subdialog> element.

Any clues as to what I am doing wrong?

Adrian

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR issue- uploading audio file in post of subdialog script

Post by support »

Hello,

The first of your two attempts is the approach you should be taking. The second uses the <param> tag which is used to populate static subdialog ECMAScript variables. The IVR problem I think you are experiencing is that you are trying to upload an audio file in the post to your subdialog script. This is not a problem but you need to specify the enctype attribute for the <subdialog> tag as "multipart/form-data":

Code: Select all

<subdialog fetchhint="safe" method="post" name="doSaveRecording" namelist="varRecord_Value varRecord_Name Message_recipient_id" enctype="multipart/form-data" src="**servlet**storeRecording" />
This tells the VXML browser to perform the POST as a file upload much like you need to do with a standard web application. Hope this helps!

Regards,
Plum Support
Last edited by support on Fri Jan 15, 2010 11:38 am, edited 3 times in total.

adriannaude
Posts: 34
Joined: Mon Nov 07, 2005 11:27 am
Location: United Kingdom

Post by adriannaude »

Thanks for the reply.

I checked this out and found that the Plum platform is setting the encoding type to "multipart/form-data" whenever I include a variable that contains a recording. This overrides the parameter enctype. My issue therefore lies in my Java code because processing mutipart forms is more complex than urlencoded. :(

Thanks anyway.

Post Reply