cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiberiu Dondera" <tibidond...@hotmail.com>
Subject VoiceXML - saving audio files
Date Tue, 10 Apr 2001 14:58:51 GMT
I'm trying to create a VoiceXML/Cocoon site. And I'm stuck on saving user
audio input on the server...
I open a file and then I write the input parameter to the file (as you will
see in the code). However, even if the Cocoon process has ended (Cocoon
returns the answer), the file is still open (i'm under windows 2000, and I
can't erase the file - which has a 0 size - until I stop Tomcat).
Any idea why this happens?

The code:

VoiceXML:
        <record name="recording">
            <prompt>
             Say something.
            </prompt>
        </record>
        <filled>
          <submit next="test.xml" method="post"
enctype="multipart/form-data" namelist="recording"/>
        </filled>
       </record>

(input stops when user presses a key on the phone keypad). Then Cocoon takes
over - the post of the data is well done.

Cocoon file:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
  <xsp:logic>
    FileOutputStream fis=new FileOutputStream("input.au");
    fis.write((request.getParameter("recording")).getBytes());
    fis.close();
  </xsp:logic>
</page>
</xsp:page>

I'm using IBM's Voice Server Kit...

Thanks for any help.

Tibi DONDERA


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message