Integration parameter passing

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

Integration parameter passing

Karthi
Hi,

I am trying to integrate Orbeon forms with one of our application.
I found that server side embedding is the suitable integration for our application.

Embedded Orbeon form displayed within our application page and all validations works fine without any issues.

We are going to use our existing document storage system for all XMLs shared b/w Orbeon and our application. With this setup, I am trying to load the Orbeon form initial data thru the callback service (on form load -- call my application service to get the initial data XML), for this service to be called I need a parameter from Orbeon service which I will pass thru query string (as session and request attributes are not visible from the Orbeon form). I have found a parameter to pass query string, but it did not work.

Question is,
1) How to share this data (our application is not portlet) with Orbeon form and how can this parameter be parsed and set inside form (say hidden variable) and set that as a parameter to the call back service?
2) How can I create a new Orbeon session from my application which can later be used for all subsequent Orbeon call back calls?

Any pointers to above queries is appreciated.

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Integration parameter passing

Karthi
Below is the JSP embedding that I have done for integration
<%
        API.embedFormJava(
            request,      // HttpServletRequest: incoming HttpServletRequest
            out,          // Writer: where the embedded form is written
            "App",     // String: Form Runner form name
            "Form",  // String: Form Runner app name
            "new",        // String: Form Runner action name
            null,         // String: Form Runner document id (optional)
            null,   // String: query string (optional)
            null          // Map<String, String>: custom HTTP headers (optional)
        );
Reply | Threaded
Open this post in threaded view
|

Re: Integration parameter passing

Erik Bruchez
Administrator
You should be able to do this via the "query string" parameter, for example:

        API.embedFormJava(
            request,      // HttpServletRequest: incoming HttpServletRequest
            out,          // Writer: where the embedded form is written
            "App",     // String: Form Runner form name
            "Form",  // String: Form Runner app name
            "new",        // String: Form Runner action name
            null,         // String: Form Runner document id (optional)
            "foo=bar&baz=qux",   // String: query string (optional)
            null          // Map<String, String>: custom HTTP headers (optional)
        );

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Integration parameter passing

Karthi
Yes, It works.. Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Integration parameter passing

Erik Bruchez
Administrator
Great, thanks for confirming! -Erik