Hi,
I have implemented a custom persistence layer in Java and configured the URL in the properties-local.xml as follows: <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.data" value="http://localhost:8080/eformprocessor/eform/persist"/> The 'Save' works perfectly and I am able to insert the record into the orbeon_form_data table of my DB. However, when I get the form using the edit URL (e.g., http://localhost:8080/orbeon/fr/demoapp/demoform/edit/84f29e3e842790259683b05c9314484a), my persistence servlet returns the XML body as response, however, the orbeon form runner is rendering an empty form instead of populating the data (from the XML read). Am I missing anything here? I followed the instructions verbatim as in the documentation (furnished below) Upon receiving a request, it must: Check the HTTP method to determine the operation to perform (which CRUD operation or search operation) Check the requested path to determine the location of the resource In the case of PUT, read the request body and store it appropriately. This might require writing data into a CLOB or XML type column in a relational database, for example. In the case of GET, read the storage and return the appropriate resource. In the case of DELETE, delete the appropriate resource in storage In the case of POST, perform a search. This might require generating an SQL query, for example. Please help! K |
Administrator
|
K,
This should work. Do you set an XML content-type when returning the data? I.e. application/xml?
-Erik On Fri, Jan 28, 2011 at 4:06 AM, ktangirala <[hidden email]> wrote:
-- 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 |
I put the content type as "application/xml" following the documentation (and I even printed out the response before sending it) but unfortunately it is not working, Erik! Could this be a bug? Is there a way you can verify this? How can I help?
K |
Administrator
|
Let's try to see what's happening.
So you are saying that Form Runner does make the request to your service, right? If so that's a good first step. Next is to see if/why Form Runner doesn't seem to do anything with it.
First step would be to enable XForms logging if not done yet: Then look at the logs, see where the request to your service is done, and then see if there is any information about a problem with the submission. -Erik
On Sun, Jan 30, 2011 at 9:11 PM, ktangirala <[hidden email]> wrote:
-- 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 |
Sorry, Erik, for the delayed response. Your suggestion worked like a charm. I noticed in the logs that I was writing the response incorrectly because of which it showed content-length as 0 and hence no response. I fixed that portion and everything fell in place.
I am facing another problem now. In the POST request (for summary), I am returning the <documents> XML as mentioned in the documentation but I am unable to do stuff like pagination, numbering of the records. * My records are numbered from 0 to n-1 as opposed to 1 to n (where n is number of records shown) * The pagination buttons (first, next, previous, last) are not enabled for clicks. When I click them, no request reaches my persistence layer. Not sure if I need to do something else to enable these. I double-checked the page look with orbeon.com's Form Builder and I definitely see some difference in the way the page is rendered with the page number values. Please help again, if you can :) - K |
Administrator
|
K,
Here is an example of search response: The root element has information about pagination. Do you set those attributes?
-Erik
On Wed, Feb 9, 2011 at 1:38 AM, ktangirala <[hidden email]> wrote:
-- 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 |
Free forum by Nabble | Edit this page |