Posted by
Erik Bruchez on
Mar 29, 2011; 4:35am
URL: https://discuss.orbeon.com/Get-Invalid-control-name-error-while-trying-to-migrate-to-Orbeon-3-8-tp3407120p3413726.html
Ramon,
To implement the API, you will likely need to do some XML processing.
We don't have a full example in Java specifically for the persistence
API. But in this JSP example, we show how you can parse XML sent
through an HTTP POST:
https://github.com/orbeon/orbeon-forms/blob/master/src/examples-jsp/flickr-search/service-search.jspIt's just one way of doing it.
There is no serious known bug regarding the persistence layer, at
least no bug that would prevent it to work, since the API is used by
all the built-in implementations, including the eXist and Oracle ones.
Those are not implemented directly in Java, but with XML pipelines,
XSLT, and related XML technologies available in Orbeon Forms.
I would start like this:
1. Set a property just for an a Form Runner app name, e.g. "myapp":
<property as="xs:anyURI"
name="oxf.fr.persistence.app.uri.myapp.*.data"
value="
http://localhost:8080/orbeon/myservice"/>
2. Create a form with Form Builder with app name "myapp". Save and
publish the form.
3. Go to the new form's summary page, and say "New".
This will cause Form Runner to do a GET through the URL you have specified:
http://localhost:8080/orbeon/myservice/…Now obviously you must implement something that responds to that
service. If you do this in the Orbeon Forms webapp, then it makes
sense for the path to start with
http://localhost:8080/orbeon/…otherwise, you have to point to whatever Java Servlet you are
implementing.
-Erik
On Mon, Mar 28, 2011 at 5:21 AM, Ramon de Beijer <
[hidden email]> wrote:
> Hi All,
>
> I am using Orbeon 3.8 Form Runner in a Integrated deployment way.
> I setup the Form Runner to use MySQL as persistence layer but I decided that
> its more logical if I create my own persistence layer
> at least for the saving of the data and maybe later on also the loading of
> the form definitions.
>
> If I read it correctly this can be done by setting a parameter like:
> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.data"
> value="
http://localhost:8080/orbeon/myservice"/>
>
> Where myservice obviously is my REST implementation
> But for now if have no luck with it.
>
> I try to make sence of the documentation regarding how to implement a REST
> persistence layer but i got a bit stuck.
> Is there an example somewhere how to implement the REST api (with JAVA
> preferably) for the Form Runner persistence layer.
> So things like the input parameters of the methods and the return values.
>
> Regards Ramon
>
> ps:
> I also read a post somewhere that there might be some bug regarding this
> whole own persistence layer thing
> but not sure if this is true and if it is true if its fixed and in what
> release.
>
>
>
> --
> 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