Need help to integrate orbeon form builder & runner with java spring webapp

360 views
Skip to first unread message

ashok@orb

unread,
Mar 1, 2016, 11:51:01 AM3/1/16
to orb...@googlegroups.com
Hi, I want to use orbeon forms in my java spring web application Idea is to have functionality like application admins can build forms and publish as a menu in the application. Using that menu end user will fill those form to submit the information. For this I need to integrate orbeon form builder and runner into my web-app so that i can have single WAR file.

View this message in context: Need help to integrate orbeon form builder & runner with java spring webapp
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

Alessandro Vernet

unread,
Mar 1, 2016, 1:56:09 PM3/1/16
to orb...@googlegroups.com
Hi Ashok,

Instead of combining the Orbeon Forms war with your own war, I'd recommend
you use the "Separate deployment" technique, which allows you to keep your
war and the Orbeon war separate. You can find more about this on:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications

And of course, just let us know if you have any question regarding separate
deployment.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661165.html

ashok@orb

unread,
Mar 11, 2016, 5:36:23 AM3/11/16
to orb...@googlegroups.com
Hi Alex,


As per given steps I have tried separate deployment of Orbeon and myApp.
I have added x-form filter jar in myApp and also added given filters in
myApp's web.xml.
I have deployed both application Orbeon and myApp in single tomcat with
crossContext="true".

Now when I use
http://localhost:8080/orbeon/xforms-jsp/flickr-search/
I am getting the form.

but when I tries to access same form from myApp using
http://localhost:8080/myApp/xforms-jsp/flickr-search/

I am getting 404 page not found error.


I am not getting what I missed.

please let me know if anything I missed.

Thanks,
Ashok

--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661221.html

Alessandro Vernet

unread,
Mar 11, 2016, 6:13:13 PM3/11/16
to orb...@googlegroups.com
Hi Ashok,

And did you put the flickr-search example inside xforms-jsp in your app?

Just to make things clear: with separate deployment, it's not that a path
available under /orbeon becomes available under /myApp, but that a servlet
or JSP in /myApp can generate XForms, and that thanks to the filter that
XForms will be processed by Orbeon Forms, and the resulting will HTML sent
to the browser.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661222.html

ashok@orb

unread,
Mar 14, 2016, 7:42:48 AM3/14/16
to orb...@googlegroups.com
Hi alex,

Thanks for reply. I got it working after copying flickr-search example app
in my application.
Now my question is how can I integrate form created with form builder in
/orebon app into my web app.
I read about it and got to know that with the approach i integrated orbeon,
I can run plain x-form in my app but for form created using form builder
need Form runner to run it. So please let me know how can Iintegrate orbeon
form runner in my java webapp so i can run the forms built with form builder
in my application.

Thanks,
Ashok Wagh

--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661224.html

Alessandro Vernet

unread,
Mar 14, 2016, 1:58:02 PM3/14/16
to orb...@googlegroups.com
Hi Ashok,

I am glad that things worked when copying flickr-search into your web app.
Integrating forms created with Form Builder isn't done with the "separate
deployment" you've been using so far. What you've done so far is for cases
where your app produces XForms. To integrate a form created with Form
Builder, you'll want to use the Form Runner Java Embedding API, which in a
way a simpler than what you've done. This is documented on:

http://doc.orbeon.com/form-runner/link-embed/java-api.html

However, as you noted, this is a PE-only feature, and there is no equivalent
for Orbeon Forms CE.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661225.html

ashok@orb

unread,
Mar 15, 2016, 3:39:33 AM3/15/16
to orb...@googlegroups.com
Hi alex,

Thanks For the info. Before using Orbeon PE We are trying some POC so that
we can get to know how things works in orbeon. So Now understood the way of
separate deployment. I wants to know how it stores the form definition and
data. after going through below link

http://doc.orbeon.com/form-runner/api/persistence/index.html#rest-based

I understood the hierarchy of folder structure where it stores form
definition and data inside orebon app
But here in my case it is showing only .bin files, not able to see any
form.xhtml/ data.xml file.

Let me know how can i get those stored files?


Thanks,
Ashok

--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661227.html

Alessandro Vernet

unread,
Mar 15, 2016, 7:51:52 PM3/15/16
to orb...@googlegroups.com
Hi Ashok,

Yes, doing a POC ("try before you invest more time, energy, money…") is the
way to go!

You're saying that you're only seeing .bin files. Where are you looking?
With what tool?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661234.html

ashok@orb

unread,
Mar 16, 2016, 5:54:13 AM3/16/16
to orb...@googlegroups.com
Hi Alex,

I am trying to store orbeon form in mysql database.
I alreday have mysql 5.7.1 database setted up. I have created schema orbeon
using user root & password xyz. I have executed DDL of orbeon tables so
tables got created.
Then for configuration I have done below steps-
1. In my tomcat8 i have added mysql-connector-java-5.1.38.jar under
tomcat/lib/
then added jndi Resource in tomcats server.xml as below
<context path="/orbeon" docBase="orbeon" reloadable="false"
override="true" allowLinking="true">
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="root" password="root"
driverClassName="com.mysql.jdbc.Driver"
poolPreparedStatements="true"
validationQuery="SELECT * FROM orbeon_form_data"
url="jdbc:mysql://localhost:3306/orbeon"/>
</context>

2. Then I ahve added resource configuration in orbeon webapps web.xml file
as

<resource-ref>
<description>DataSource</description>
<res-ref-name>jdbc/mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

3. Then added properties-local.xml file under
orbeon\WEB-INF\resources\config with below contents

<?xml version="1.0" encoding="UTF-8"?>
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<property as="xs:string" name="oxf.fr.persistence.provider.myapp.*.*"
value="mysql"/>
<property as="xs:string" name="oxf.fr.persistence.mysql.datasource"
value="mysql"/>
</properties>

4. Then started tomcat server & tested orbeon form builder.
I have created a form form1 with app name myapp and added 2-3 input textbox.
when I try to save the form it gives an error "There was an error
communicating with the database..."

I have also checked orbeon.log file but i haven;t found anything realted to
db error. I have also tried with enabling log for sqlprocessor on log4j xml
of orbeon. Still not got any error in orbeon.log file.

so please let me know what i missed.


Thanks
Ashok


--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661240.html

Alessandro Vernet

unread,
Mar 17, 2016, 2:47:32 PM3/17/16
to orb...@googlegroups.com
Hi Ashok,

Just by reading your config, I don't see any obvious problem. If you get the
"There was an error communicating with the database" error message, you
should really have something in the orbeon.log about it. Could you set your
logging to the Development config (see below), stop Tomcat, delete the
orbeon.log, restart Tomcat, reproduce the problem, and attach your
orbeon.log to your response?

http://doc.orbeon.com/configuration/advanced/xforms-logging.html#development-configuration

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661254.html

ashok@orb

unread,
Mar 18, 2016, 5:05:07 AM3/18/16
to orb...@googlegroups.com
Hi Alex,
Thanks for reply i fixed the issue & got it working. Now my xforms xml &
data getting saved into database.
Next what I am exploring is to call my custom REST api on form definition
CRUD or on form data save/update. I found some property configuration as
like below

<property as="xs:string" name="oxf.fr.detail.buttons.*.*"
value="workflow-send clear"/>
<property as="xs:anyURI" name="oxf.fr.detail.send.uri.*.*"
value="http://myapp/createPost"/>

This property i have tried. I have added this property in my
WEB-INF/resources/config/properties-local.xml

& restarted the app. so here I am expecting two service call on save button
of form(data save)
1. /orbeon/xforms-server
2. /myapp/createPost

but I am getting only one i.e. /orbeon/xforms-server which saved x-form into
database handled by orbeon.

I want this thing like it will also call custom api of my application so
that i can log these things for further processing.


Please let me know how I can do this.

Thanks,
Ashok Wagh

--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661265.html

ashok@orb

unread,
Mar 21, 2016, 8:56:04 AM3/21/16
to orb...@googlegroups.com
Hi Alex,

Now I am able to call my custom REST api on save of orbeon form. Now I am
integrating HTTP services for drop downs and other controls in a form. My
REST api's are secured with oauth. So when orbeon hits the rest api for drop
down data, those http call should have authorization header having token.
Otherwise my application denies access to resources. So can you please tell
me about how can I include my custom headers headers to these REST calls.


Thanks,
Ashok Wagh

--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661276.html

Alessandro Vernet

unread,
Mar 27, 2016, 5:28:23 AM3/27/16
to orb...@googlegroups.com
Hi Ashok,

This the actual Authorization header that you need to set? Where would
Orbeon Forms get the value from? Is it the value sent in the request done by
the browser that should be forwarded?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Need-help-to-integrate-orbeon-form-builder-runner-with-java-spring-webapp-tp4661160p4661299.html

Yinka Adeniyi

unread,
Jun 28, 2022, 6:50:17 PM6/28/22
to Orbeon Forms
Hi,
What are the steps i need to follow to configure the smtp server to notify client on the text box.I have tried within my reach with no breakthrough. Please help me with steps to be taken to get it fixed.I've been on it for sometimes now and its handful.

Yinka Adeniyi

unread,
Jun 29, 2022, 12:57:35 PM6/29/22
to orb...@googlegroups.com
I want the orbeon to take value from the textbox in the form submitted,i dont want it to be outcoded.
Thanks,i look forward to reading from you soon.

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/aHWalm7AJXc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/9b7cd723-d310-46d4-b197-b2618a97e0d1n%40googlegroups.com.

Alessandro Vernet

unread,
Jun 30, 2022, 12:57:27 PM6/30/22
to Orbeon Forms
Hi Yinka,

I suspect that this question is unrelated to the email setup; if so could you create a new thread about this?

Keeping questions about different issues in different threads is helpful both for you and I or other people participating in the thread, to quickly know what the context of the message is, but also for people who are later on finding those threads and looking for information there.

Also, in that new thread, could you provide more details about what you mean by "I don't want it to be outcoded", and what you are aiming for in general?

-Alex

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 orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAE2fLzqo%3DYE4CYLaTZyj20voHL_n%2BstDNYZouWKznuvgJMzoNw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages