Recent changes to uploading files in Orbeon?

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

Recent changes to uploading files in Orbeon?

Ethan Gruber
Hi all,

I have an uploading mechanism in my application that takes an XML file from a user (1), loads it into an instance (2), runs it through a transformation (3), and then puts it to eXist (4).  The form and xpl had worked flawlessly through a nightly build dating to the end of April.  My form is modified slightly from the xforms-upload example packaged with Orbeon.

However, I grabbed the 3.8 nightly from yesterday and the mechanism by which the file is loaded into its XForms instance is broken.  Step 1 above works, but step 2 fails.  The file is taken from the user, given a temporary name and .tmp extension and placed in the temp folder in Tomcat.  The error occurs when attempting to load that temp file into an instance.  Here's the bit of code that seems to be failing:

<xforms:submission id="background-submission" method="post" replace="none" resource="test:">
                <xforms:send ev:event="xforms-submit-done" submission="get-temp"/>
</xforms:submission>

<xforms:submission id="get-temp" method="get" replace="instance" instance="guide" serialization="none" action="oxf:{instance('files-instance')/file}">
                <!--get the temp file written to disk-->
                <xforms:message ev:event="xforms-submit-error" level="modal">Error.</xforms:message>
</xforms:submission>

I inserted this into the xforms-upload example in the Orbeon nightly I got yesterday and it still fails.  The path in instance('files-instance')/file is correct.  Is oxf:{instance('files-instance')/file} no longer the correct syntax for the action?

Thanks,
Ethan


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Recent changes to uploading files in Orbeon?

Alessandro  Vernet
Administrator
Ethan,

I tried to reproduce this by creating a small example, but I was able
to read a file from the resources using a submission with code very
similar to yours. Could you create a stand-alone XForms file that we
could use to reproduce this?

Alex

On Wed, May 19, 2010 at 12:42 PM, Ethan Gruber <[hidden email]> wrote:

> Hi all,
>
> I have an uploading mechanism in my application that takes an XML file from
> a user (1), loads it into an instance (2), runs it through a transformation
> (3), and then puts it to eXist (4).  The form and xpl had worked flawlessly
> through a nightly build dating to the end of April.  My form is modified
> slightly from the xforms-upload example packaged with Orbeon.
>
> However, I grabbed the 3.8 nightly from yesterday and the mechanism by which
> the file is loaded into its XForms instance is broken.  Step 1 above works,
> but step 2 fails.  The file is taken from the user, given a temporary name
> and .tmp extension and placed in the temp folder in Tomcat.  The error
> occurs when attempting to load that temp file into an instance.  Here's the
> bit of code that seems to be failing:
>
> <xforms:submission id="background-submission" method="post" replace="none"
> resource="test:">
>                 <xforms:send ev:event="xforms-submit-done"
> submission="get-temp"/>
> </xforms:submission>
>
> <xforms:submission id="get-temp" method="get" replace="instance"
> instance="guide" serialization="none"
> action="oxf:{instance('files-instance')/file}">
>                 <!--get the temp file written to disk-->
>                 <xforms:message ev:event="xforms-submit-error"
> level="modal">Error.</xforms:message>
> </xforms:submission>
>
> I inserted this into the xforms-upload example in the Orbeon nightly I got
> yesterday and it still fails.  The path in instance('files-instance')/file
> is correct.  Is oxf:{instance('files-instance')/file} no longer the correct
> syntax for the action?
>
> Thanks,
> Ethan
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Recent changes to uploading files in Orbeon?

Ethan Gruber
Alex,

I found the problem.  One of my submissions had oxf:{instance('files-instance')/file} as the action.  I removed oxf: and it works now.  I'm not sure what changed in the newest Orbeon build that is different from a few weeks/months ago.

Ethan

On Mon, May 24, 2010 at 12:43 PM, Alessandro Vernet <[hidden email]> wrote:
Ethan,

I tried to reproduce this by creating a small example, but I was able
to read a file from the resources using a submission with code very
similar to yours. Could you create a stand-alone XForms file that we
could use to reproduce this?

Alex

On Wed, May 19, 2010 at 12:42 PM, Ethan Gruber <[hidden email]> wrote:
> Hi all,
>
> I have an uploading mechanism in my application that takes an XML file from
> a user (1), loads it into an instance (2), runs it through a transformation
> (3), and then puts it to eXist (4).  The form and xpl had worked flawlessly
> through a nightly build dating to the end of April.  My form is modified
> slightly from the xforms-upload example packaged with Orbeon.
>
> However, I grabbed the 3.8 nightly from yesterday and the mechanism by which
> the file is loaded into its XForms instance is broken.  Step 1 above works,
> but step 2 fails.  The file is taken from the user, given a temporary name
> and .tmp extension and placed in the temp folder in Tomcat.  The error
> occurs when attempting to load that temp file into an instance.  Here's the
> bit of code that seems to be failing:
>
> <xforms:submission id="background-submission" method="post" replace="none"
> resource="test:">
>                 <xforms:send ev:event="xforms-submit-done"
> submission="get-temp"/>
> </xforms:submission>
>
> <xforms:submission id="get-temp" method="get" replace="instance"
> instance="guide" serialization="none"
> action="oxf:{instance('files-instance')/file}">
>                 <!--get the temp file written to disk-->
>                 <xforms:message ev:event="xforms-submit-error"
> level="modal">Error.</xforms:message>
> </xforms:submission>
>
> I inserted this into the xforms-upload example in the Orbeon nightly I got
> yesterday and it still fails.  The path in instance('files-instance')/file
> is correct.  Is oxf:{instance('files-instance')/file} no longer the correct
> syntax for the action?
>
> Thanks,
> Ethan
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>



--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Recent changes to uploading files in Orbeon?

Alessandro  Vernet
Administrator
Ethan,

I am not sure what could have changed, but if you feel that it should
have worked, we would need a test case to investigate this. Of course,
I understand that since this is now working for you, the motivation to
create such a test case went down a notch (or maybe even two!).

Alex

On Mon, May 24, 2010 at 1:27 PM, Ethan Gruber <[hidden email]> wrote:

> Alex,
>
> I found the problem.  One of my submissions had
> oxf:{instance('files-instance')/file} as the action.  I removed oxf: and it
> works now.  I'm not sure what changed in the newest Orbeon build that is
> different from a few weeks/months ago.
>
> Ethan
>
> On Mon, May 24, 2010 at 12:43 PM, Alessandro Vernet <[hidden email]>
> wrote:
>>
>> Ethan,
>>
>> I tried to reproduce this by creating a small example, but I was able
>> to read a file from the resources using a submission with code very
>> similar to yours. Could you create a stand-alone XForms file that we
>> could use to reproduce this?
>>
>> Alex
>>
>> On Wed, May 19, 2010 at 12:42 PM, Ethan Gruber <[hidden email]> wrote:
>> > Hi all,
>> >
>> > I have an uploading mechanism in my application that takes an XML file
>> > from
>> > a user (1), loads it into an instance (2), runs it through a
>> > transformation
>> > (3), and then puts it to eXist (4).  The form and xpl had worked
>> > flawlessly
>> > through a nightly build dating to the end of April.  My form is modified
>> > slightly from the xforms-upload example packaged with Orbeon.
>> >
>> > However, I grabbed the 3.8 nightly from yesterday and the mechanism by
>> > which
>> > the file is loaded into its XForms instance is broken.  Step 1 above
>> > works,
>> > but step 2 fails.  The file is taken from the user, given a temporary
>> > name
>> > and .tmp extension and placed in the temp folder in Tomcat.  The error
>> > occurs when attempting to load that temp file into an instance.  Here's
>> > the
>> > bit of code that seems to be failing:
>> >
>> > <xforms:submission id="background-submission" method="post"
>> > replace="none"
>> > resource="test:">
>> >                 <xforms:send ev:event="xforms-submit-done"
>> > submission="get-temp"/>
>> > </xforms:submission>
>> >
>> > <xforms:submission id="get-temp" method="get" replace="instance"
>> > instance="guide" serialization="none"
>> > action="oxf:{instance('files-instance')/file}">
>> >                 <!--get the temp file written to disk-->
>> >                 <xforms:message ev:event="xforms-submit-error"
>> > level="modal">Error.</xforms:message>
>> > </xforms:submission>
>> >
>> > I inserted this into the xforms-upload example in the Orbeon nightly I
>> > got
>> > yesterday and it still fails.  The path in
>> > instance('files-instance')/file
>> > is correct.  Is oxf:{instance('files-instance')/file} no longer the
>> > correct
>> > syntax for the action?
>> >
>> > Thanks,
>> > Ethan
>> >
>> >
>> > --
>> > 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
>> > OW2 mailing lists service home page: http://www.ow2.org/wws
>> >
>> >
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>>
>> --
>> 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
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet