xml submissions

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

xml submissions

Mats Eklund-2
Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats



--
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: xml submissions

Steve Bayliss
Message
Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats



--
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: xml submissions

Mats Eklund-2
Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Message
Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats




--
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: xml submissions

Steve Bayliss
Message
Hi Mats
 
Another option is to send your data using URL parameters - then in page-flow.xml you can extract the data - see http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction
 
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.
 
Steve
 
 -----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 14 September 2009 09:43
To: [hidden email]
Subject: [ops-users] Re: RE: xml submissions

Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats




--
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: RE: xml submissions

Mats Eklund-2
Hi Steve,

I was thinking of those solutions, however:

1) the XML data I am submitting can become farily large, and I don't think my XML structure would be easily represented broken down as name value pairs, so this is not an ideal option.

2) yes, however, the point is for me to be able to have the page request and submission be handled by the PFC directly, i.e. before any page models or request generator is executed, so also not an ideal option...

Further ideas? :)

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:58:09 AM
Subject: [ops-users] RE: Re: RE: xml submissions

Message
Hi Mats
 
Another option is to send your data using URL parameters - then in page-flow.xml you can extract the data - see http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction
 
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.
 
Steve
 
 -----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 14 September 2009 09:43
To: [hidden email]
Subject: [ops-users] Re: RE: xml submissions

Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats





--
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: Re: RE: xml submissions

Erik Bruchez
Administrator
Using an XForms submission, this should be possible. You can do this from an XForms page, or from XPL using the oxf:xforms-submission processor. Specify the "application/x-www-form-urlencoded" or "multipart/form-data" serialization attribute on xforms:submission.

-Erik

On Mon, Sep 14, 2009 at 2:58 AM, Mats Eklund <[hidden email]> wrote:
Hi Steve,

I was thinking of those solutions, however:

1) the XML data I am submitting can become farily large, and I don't think my XML structure would be easily represented broken down as name value pairs, so this is not an ideal option.

2) yes, however, the point is for me to be able to have the page request and submission be handled by the PFC directly, i.e. before any page models or request generator is executed, so also not an ideal option...

Further ideas? :)

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:58:09 AM
Subject: [ops-users] RE: Re: RE: xml submissions

Hi Mats
 
Another option is to send your data using URL parameters - then in page-flow.xml you can extract the data - see http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction
 
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.
 
Steve
 
 -----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 14 September 2009 09:43
To: [hidden email]
Subject: [ops-users] Re: RE: xml submissions

Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats





--
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: RE: Re: RE: xml submissions

Steve Bayliss
Message
I think Mats is trying to submit data from an external (outside of Orbeon) HTML page to an OrbeonForms URL, and have OrbeonForms be able to pick up and use the data.
 
 -----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 17 September 2009 23:48
To: [hidden email]
Subject: [ops-users] Re: Re: RE: Re: RE: xml submissions

Using an XForms submission, this should be possible. You can do this from an XForms page, or from XPL using the oxf:xforms-submission processor. Specify the "application/x-www-form-urlencoded" or "multipart/form-data" serialization attribute on xforms:submission.

-Erik

On Mon, Sep 14, 2009 at 2:58 AM, Mats Eklund <[hidden email]> wrote:
Hi Steve,

I was thinking of those solutions, however:

1) the XML data I am submitting can become farily large, and I don't think my XML structure would be easily represented broken down as name value pairs, so this is not an ideal option.

2) yes, however, the point is for me to be able to have the page request and submission be handled by the PFC directly, i.e. before any page models or request generator is executed, so also not an ideal option...

Further ideas? :)

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:58:09 AM
Subject: [ops-users] RE: Re: RE: xml submissions

Hi Mats
 
Another option is to send your data using URL parameters - then in page-flow.xml you can extract the data - see http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction
 
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.
 
Steve
 
 -----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 14 September 2009 09:43
To: [hidden email]
Subject: [ops-users] Re: RE: xml submissions

Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <[hidden email]>
To: [hidden email]
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:[hidden email]]
Sent: 12 September 2009 21:33
To: [hidden email]
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats





--
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: Re: RE: Re: RE: xml submissions

Mats Eklund-2
In reply to this post by Mats Eklund-2
That's right Steve. My question arises because I am using an external client-side/javascript xforms engine to overcome some of the limitations I discovered in Orbeon's xforms implementation. So I am still looking for an answer to my question... (maybe I will have to try to figure out what is going on in the Orbeon javascript; it's clear that a hidden plain html form is used to submit the xml, but it's not clear to me how it is encoded).

Mats

--- On Fri, 9/18/09, Steve Bayliss <[hidden email]> wrote:

From: Steve Bayliss <[hidden email]>
Subject: [ops-users] RE: Re: Re: RE: Re: RE: xml submissions
To: [hidden email]
Date: Friday, September 18, 2009, 9:40 AM

Message
I think Mats is trying to submit data from an external (outside of Orbeon) HTML page to an OrbeonForms URL, and have OrbeonForms be able to pick up and use the data.
 
 -----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 17 September 2009 23:48
To: [hidden email]
Subject: [ops-users] Re: Re: RE: Re: RE: xml submissions

Using an XForms submission, this should be possible. You can do this from an XForms page, or from XPL using the oxf:xforms-submission processor. Specify the "application/x-www-form-urlencoded" or "multipart/form-data" serialization attribute on xforms:submission.

-Erik

On Mon, Sep 14, 2009 at 2:58 AM, Mats Eklund <mats.eklund@...> wrote:
Hi Steve,

I was thinking of those solutions, however:

1) the XML data I am submitting can become farily large, and I don't think my XML structure would be easily represented broken down as name value pairs, so this is not an ideal option.

2) yes, however, the point is for me to be able to have the page request and submission be handled by the PFC directly, i.e. before any page models or request generator is executed, so also not an ideal option...

Further ideas? :)

Mats


From: Steve Bayliss <stephen.bayliss@...>
To: ops-users@...
Sent: Monday, September 14, 2009 10:58:09 AM
Subject: [ops-users] RE: Re: RE: xml submissions

Hi Mats
 
Another option is to send your data using URL parameters - then in page-flow.xml you can extract the data - see http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction
 
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.
 
Steve
 
 -----Original Message-----
From: Mats Eklund [mailto:mats.eklund@...]
Sent: 14 September 2009 09:43
To: ops-users@...
Subject: [ops-users] Re: RE: xml submissions

Hi Steve,

Thanks for your message. I don't fully understand how this helps me.

I'd like the client/browser to be able to make an xml submission to a page declared in the PFC using a normal HTML form, not XMLHttpReqeust/Ajax, since the latter method doesn't interoperate nicely with the browser's history and back-button. Any ideas?

Mats


From: Steve Bayliss <stephen.bayliss@...>
To: ops-users@...
Sent: Monday, September 14, 2009 10:32:58 AM
Subject: [ops-users] RE: xml submissions

Hi Matts
 
 
You can just POST the data to the OrbeonForms URL - no need to use form encoding.
 
Steve
-----Original Message-----
From: Mats Eklund [mailto:mats.eklund@...]
Sent: 12 September 2009 21:33
To: ops-users@...
Subject: [ops-users] xml submissions

Hi,

I want to make an "external xml submission" to an Orbeon PFC using a plain HTML form POST submission from my web page. Is this possible? Can I just serialize the xml document in some encoding and store it in a certain form field, and Orbeon will pick that up?

Thanks,
Mats





--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



-----Inline Attachment Follows-----


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?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: Re: Re: RE: Re: RE: xml submissions

Alessandro Vernet
Administrator
Mats,

On Fri, Sep 18, 2009 at 1:32 AM, Mats Eklund <[hidden email]> wrote:
>
> That's right Steve. My question arises because I am using an external client-side/javascript xforms engine to overcome some of the limitations I discovered in Orbeon's xforms implementation. So I am still looking for an answer to my question... (maybe I will have to try to figure out what is going on in the Orbeon javascript; it's clear that a hidden plain html form is used to submit the xml, but it's not clear to me how it is encoded).

Can you have an hidden field in your page with the serialized XML?
When you submit this to an XForms page, you can retrieve it with
xxforms:get-request-parameter('you-param-name'). So on
xforms-model-construct-done, you can do an <xforms:insert
nodeset="instance('your-instance')"
origin="saxon:parse(xxforms:get-request-parameter('you-param-name'))"/>.

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: RE: Re: Re: RE: Re: RE: xml submissions

Mats Eklund-2

Alex,

I don't think that will solve my problem, since I want the PFC to respond to the submission. Any ideas?

Thanks,

Mats


--- On Tue, 9/22/09, Alessandro Vernet <[hidden email]> wrote:

From: Alessandro Vernet <[hidden email]>
Subject: [ops-users] Re: Re: RE: Re: Re: RE: Re: RE: xml submissions
To: [hidden email]
Date: Tuesday, September 22, 2009, 4:04 AM

Mats,

On Fri, Sep 18, 2009 at 1:32 AM, Mats Eklund <mats.eklund@...> wrote:
>
> That's right Steve. My question arises because I am using an external client-side/javascript xforms engine to overcome some of the limitations I discovered in Orbeon's xforms implementation. So I am still looking for an answer to my question... (maybe I will have to try to figure out what is going on in the Orbeon javascript; it's clear that a hidden plain html form is used to submit the xml, but it's not clear to me how it is encoded).

Can you have an hidden field in your page with the serialized XML?
When you submit this to an XForms page, you can retrieve it with
xxforms:get-request-parameter('you-param-name'). So on
xforms-model-construct-done, you can do an <xforms:insert
nodeset="instance('your-instance')"
origin="saxon:parse(xxforms:get-request-parameter('you-param-name'))"/>.

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

-----Inline Attachment Follows-----


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?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: Re: RE: Re: Re: RE: Re: RE: xml submissions

Andrew Bailey
Hi,

There seems to some confusion about your question, so I thought Id chip in.

In response to
Also, you can use the request generator http://www.orbeon.com/ops/doc/processors-generators-request - this gives you full access to any POST-ed data - eg the request body - so if you did send the data as form-encoded, you should be able to extract it using this processor.

You said:
however, the point is for me to be able to have the page request and submission be handled by the PFC directly, i.e. before any page models or request generator is executed, so also not an ideal option...

Can you explain fully, why this is not a solution, as it seems to me to be what you want

Why is it not ideal?

I have not tested this out but I think the following should work:

1) In the page flow xml you set up a "page" to respond to your post from a normal html page

2) you use the request generator to capture the value of the posted xml and you do the processing you need then send the data to the view

3) In the xform:

<xf:instance id="postInstance">
        <xi:include href="input:instance"/>
</xf:instance>


Andy Bailey

http://www.hazlorealidad.com


--
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