Submission not occuring

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Submission not occuring

marnold
XForms Submission Problems

Hi,

I'm having trouble getting my xform to submit properly.  I'm a
beginner, so hopefully my mistake is something stupid and obvious.

I have Orbeon 3.6 on Tomcat 6 on Windows.  I have my own webapp,
deployed seperately, with a static .xhtml in /xforms-jsp - all that's
working ok.

But the submissions aren't working.  First I tried to submit to the
built-in eXist database in the way the bookcast example does, then I
gave up and made a simple servlet to accept the xml in a http post.  I
can't get either to work.

My eXist submission (copied off bookcast example, but do I need to
create eXists 'tw' collection first?):

<xforms:submission id="save-submission"
                           ref="instance('message-instance')"
                           action="/exist/rest/db/orbeon/tw/message.xml"
                           method="put"
                           replace="none">
        <xforms:message ev:event="xforms-submit-error" level="modal"
value="event('body')"/>
        <xforms:message ev:event="xforms-submit-done"
level="modal">Saved!</xforms:message>
</xforms:submission>

My servlet submission:

<xforms:submission id="save-submission"
                               ref="instance('message-instance')"
                               action="/TW/ReceiveMessageXML"
                               method="post"
                               replace="all">
        <xforms:message ev:event="xforms-submit-error" level="modal"
value="event('body')"/>
        <xforms:message ev:event="xforms-submit-done"
level="modal">Saved!</xforms:message>
</xforms:submission>

doPost method of servlet:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

                ServletOutputStream out = response.getOutputStream();
                ServletInputStream in = request.getInputStream();
               
                byte[] buffer = new byte[1024];
                int len = 1024;
                int off = 0;
                int result = 0;
               
                response.setContentType("text/html");
                out.print("<html><body><pre>");
               
                while (result >= 0) {
                        result = in.read(buffer, off, len);
                        off += result;
                        out.write(buffer, off, result);
                }
               
                out.print("</pre></body></html>");
        }
}

I've tried to enable Orbeon logging by uncommenting everything in
RESOURCES/config/log4j.xml, reploying Orbeon and restarting Tomcat -
but I can't find a log file.  Where is it created?

I've tried using tcpmon as a proxy server, and I can see the http put
when I run the bookcast example, but not when running my xform.  I
just get a DOMFocusIn, DOMActivate http post for the save button.
Perhaps this means Orbeon thinks my xml instance is not valid - but
there are no !s next to input fields, and the event('body') is null.
How would I check if this were the case?

Thanks,
Malcolm.


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