HTTP Conditional GET support

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

HTTP Conditional GET support

Stian Sigvartsen
HTTP Conditional GET support

Hi

Is anyone aware if HTTP conditional GET support is implemented in Orbeon forms?
I found this past thread from 2007 discussing just this, but can find nothing newer so maybe this was never implemented.

http://orbeon-forms-ops-users.24843.n4.nabble.com/responding-to-xforms-submission-with-HTTP-304-td33340.html

If it is not supported, I will explore the <header/> element to see if I can add a "if-modified-since" header to the HTTP request.

In terms of the HTTP response, is it possible to retrieve the status code? i.e. I would like some actions carried out if a 304 was returned and other actions to be carried out if a 200 is returned. The xForms events "xforms-submit-error" and "xforms-submit-done" don't appear to the level of detail required for this, or is a 304 response going to notify "xforms-submit-done" and the cached XML is put into the instance specified by submission element?

Any thoughts would be appreciated. Thanks in advance.

-Stian




--
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: HTTP Conditional GET support

Erik Bruchez
Administrator
Stian,

Some support is available in oxf:url-generator:

http://wiki.orbeon.com/forms/doc/developer-guide/processors-url-generator#TOC-Conditional-GET

Where do you need conditional GET support? From xforms:submission?

You can get access to the status code with:

event('response-status-code')

upon xforms-submit-done and xforms-submit-error.

-Erik

On Wed, May 9, 2012 at 2:27 AM, Stian Sigvartsen
<[hidden email]> wrote:

> Hi
>
> Is anyone aware if HTTP conditional GET support is implemented in Orbeon
> forms?
> I found this past thread from 2007 discussing just this, but can find
> nothing newer so maybe this was never implemented.
>
> http://orbeon-forms-ops-users.24843.n4.nabble.com/responding-to-xforms-submission-with-HTTP-304-td33340.html
>
> If it is not supported, I will explore the <header/> element to see if I can
> add a "if-modified-since" header to the HTTP request.
>
> In terms of the HTTP response, is it possible to retrieve the status code?
> i.e. I would like some actions carried out if a 304 was returned and other
> actions to be carried out if a 200 is returned. The xForms events
> "xforms-submit-error" and "xforms-submit-done" don't appear to the level of
> detail required for this, or is a 304 response going to notify
> "xforms-submit-done" and the cached XML is put into the instance specified
> by submission element?
>
> Any thoughts would be appreciated. Thanks in advance.
>
> -Stian
>
>
>
>
> --
> 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: HTTP Conditional GET support

Stian Sigvartsen
In reply to this post by Stian Sigvartsen
Hi Erik

Linked page looks very informative. Many thanks. I haven't spent time
learning how to call Orbeon processors from XForms, but that will now be
next on my to-do list! I need conditional GET support for
xforms:submission.

In a nut shell, I am looking at a design where such xforms:submissions
are used to frequently retrieve potentially large XML documents into a
secondary instance which binds back to the default instance. I'm
concerned that this might make the form unresponsive because of the
large amount of instance replacement and re-calculation work the XForms
processor would need to do. So I am trying to minimise the amount of
work by hopefully using conditional get.

-Stian


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik
Bruchez
Sent: 10 May 2012 04:55
To: [hidden email]
Subject: [ops-users] Re: HTTP Conditional GET support


Stian,

Some support is available in oxf:url-generator:

http://wiki.orbeon.com/forms/doc/developer-guide/processors-url-generato
r#TOC-Conditional-GET

Where do you need conditional GET support? From xforms:submission?

You can get access to the status code with:

event('response-status-code')

upon xforms-submit-done and xforms-submit-error.

-Erik


--
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: HTTP Conditional GET support

Erik Bruchez
Administrator
Stian,

Another possibility is to used cached/readonly instances:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-performance-settings

Here, cache invalidation is manual (with an action), instead of
conditional. But conditional GET could be added on top of that.

-Erik

On Thu, May 10, 2012 at 1:41 AM, Stian Sigvartsen
<[hidden email]> wrote:

> Hi Erik
>
> Linked page looks very informative. Many thanks. I haven't spent time
> learning how to call Orbeon processors from XForms, but that will now be
> next on my to-do list! I need conditional GET support for
> xforms:submission.
>
> In a nut shell, I am looking at a design where such xforms:submissions
> are used to frequently retrieve potentially large XML documents into a
> secondary instance which binds back to the default instance. I'm
> concerned that this might make the form unresponsive because of the
> large amount of instance replacement and re-calculation work the XForms
> processor would need to do. So I am trying to minimise the amount of
> work by hopefully using conditional get.
>
> -Stian
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik
> Bruchez
> Sent: 10 May 2012 04:55
> To: [hidden email]
> Subject: [ops-users] Re: HTTP Conditional GET support
>
>
> Stian,
>
> Some support is available in oxf:url-generator:
>
> http://wiki.orbeon.com/forms/doc/developer-guide/processors-url-generato
> r#TOC-Conditional-GET
>
> Where do you need conditional GET support? From xforms:submission?
>
> You can get access to the status code with:
>
> event('response-status-code')
>
> upon xforms-submit-done and xforms-submit-error.
>
> -Erik
>
>
> --
> 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