Different behavior in Orbeon while sending data to HTTP service using GET and POST

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

Different behavior in Orbeon while sending data to HTTP service using GET and POST

rovsh
Hello,

Recently we noticed different behavior in how Orbeon sends to HTTP service after successfully saving the form. We configured 'save-draft' and 'send' buttons as follows:

<property as="xs:anyURI" name="oxf.fr.detail.send.success.uri.*.*" value="/orbeonSuccess"/>
<property as="xs:anyURI" name="oxf.fr.detail.save-draft.success.uri.*.*" value="/orbeonSuccess?isDraft=1"/>

<property as="xs:string"  name="oxf.fr.detail.send.success.method.*.*" value="post" />
<property as="xs:string"  name="oxf.fr.detail.save-draft.success.method.*.*" value="get"/>

Difference between using 'POST' and 'GET' is that in case of 'GET' after save, Orbeon redirects correctly to specified relative URL. However, in case of 'POST' it could not handle relative URL and redirected incorrectly.
Is this a bug? Or Orbeon cannot handle POST to relative URLs in send action?

Thank you in advance.

- rovsh
Reply | Threaded
Open this post in threaded view
|

Re: Different behavior in Orbeon while sending data to HTTP service using GET and POST

Alessandro  Vernet
Administrator
Hi Rovsh,

Which version of Orbeon Forms are you using? If you're on 4.4 (or newer), I'd recommend you define your own process, in which you use the send action. See:

https://github.com/orbeon/orbeon-forms/wiki/Form-Runner:-Buttons-and-Processes#h5o-26

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Different behavior in Orbeon while sending data to HTTP service using GET and POST

rovsh
This post was updated on .
Hi Alex,

We are using Orbeon ver 4.2. Indeed, we defined our own process for the send, and save-draft buttons as follows:

<property as="xs:string"  name="oxf.fr.detail.process.send.*.*" value='require-uploads then require-valid then save then success-message("save-success") then send("oxf.fr.detail.send.success") recover send("oxf.fr.detail.send.error")'/>

<property as="xs:string"  name="oxf.fr.detail.process.save-draft.*.*" value='save then success-message("save-draft-success") then send("oxf.fr.detail.save-draft.success") recover send("oxf.fr.detail.send.error")'/>

However, there is a difference between how Orbeon redirects on 'GET' and 'POST'.

Thanks,
Rovsh
Reply | Threaded
Open this post in threaded view
|

Re: Different behavior in Orbeon while sending data to HTTP service using GET and POST

rovsh
Hi Alex,

We are using Orbeon 4.2 with powerful buttons.
I took a look on the link you sent. Indeed, we defined our own process for the send, and save-draft buttons as follows:

<property as="xs:string"  name="oxf.fr.detail.process.send.*.*" value='require-uploads then require-valid then save then success-message("save-success") then send("oxf.fr.detail.send.success") recover send("oxf.fr.detail.send.error")'/>

<property as="xs:string"  name="oxf.fr.detail.process.save-draft.*.*" value='save then success-message("save-draft-success") then send("oxf.fr.detail.save-draft.success") recover send("oxf.fr.detail.send.error")'/>

However, there is a difference between how Orbeon redirects on 'GET' and 'POST'.

Thanks,
Rovsh
Reply | Threaded
Open this post in threaded view
|

Re: Different behavior in Orbeon while sending data to HTTP service using GET and POST

Alessandro  Vernet
Administrator
Hi Rovsh,

And do you think it is a bug? Would be able to check if it is still the case with 4.4? If it is, would you have step that we can follow to reproduce this?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet