Hi ,
I am New to Orbeon Forms. Iam using orbeon 3.8.0 CE version.I Need to call a web service on clicking save button in the form.Can you please tell me where should I modify the code. Could you please help us in resolving this issue ?? Regards, Haritha |
Administrator
|
Haritha, To achieve this you need to write XForms code, and that means you need to understand quite a bit of XForms, including: * xforms:submission (to call the service)
* XForms events and actions (to respond to the click and call the submission) The Orbeon Forms tutorial covers quite a bit of ground on those basic features: Now specifically to call the service upon a Form Runner save, you will have to add an event handler that kicks in for example right after the save has successfully completed. The event handler would look something like this:
<xforms:action ev:event="xforms-submit-done" ev:observer="fr-create-update-submission"> ... call here the XForms submission that calls your service... </xforms:action>
Here fr-create-update-submission is the internal Form Runner submission called to save a document. On Wed, Mar 2, 2011 at 9:39 PM, haritha <[hidden email]> wrote: Hi , -- 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 |
Thanks for the help Erik,
Yes, i have gone through the tutorial page for orbeon forms, and am able to invoke a webservice through the xforms:submission tag. We are looking at creating forms using a formbuilder and run them through Form runner, and want the data to be saved/persisted in an external system through calls to web services (the call may first be redirected to an intermediate application, which inturn invokes the webservices). Found this article : http://wiki.orbeon.com/forms/doc/contributor-guide/form-builder-integration-notes Does this mean that once i integrate a persistance service, the "save" and other default actions available on the form will invoke these integrated service? Please let me know if I am looking into the right direction, and if integration of "Remote Persistence service" is the recommended way of achieving our aim. Thanks again, Haritha |
Administrator
|
Haritha,
I understand better. Definitely, I would use a custom persistence layer. This way: * Form Runner calls the persistence REST API * you can then call your web service from there
Everything will then go through your own persistence layer, provided you configure Orbeon Forms to point to it with the properties. -Erik
On Thu, Mar 3, 2011 at 1:21 AM, haritha <[hidden email]> wrote: Thanks for the help 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 |
This post was updated on .
In reply to this post by Erik Bruchez
Hi Erick ,
1.After click on save need to call the custom web service in form builder and form runner 1.which file i have to write in source code (File Name) please help me ? Given Code Snipet : <xforms:action ev:event="xforms-submit-done" ev:observer="fr-create-update-submission"> ... call here the XForms submission that calls your service... </xforms:action> 2.Is it possible to call custom webservice safter click on save (Due to i am using the mysql persistence layer ) ? Thanks RaaZ . |
Administrator
|
Hi RaaZ,
You can use buttons' processes to create your own button that saves and then calls your own service with the data that was saved. I would recommend you do this instead of updating the form to add your own XForms code. See: https://github.com/orbeon/orbeon-forms/wiki/Form-Runner:-Buttons-and-Processes Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |