Invalid encoding name: multipart/form-data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid encoding name: multipart/form-data

Mathias Picker
Hi all,

I'm trying to download a binary file (excel), and run into problems.
I get the error msg "Invalid encoding name: multipart/form-data" from oxf:/ops/xforms/xforms-server-submit.xpl.

My form is build after the handbook example from-xls converter.

Can anyone comment on what's going on here?

Thanks, Mathias

The form:

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:ui="http:/www.strongdesk.com/ws/ui"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes">
  <xhtml:head>
    <xhtml:title>Registration</xhtml:title>

    <xforms:model>
   
    <!-- start: xforms binary file upload instance & submission -->
        <xforms:instance id="upload">  
        <form>  
        <action/>  
        <files>  
        <file filename="" mediatype="" size="" xsi:type="xs:anyURI"/>  
        </files>  
        </form>
        </xforms:instance>  
       
        <xforms:submission method="post" encoding="multipart/form-data" id="default"/>
    <!-- end: xforms binary file upload instance & submission -->

  <xforms:instance id="from-excel">  
  <!-- This is where the XML document produced from excel is included -->  
  <xi:include href="input:data"/>  
  </xforms:instance>
 
  <!-- start: bind from-excel instance to formatted output -->
        <xforms:instance id="formatted">
                <formated-instance/>
        </xforms:instance>      
                     
        <xforms:bind nodeset="instance('formatted')"
        calculate="saxon:serialize(xxforms:call-xpl('oxf:/config/theme/format.xpl', 'data', instance('from-excel'), 'data')/*, 'html')"/>
        <!-- end: bind from-excel instance to formatted output -->


    </xforms:model>
  </xhtml:head>

  <xhtml:body>
 
  <h1>Convert Oracle A-Z Excel-Sheet to somewhat more usefull XML</h1>
 
  <h2>Upload File Here</h2>
        <xforms:group ref="/form" xmlns:xforms="http://www.w3.org/2002/xforms">  
                <p><xforms:upload ref="files/file[1]"/>  
                <xforms:submit submission="default">  
                <xforms:label>Convert</xforms:label>  
                <xforms:setvalue ref="action">import</xforms:setvalue>  
                </xforms:submit></p>  
        </xforms:group>
       
        <h2>See Result Here</h2>
        <div>
                <xforms:output ref="instance('formatted')" mediatype="text/html"/>
        </div>
  </xhtml:body>
</xhtml:html>


--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
      Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
   



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Invalid encoding name: multipart/form-data

Mathias Picker
Hmmm,

somewhere multipart/form-data is interpreted as character encoding???


org.orbeon.saxon.charcode.CharacterSetFactory   makeCharacterSet   CharacterSetFactory.java   111
org.orbeon.saxon.charcode.CharacterSetFactory getCharacterSet CharacterSetFactory.java 37
org.orbeon.saxon.event.Emitter setOutputProperties Emitter.java 96
org.orbeon.saxon.event.SerializerFactory getReceiver SerializerFactory.java 133
org.orbeon.saxon.IdentityTransformer transform IdentityTransformer.java 24
org.orbeon.oxf.xml.TransformerWrapper transform TransformerUtils.java 402
org.orbeon.oxf.xforms.XFormsModelSubmission performDefaultAction XFormsModelSubmission.java 370
org.orbeon.oxf.xforms.XFormsContainingDocument dispatchEvent XFormsContainingDocument.java 674
org.orbeon.oxf.xforms.XFormsContainingDocument interpretEvent XFormsContainingDocument.java 478
org.orbeon.oxf.xforms.XFormsContainingDocument executeExternalEvent XFormsContainingDocument.java 398
Toggle
--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
      Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
   



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Invalid encoding name: multipart/form-data

Alessandro  Vernet
Administrator
In reply to this post by Mathias Picker
Hi Mathias,

Add a replace="all" on your <xforms:submission> element. This will
solve the problem. And you don't need the
encoding="multipart/form-data"; the XForms engine will pick the
appropriate encoding to do the file upload for you.

Alex

On 6/2/06, Mathias Picker <[hidden email]> wrote:

> Hi all,
>
> I'm trying to download a binary file (excel), and run into problems.
> I get the error msg "Invalid encoding name: multipart/form-data" from oxf:/ops/xforms/xforms-server-submit.xpl.
>
> My form is build after the handbook example from-xls converter.
>
> Can anyone comment on what's going on here?
>
> Thanks, Mathias
>
> The form:
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:f="http://orbeon.org/oxf/xml/formatting"
> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:ui="http:/www.strongdesk.com/ws/ui"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes">
>   <xhtml:head>
>     <xhtml:title>Registration</xhtml:title>
>
>     <xforms:model>
>
>         <!-- start: xforms binary file upload instance & submission -->
>         <xforms:instance id="upload">
>                 <form>
>                         <action/>
>                         <files>
>                                 <file filename="" mediatype="" size="" xsi:type="xs:anyURI"/>
>                         </files>
>                 </form>
>         </xforms:instance>
>
>         <xforms:submission method="post" encoding="multipart/form-data" id="default"/>
>         <!-- end: xforms binary file upload instance & submission -->
>
>         <xforms:instance id="from-excel">
>         <!-- This is where the XML document produced from excel is included -->
>                 <xi:include href="input:data"/>
>         </xforms:instance>
>
>         <!-- start: bind from-excel instance to formatted output -->
>         <xforms:instance id="formatted">
>                 <formated-instance/>
>         </xforms:instance>
>
>         <xforms:bind nodeset="instance('formatted')"
>         calculate="saxon:serialize(xxforms:call-xpl('oxf:/config/theme/format.xpl', 'data', instance('from-excel'), 'data')/*, 'html')"/>
>         <!-- end: bind from-excel instance to formatted output -->
>
>
>         </xforms:model>
>         </xhtml:head>
>
>         <xhtml:body>
>
>         <h1>Convert Oracle A-Z Excel-Sheet to somewhat more usefull XML</h1>
>
>         <h2>Upload File Here</h2>
>         <xforms:group ref="/form" xmlns:xforms="http://www.w3.org/2002/xforms">
>                 <p><xforms:upload ref="files/file[1]"/>
>                 <xforms:submit submission="default">
>                 <xforms:label>Convert</xforms:label>
>                 <xforms:setvalue ref="action">import</xforms:setvalue>
>                 </xforms:submit></p>
>         </xforms:group>
>
>         <h2>See Result Here</h2>
>         <div>
>                 <xforms:output ref="instance('formatted')" mediatype="text/html"/>
>         </div>
>   </xhtml:body>
> </xhtml:html>
>
>
> --
>
>
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
>       Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Invalid encoding name: multipart/form-data

Mathias Picker

> -------- Original-Nachricht --------
> Datum: Fri, 2 Jun 2006 18:05:41 -0700
> Von: Alessandro Vernet <[hidden email]>
> An: [hidden email]
> Betreff: Re: [ops-users] Invalid encoding name: multipart/form-data
>
> Hi Mathias,
>
> Add a replace="all" on your <xforms:submission> element. This will
> solve the problem. And you don't need the
> encoding="multipart/form-data"; the XForms engine will pick the
> appropriate encoding to do the file upload for you.
Thanks! Maybe put this into the handbook? e.g. in this example: http://localhost:8180/ops/doc/processors-converters#d12e770

BTW: I downloaded the newest nightly build yesterday, and it is really nice!
Noticably (!) faster (freebsd, jdk1.5, tomcat5.5, all unchanged) & I like
the hints of work on the handbook (3.1 changes)

Thanks for the great product & fast answers!

Mathias

>
> Alex
>
> On 6/2/06, Mathias Picker <[hidden email]> wrote:
> > Hi all,
> >
> > I'm trying to download a binary file (excel), and run into problems.
> > I get the error msg "Invalid encoding name: multipart/form-data" from
> oxf:/ops/xforms/xforms-server-submit.xpl.
> >
> > My form is build after the handbook example from-xls converter.
> >
> > Can anyone comment on what's going on here?
> >
> > Thanks, Mathias
> >
> > The form:
> >
> > <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
> > xmlns:f="http://orbeon.org/oxf/xml/formatting"
> > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
> > xmlns:xhtml="http://www.w3.org/1999/xhtml"
> > xmlns:ev="http://www.w3.org/2001/xml-events"
> > xmlns:ui="http:/www.strongdesk.com/ws/ui"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xi="http://www.w3.org/2001/XInclude"
> > xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes">
> >   <xhtml:head>
> >     <xhtml:title>Registration</xhtml:title>
> >
> >     <xforms:model>
> >
> >         <!-- start: xforms binary file upload instance & submission -->
> >         <xforms:instance id="upload">
> >                 <form>
> >                         <action/>
> >                         <files>
> >                                 <file filename="" mediatype="" size=""
> xsi:type="xs:anyURI"/>
> >                         </files>
> >                 </form>
> >         </xforms:instance>
> >
> >         <xforms:submission method="post" encoding="multipart/form-data"
> id="default"/>
> >         <!-- end: xforms binary file upload instance & submission -->
> >
> >         <xforms:instance id="from-excel">
> >         <!-- This is where the XML document produced from excel is
> included -->
> >                 <xi:include href="input:data"/>
> >         </xforms:instance>
> >
> >         <!-- start: bind from-excel instance to formatted output -->
> >         <xforms:instance id="formatted">
> >                 <formated-instance/>
> >         </xforms:instance>
> >
> >         <xforms:bind nodeset="instance('formatted')"
> >        
> calculate="saxon:serialize(xxforms:call-xpl('oxf:/config/theme/format.xpl', 'data', instance('from-excel'), 'data')/*, 'html')"/>
> >         <!-- end: bind from-excel instance to formatted output -->
> >
> >>         </xforms:model>
> >         </xhtml:head>
> >
> >         <xhtml:body>
> >
> >         <h1>Convert Oracle A-Z Excel-Sheet to somewhat more usefull
> XML</h1>
> >
> >         <h2>Upload File Here</h2>
> >         <xforms:group ref="/form"
> xmlns:xforms="http://www.w3.org/2002/xforms">
> >                 <p><xforms:upload ref="files/file[1]"/>
> >                 <xforms:submit submission="default">
> >                 <xforms:label>Convert</xforms:label>
> >                 <xforms:setvalue ref="action">import</xforms:setvalue>
> >                 </xforms:submit></p>
> >         </xforms:group>
> >
> >         <h2>See Result Here</h2>
> >         <div>
> >                 <xforms:output ref="instance('formatted')"
> mediatype="text/html"/>
> >         </div>
> >   </xhtml:body>
> > </xhtml:html>
> >
> >> --
> >
> >> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> >       Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
> >>>>> --
> > You receive this message as a subscriber of the [hidden email]
> mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >>--
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
      Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
   



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws