Need to call web service on clicking save in Form builder

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

Need to call web service on clicking save in Form builder

haritha
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
Reply | Threaded
Open this post in threaded view
|

Re: Need to call web service on clicking save in Form builder

Erik Bruchez
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.

-Erik

On Wed, Mar 2, 2011 at 9:39 PM, haritha <[hidden email]> wrote:
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

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Need-to-call-web-service-on-clicking-save-in-Form-builder-tp3332792p3332792.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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




--
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: Need to call web service on clicking save in Form builder

haritha
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Need to call web service on clicking save in Form builder

Erik Bruchez
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,

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

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Need-to-call-web-service-on-clicking-save-in-Form-builder-tp3332792p3332989.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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




--
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: Need to call web service on clicking save in Form builder

raju
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 .
Reply | Threaded
Open this post in threaded view
|

Re: Need to call web service on clicking save in Form builder

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