send data from form to own app

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

send data from form to own app

Philip Steeman

Hello,

I’m very new to Orbeon. I’m looking for a proof of concept to make a very easy form with 1 text field (NAME) and a send button.

Then when pushing the send button, all the data (only one field in this example) should be sent to my own app (no data should be saved in a database).


I managed to have only a send button with the following entry in properties-local.xml:

  <property as="xs:string" name="oxf.fr.detail.buttons.test.eerst">

     send

  </property>


I can call my own app like this

  <property as="xs:string" name="oxf.fr.detail.process.send.test.eerst" >

    send(

        uri        = "http://server/post.php",

        method     = "GET",

        content    = "XML",

        replace    = "all",

    )

  </property>

 

But no form data is sent (I can see this with tcpflow). The script is indeed called but the only info I can see is the following:


document

363df3cb2b7b40ec77f9ac1860e9d9da75399a57

process

7a33dfdfb9956249f0597374bd83c5ebdb4ddaef

data-format-version

4.0.0

language

en

valid

true

app

test

form-version

1

form

eerst


The data in the NAME textfield isn't sent.


It can be a stupid question (I am very new to this): what am I doing wrong? Is there a tutorial for something like this?

 

Thanks

 

Philip

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: send data from form to own app

Alessandro  Vernet
Administrator
Hi Philip,

I am not sure if this is the problem, but in your call to `send()`, you seem
to have an extraneous comma after the last parameter. But before you try to
remove it, I'd recommend you reproduce the problem, look at your
`orbeon.log`, and look for error messages in there that tell you what is
going on.

You'll let me know if you find a message about the syntax error in the
process, or some other error message that point you to a solution.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: send data from form to own app

Philip Steeman
That syntax error was already solved. I can't see Warnings or Errors in orbeon.log.
The URI is called but without the DATA in the form.

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: send data from form to own app

Philip Steeman

It seems to work with
method="post"


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: send data from form to own app

Alessandro  Vernet
Administrator
Hi Philip,

Correct: if you want the XML document to be sent to your service, you indeed
need to use `method="POST"` instead of `method="GET"`.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet