Hello All,
-- I am a few hours old in the Orbeon world and am working through the tutorial http://wiki.orbeon.com/forms/doc/developer-guide/orbeon-forms-xforms-tutorial ... I have have reached the stage where I add a submit button, go to the user interface at http://localhost:8081/orbeon/xforms-mybookcast/ enter data in the form, click the submit button (no feedback so I dont know what is happening, saving? not saving?). However once I (submit?), I have no clue where to find my submitted data. Going to http://localhost:8081/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml (note that am on port 8081, not 8080) as suggested in the tutorial to view my submitted data, instead gives me the error HTTP Status 403 -type Status report message description Access to the specified resource () has been forbidden. Apache Tomcat/7.0.29my code is as follows: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>XForms Bookcast</title> <xforms:model> <xforms:instance id="books-instance"> <books xmlns=""> <book> <title/> <author/> <language/> <link/> <rating/> <notes/> </book> </books> </xforms:instance> <xforms:submission id="save-submission" ref="instance('books-instance')" resource="/exist/rest/db/orbeon/my-bookcast/books.xml" method="put" replace="none"/> <xforms:instance id="ratings-instance"> <ratings xmlns=""> <rating> <name>1</name> <value>1</value> </rating> <rating> <name>2</name> <value>2</value> </rating> <rating> <name>3</name> <value>3</value> </rating> <rating> <name>4</name> <value>4</value> </rating> <rating> <name>5</name> <value>5</value> </rating> </ratings> </xforms:instance> <xforms:instance id="languages-instance"> <languages xmlns=""> <language> <name>English</name> <value>en</value> </language> <language> <name>French</name> <value>fr</value> </language> <language> <name>Spanish</name> <value>es</value> </language> </languages> </xforms:instance> <xforms:bind ref="book"> <xforms:bind nodeset="title" required="true()"/> <xforms:bind nodeset="author" required="true()"/> </xforms:bind> </xforms:model> </head> <body> <!--<p>Hello!</p>--> <xforms:group ref="book"> <xforms:input ref="title"> <xforms:label>Title</xforms:label> </xforms:input> <br/> <xforms:input ref="author"> <xforms:label>Author</xforms:label> </xforms:input> <xforms:select1 ref="language"> <xforms:label>Language</xforms:label> <xforms:item> <xforms:label>Choose One...</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="instance('languages-instance')/language"> <xforms:label ref="name"/> <xforms:value ref="value"/> </xforms:itemset> </xforms:select1> <xforms:input ref="link"> <xforms:label>Link</xforms:label> </xforms:input> <br/> <xforms:select1 ref="rating" appearance="full"> <xforms:label>Rating</xforms:label> <xforms:item> <xforms:label>None</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="instance('ratings-instance')/rating"> <xforms:label ref="name"/> <xforms:value ref="value"/> </xforms:itemset> </xforms:select1> <xforms:textarea ref="notes" appearance="xxforms:autosize"> <xforms:label>Notes</xforms:label> </xforms:textarea> <br/> <xforms:submit submission="save-submission"> <xforms:label>Save</xforms:label> </xforms:submit> </xforms:group> </body> </html> Does anyone know what might be happening? Any help greatly appreciated. Tumaini 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 [hidden email]. To post to this group, send email to [hidden email]. |
Hi, You can get feedback on your submit with a construct like this:<xf:submission id="save-data" ref="instance('data')" method="put" replace="none" resource="http://localhost:8081/your-path/yourquery.xquery"> <xf:message ev:event="xforms-submit-error" level="modal"> A submission error occurred: <xf:output value="event('response-body')"/> </xf:message> <xf:action ev:event="xforms-submit-done"> <xf:message>Succes</xf:message> </xf:action> </xf:submission> Regards, Marc de Graauw
On 2 October 2013 16:51, tkilimba [via Orbeon Forms community mailing list] <[hidden email]> wrote:
|
Thanks Marc, will try that. Looking at my above code from an experienced point of view, is there any reason why my above code is not working? Thanks, Tumaini On Thu, Oct 3, 2013 at 2:23 PM, Marc de Graauw <[hidden email]> wrote:
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 [hidden email]. To post to this group, send email to [hidden email]. |
Have tried the same code above on a GlassFish server.... similar result: On Tue, Oct 8, 2013 at 9:02 AM, Tumaini Kilimba <[hidden email]> wrote:
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 [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by tkilimba
I have tried the same code above on a GlassFish server instead of Tomcat, and still I get a similar error: Access to the webpage was deniedYou are not authorized to access the webpage at http://localhost:8180/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml. You may need to sign in.
HTTP Error 403 (Forbidden): The server refused to fulfill the request.
GlassFish Could anyone please point out where am going wrong? Why can't I view my submitted data?
Thanks,
Tumaini
On Tue, Oct 8, 2013 at 9:02 AM, Tumaini Kilimba <[hidden email]> wrote:
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 [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by tkilimba
I have tried the following code on a GlassFish server instead of Tomcat, <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head>
<title>XForms Bookcast</title> <xforms:model>
<xforms:instance id="books-instance"> <books xmlns="">
<book> <title/>
<author/> <language/>
<link/> <rating/>
<notes/> </book>
</books> </xforms:instance>
<xforms:instance id="languages-instance"> <languages xmlns="">
<language> <name>English</name>
<value>en</value> </language>
<language> <name>French</name>
<value>fr</value> </language>
<language> <name>Spanish</name>
<value>es</value> </language>
</languages> </xforms:instance>
<xforms:bind ref="book"> <xforms:bind nodeset="title" required="true()"/>
<xforms:bind nodeset="author" required="true()"/> </xforms:bind>
<xforms:submission id="save-submission" ref="instance('books-instance')"
resource="http://localhost:8180/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml" method="put" replace="none"/>
</xforms:model> </head>
<body> <p>Hello you zebras!</p>
<xforms:group ref="book"> <xforms:input ref="title">
<xforms:label>Title</xforms:label> </xforms:input>
<br/> <xforms:input ref="author">
<xforms:label>Author</xforms:label> </xforms:input>
<xforms:select1 ref="language"> <xforms:label>Language</xforms:label>
<xforms:item> <xforms:label>Choose One...</xforms:label>
<xforms:value/> </xforms:item>
<xforms:itemset nodeset="instance('languages-instance')/language"> <xforms:label ref="name"/>
<xforms:value ref="value"/> </xforms:itemset>
</xforms:select1> <br/>
<xforms:submit submission="save-submission"> <xforms:label>Save</xforms:label>
</xforms:submit> </xforms:group>
</body> </html> and still I get a similar error: Access to the webpage was deniedYou are not authorized to access the webpage at http://localhost:8180/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml. You may need to sign in.
HTTP Error 403 (Forbidden): The server refused to fulfill the request.
GlassFish Could anyone please point out where am going wrong? Why can't I view my submitted data?
Thanks,
Tumaini On Tue, Oct 8, 2013 at 9:02 AM, Tumaini Kilimba <[hidden email]> wrote:
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 [hidden email]. To post to this group, send email to [hidden email]. |
Looking at my log, I see : 2013-10-09 01:49:19,081 INFO ProcessorService - /xforms-server - Timing: 70 2013-10-09 01:49:28,365 INFO ProcessorService - /xforms-server - Received request
2013-10-09 01:49:28,396 ERROR XFormsServer - xforms-submit-error - setting throwable {throwable: " +----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred | |----------------------------------------------------------------------------------------------------------------------|
|Could not initialize class org.orbeon.oxf.resources.handler.HTTPURLConnection | |----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack | |----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------| |Exception: java.lang.NoClassDefFoundError |
|----------------------------------------------------------------------------------------------------------------------| |org.orbeon.oxf.resources.handler.HTTPHandler |openConnection |HTTPHandler.java | 28|
|java.net.URL |openConnection |URL.java | 969| |org.orbeon.oxf.util.Connection |connect |Connection.scala | 92|
|rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call |RegularSubmission.java | 90| |rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call |RegularSubmission.java | 71|
|org.orbeon.oxf.xforms.submission.BaseSubmission |submitCallable |BaseSubmission.java | 100| |org.orbeon.oxf.xforms.submission.RegularSubmission |connect |RegularSubmission.java | 124|
|.orbeon.oxf.xforms.submission.XFormsModelSubmission|doSubmit |XFormsModelSubmission.java | 464| |.orbeon.oxf.xforms.submission.XFormsModelSubmission|performDefaultAction |XFormsModelSubmission.java | 296|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply$mcV$sp |Dispatch.scala | 137| |.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply |Dispatch.scala | 73|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply |Dispatch.scala | 73| |org.orbeon.oxf.xforms.event.Dispatch$ |withEvent$1 |Dispatch.scala | 38|
|org.orbeon.oxf.xforms.event.Dispatch$ |dispatchEvent |Dispatch.scala | 72| |eon.oxf.xforms.control.controls.XFormsSubmitControl|performDefaultAction |XFormsSubmitControl.scala | 45|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply$mcV$sp |Dispatch.scala | 137| |.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply |Dispatch.scala | 73|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply |Dispatch.scala | 73| |org.orbeon.oxf.xforms.event.Dispatch$ |withEvent$1 |Dispatch.scala | 38|
|org.orbeon.oxf.xforms.event.Dispatch$ |dispatchEvent |Dispatch.scala | 72| |---8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<---|
|org.apache.catalina.core.StandardPipeline |invoke |StandardPipeline.java | 595| |org.apache.catalina.core.StandardHostValve |invoke |StandardHostValve.java | 161|
|org.apache.catalina.connector.CoyoteAdapter |doService |CoyoteAdapter.java | 331| |org.apache.catalina.connector.CoyoteAdapter |service |CoyoteAdapter.java | 231|
|se.v3.services.impl.ContainerMapper$AdapterCallable|call |ContainerMapper.java | 317| |com.sun.enterprise.v3.services.impl.ContainerMapper|service |ContainerMapper.java | 195|
|com.sun.grizzly.http.ProcessorTask |invokeAdapter |ProcessorTask.java | 860| |com.sun.grizzly.http.ProcessorTask |doProcess |ProcessorTask.java | 757|
|com.sun.grizzly.http.ProcessorTask |process |ProcessorTask.java |1056| |com.sun.grizzly.http.DefaultProtocolFilter |execute |DefaultProtocolFilter.java | 229|
|com.sun.grizzly.DefaultProtocolChain |executeProtocolFilter |DefaultProtocolChain.java | 137| |com.sun.grizzly.DefaultProtocolChain |execute |DefaultProtocolChain.java | 104|
|com.sun.grizzly.DefaultProtocolChain |execute |DefaultProtocolChain.java | 90| |com.sun.grizzly.http.HttpProtocolChain |execute |HttpProtocolChain.java | 79|
|com.sun.grizzly.ProtocolChainContextTask |doCall |ProtocolChainContextTask.java | 54| |com.sun.grizzly.SelectionKeyContextTask |call |SelectionKeyContextTask.java | 59|
|com.sun.grizzly.ContextTask |run |ContextTask.java | 71| |com.sun.grizzly.util.AbstractThreadPool$Worker |doWork |AbstractThreadPool.java | 532|
|com.sun.grizzly.util.AbstractThreadPool$Worker |run |AbstractThreadPool.java | 513| |java.lang.Thread |run |Thread.java | 722|
+----------------------------------------------------------------------------------------------------------------------+"} 2013-10-09 01:49:28,411 INFO ProcessorService - /xforms-server - Timing: 46
Hope this helps? On Wed, Oct 9, 2013 at 1:42 AM, Tumaini Kilimba <[hidden email]> wrote:
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 [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Tumaini,
I wouldn't be surprised if this was caused by an older or newer version of HTTPClient that comes with the app server being used instead of the version that comes with Orbeon Forms. For reference, which version of GlassFish and which version of Orbeon Forms are you on? Per my other message, I'd recommend you fix this by increasing the permgen and use Tomcat instead. And of course, let us know of this isn't a reasonable course of action. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
<head> <title>XForms Bookcast</title> <xforms:model>
<xforms:instance id="books-instance"> <books xmlns=""> <book>
<title/> <author/> <language/>
<link/> <rating/> <notes/>
</book> </books> </xforms:instance>
<xforms:submission id="save-submission" ref="instance('books-instance')"
resource="/exist/rest/db/orbeon/my-bookcast/books.xml" method="put" replace="none"> <xforms:message ev:event="xforms-submit-error" level="modal"> A submission error occurred:
<xforms:output value="event('response-body')"/> </xforms:message> <xforms:action ev:event="xforms-submit-done">
<xforms:message>Successfully saved</xforms:message> </xforms:action> </xforms:submission> </xforms:model>
</head> <body> <p>Hello coders!</p>
<xforms:group ref="book"> <xforms:input ref="title"> <xforms:label>Title</xforms:label>
</xforms:input> <br/> <xforms:input ref="author">
<xforms:label>Author</xforms:label> </xforms:input> <br/>
<p/> <xforms:submit submission="save-submission"> <xforms:label>Save</xforms:label>
</xforms:submit> </xforms:group> </body>
</html> NOW, for the first time, clicking on the Submit/Save button gives me a SUCCESS message! However, how do I now view my saved data? According to the tutorial ( http://wiki.orbeon.com/forms/doc/developer-guide/orbeon-forms-xforms-tutorial ), I need to browse to the following URL to see my data: http://localhost:8088/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml . However, when I navigate there, I still get the message below: Could anyone suggest where am going wrong? Am using Tomcat 6 and Orbeon 4.3 Thanks in advance, Tumaini On Thu, Oct 10, 2013 at 12:14 AM, Alessandro Vernet <[hidden email]> wrote: Hi Tumaini, 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 [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Since 4.0, access to eXist is blocked for security reasons. This is done through a filter, that you can find in WEB-INF/web.xml. If you want to access eXist directly through your web browser (not recommended for production, but convenient for testing), comment the following filter mapping: <filter-mapping> <filter-name>orbeon-exist-filter</filter-name> <url-pattern>/exist/*</url-pattern> <xsl:comment>Security filter for eXist</xsl:comment> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> There is a note about this in the 4.0 release notes, but we should update the tutorial accordingly. http://wiki.orbeon.com/forms/doc/developer-guide/release-notes/40#TOC-Security-of-the-built-in-eXist-database You'll let us know of this works for you, Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
BTW, this is now done, in the "Adding a save button" section. http://wiki.orbeon.com/forms/doc/developer-guide/orbeon-forms-xforms-tutorial#TOC-Adding-a-save-button Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |