issues in xform submission action mapping in 3.6

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

issues in xform submission action mapping in 3.6

Mei Wu-2
Hello,

We are in the process of upgrading our Orbeon framework from 3.5 to 3.6.
One thing I'm trying to figure out which worked in 3.5 but not in 3.6 is
the xforms:submission action mapping to a page.

We have this xform:submission in our xform (produced by a java class)
        <xforms:submission id="default-submission" method="post"
action="../worklist/save.view?taskId=<%=taskId%>&userId=<%=mUserId%>
&claimedBy=<%=mClaimedBy%>  separator="&amp;"
        replace="all"/>

<%=xxx%>  are replaced by variable values.

We have this in page-flow.xml:

<page path-info="/worklist/save.view" model="worklist/saveOutput.xpl"  />

Now, with 3.6, we got:
PWC1222: Path
http://localhost:8080/WorklistWebApplication/worklist/save.view?taskId=5&userId=john&claimedBy=john 
does not start with a "/" character

oxf:/config/xforms-widgets.xsl      27      N/A    
processing submission
dispatching XForms event
event \u2192 xxforms-submit
target id \u2192 default-submission
    <submission
action="../worklist/save.view?taskId=5&userId=john&claimedBy=john"
id="default-submission" method="post" replace="all" separator="&"/>

Any help will be appreciated.

Thanks
Mei


--
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
Reply | Threaded
Open this post in threaded view
|

Re: issues in xform submission action mapping in 3.6

Mei Wu-2
More to this problem:

I changed the <xform:submission> to:

<xforms:submission id="default-submission" method="post"
action="/worklist/save.view?taskId=5&userId=john &claimedBy=john"  
separator="&amp;"
       replace="all"/>

page-flow.xml:
<page path-info="/worklist/save.view.*" model="worklist/saveOutput.xpl"  />

Now, the action should match the page since the attribute of action
matches the path-info, but it still failed with:
PWC1222: Path
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale 
does not start with a "/" character

Strange is even the path:
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale 
isn't correct since it skips the context root and directly adds the URI
after http://localhost:8080

I'm not sure how the URI is formed, ops.log has the below:
2008-10-02 15:23:09,261 INFO  ProcessorService  - /xforms-server-submit
- Received request
2008-10-02 15:23:09,552 DEBUG XFormsServer  - XForms - dispatching
event: xxforms-submit - default-submission - at line 114 of
XFormsEventFactory.java
2008-10-02 15:23:09,566 DEBUG XFormsServer  - XForms - setting request
body: <?xml version="1.0" encoding="UTF-8"?><outputMsg
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms">               <po:orderId
xmlns:po="http://wlmse.sample/po">12345</po:orderId>              
<po:approveResult
xmlns:po="http://wlmse.sample/po">ApprovedApprovedApproved</po:approveResult>              
<po:replyDate
xmlns:po="http://wlmse.sample/po">2008-10-02T15:23:08.714-04:00</po:replyDate>              
<po:description
xmlns:po="http://wlmse.sample/po">string</po:description>            
</outputMsg>
2008-10-02 15:23:09,579 DEBUG XFormsServer  - XForms - dispatching to
effective resource URI:
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale
2008-10-02 15:23:09,583 DEBUG XFormsServer  - XForms - submission -
external submission time (including handling returned body): 18
2008-10-02 15:23:09,585 DEBUG XFormsServer  - XForms - submission -
total submission time: 33
2008-10-02 15:23:09,585 DEBUG XFormsServer  - XForms - containing
document cache: throwable caught, discarding document from pool.
2008-10-02 15:23:09,595 ERROR ProcessorService  - Exception at line 27
of oxf:/config/xforms-widgets.xsl (processing submission)
java.lang.IllegalArgumentException: PWC1222: Path
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale 
does not start with a "/" character
    at
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:469)
    at
org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:232)
    at
org.orbeon.oxf.servlet.ServletExternalContext.getRequestDispatcher(ServletExternalContext.java:857)
    at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doOptimized(XFormsSubmissionUtils.java:92)
    at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:686)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:980)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:809)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary(XFormsServer.java:283)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:223)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.start(XFormsServer.java:84)
    at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:650)

Also, it worked in 3.5, though I used 3.6 version of web.xml according
to orbeon web site.

Thanks
Mei


Mei Wu wrote:

> Hello,
>
> We are in the process of upgrading our Orbeon framework from 3.5 to
> 3.6. One thing I'm trying to figure out which worked in 3.5 but not in
> 3.6 is the xforms:submission action mapping to a page.
>
> We have this xform:submission in our xform (produced by a java class)
>        <xforms:submission id="default-submission" method="post"
> action="../worklist/save.view?taskId=<%=taskId%>&userId=<%=mUserId%>
> &claimedBy=<%=mClaimedBy%>  separator="&amp;"
>        replace="all"/>
>
> <%=xxx%>  are replaced by variable values.
>
> We have this in page-flow.xml:
>
> <page path-info="/worklist/save.view" model="worklist/saveOutput.xpl"  />
>
> Now, with 3.6, we got:
> PWC1222: Path
> http://localhost:8080/WorklistWebApplication/worklist/save.view?taskId=5&userId=john&claimedBy=john 
> does not start with a "/" character
>
> oxf:/config/xforms-widgets.xsl      27      N/A     processing submission
> dispatching XForms event
> event \u2192 xxforms-submit
> target id \u2192 default-submission
>    <submission
> action="../worklist/save.view?taskId=5&userId=john&claimedBy=john"
> id="default-submission" method="post" replace="all" separator="&"/>
>
> Any help will be appreciated.
>
> Thanks
> Mei


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: issues in xform submission action mapping in 3.6

Alessandro Vernet
Administrator
On Thu, Oct 2, 2008 at 11:16 AM, Mei Wu <[hidden email]> wrote:
> PWC1222: Path
> http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale
> does not start with a "/" character

Where do you see this error? If this is an exception, could you paste
the full stack trace?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: issues in xform submission action mapping in 3.6

Mei Wu-2
Hi, Alex,

It is a result of an error page, in the second post I did the following:
-----------------------
I changed the <xform:submission> to:

<xforms:submission id="default-submission" method="post" action="/worklist/save.view?taskId=5&userId=john &claimedBy=john"  separator="&amp;"
      replace="all"/>

page-flow.xml:
<page path-info="/worklist/save.view.*" model="worklist/saveOutput.xpl"  />

Now, the action should match the page since the attribute of action matches the path-info, but it still failed with:
PWC1222: Path http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale does not start with a "/" character

Strange is even the path: http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale isn't correct since it skips the context root and directly adds the URI after http://localhost:8080

I'm not sure how the URI is formed, ops.log has the below:
2008-10-02 15:23:09,261 INFO  ProcessorService  - /xforms-server-submit - Received request
2008-10-02 15:23:09,552 DEBUG XFormsServer  - XForms - dispatching event: xxforms-submit - default-submission - at line 114 of XFormsEventFactory.java
2008-10-02 15:23:09,566 DEBUG XFormsServer  - XForms - setting request body: <?xml version="1.0" encoding="UTF-8"?><outputMsg xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms">               <po:orderId xmlns:po="http://wlmse.sample/po">12345</po:orderId>               <po:approveResult xmlns:po="http://wlmse.sample/po">ApprovedApprovedApproved</po:approveResult>               <po:replyDate xmlns:po="http://wlmse.sample/po">2008-10-02T15:23:08.714-04:00</po:replyDate>               <po:description xmlns:po="http://wlmse.sample/po">string</po:description>            </outputMsg>
2008-10-02 15:23:09,579 DEBUG XFormsServer  - XForms - http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale
2008-10-02 15:23:09,583 DEBUG XFormsServer  - XForms - submission - external submission time (including handling returned body): 18
2008-10-02 15:23:09,585 DEBUG XFormsServer  - XForms - submission - total submission time: 33
2008-10-02 15:23:09,585 DEBUG XFormsServer  - XForms - containing document cache: throwable caught, discarding document from pool.
2008-10-02 15:23:09,595 ERROR ProcessorService  - Exception at line 27 of oxf:/config/xforms-widgets.xsl (processing submission)
java.lang.IllegalArgumentException: PWC1222: Path http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale does not start with a "/" character
   at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:469)
   at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:232)
   at org.orbeon.oxf.servlet.ServletExternalContext.getRequestDispatcher(ServletExternalContext.java:857)
   at org.orbeon.oxf.xforms.XFormsSubmissionUtils.doOptimized(XFormsSubmissionUtils.java:92)
   at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:686)
   at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:980)
   at org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:809)
   at org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary(XFormsServer.java:283)
   at org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:223)
   at org.orbeon.oxf.xforms.processor.XFormsServer.start(XFormsServer.java:84)
   at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:650)

What it seems like the URI of the action is resolved to the full qualified http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale  (http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale ), instead of from the context root. I use the single war approach, but I changed the context root to my own context root, would that be a problem?

Thanks
Mei

Alessandro Vernet wrote:
On Thu, Oct 2, 2008 at 11:16 AM, Mei Wu [hidden email] wrote:
  
PWC1222: Path
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale
does not start with a "/" character
    


Where do you see this error? If this is an exception, could you paste
the full stack trace?

Alex
  


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: issues in xform submission action mapping in 3.6

Alessandro Vernet
Administrator
Mei,

On Thu, Oct 2, 2008 at 1:42 PM, Mei Wu <[hidden email]> wrote:
> I changed the <xform:submission> to:
>
> <xforms:submission id="default-submission" method="post"
> action="/worklist/save.view?taskId=5&userId=john &claimedBy=john"
> separator="&amp;"
>       replace="all"/>

OK, I see. Can you try setting the oxf.xforms.optimize-local-submission
property to false, and try this again. If this works, you have a
work-around, but I would be interested in seeing an example we can
reproduce here, so we can fix this one.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: issues in xform submission action mapping in 3.6

Mei Wu-2
Hi, Alex,
Same problem, the URI is not matched to page in page-flow.xml and also
it is not appended after context root:  2008-10-02 18:49:38,365 DEBUG
XFormsServer  - XForms - opening URL connection for:
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale

2008-10-02 18:49:38,356 DEBUG XFormsServer  - XForms - dispatching
event: xxforms-submit - default-submission - at line 114 of
XFormsEventFactory.java
2008-10-02 18:49:38,365 DEBUG XFormsServer  - XForms - opening URL
connection for:
http://localhost:8080/worklist/save.view?taskId=2&userId=dale&claimedBy=dale
2008-10-02 18:49:39,278 DEBUG XFormsServer  - XForms - forwarding
cookie: JSESSIONID=fbc95401bf28c4cefb25b90bd982;
JSESSIONIDSSO=353724D8E6B52E0CA0D88B3C0905D28B
2008-10-02 18:49:39,278 DEBUG XFormsServer  - XForms - setting request
body: <?xml version="1.0" encoding="UTF-8"?><outputMsg
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms">               <po:orderId
xmlns:po="http://wlmse.sample/po">12345</po:orderId>              
<po:approveResult
xmlns:po="http://wlmse.sample/po">ApprovedApprovedApproved</po:approveResult>              
<po:replyDate
xmlns:po="http://wlmse.sample/po">2008-10-02T18:49:37.771-04:00</po:replyDate>              
<po:description
xmlns:po="http://wlmse.sample/po">yes</po:description>            
</outputMsg>
2008-10-02 18:49:39,695 DEBUG XFormsServer  - XForms - submission -
external submission time (including handling returned body): 1331
2008-10-02 18:49:39,695 DEBUG XFormsServer  - XForms - submission -
total submission time: 1339
2008-10-02 18:49:39,696 DEBUG XFormsServer  - XForms - containing
document cache: throwable caught, discarding document from pool.
2008-10-02 18:49:39,705 ERROR ProcessorService  - Exception at line 27
of oxf:/config/xforms-widgets.xsl (processing submission response)
org.orbeon.oxf.xforms.XFormsModelSubmission$XFormsSubmissionException:
line 27 of oxf:/config/xforms-widgets.xsl (processing submission
response): xforms:submission for submission id: default-submission,
error code received when submitting instance: 404
oxf:/config/xforms-widgets.xsl, line 27, column -1: xforms:submission
for submission id: default-submission, error code received when
submitting instance: 404
    at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:855)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:980)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:809)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary(XFormsServer.java:283)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:223)
    at
org.orbeon.oxf.xforms.processor.XFormsServer.start(XFormsServer.java:84)

Thanks
Mei

Alessandro Vernet wrote:

> Mei,
>
> On Thu, Oct 2, 2008 at 1:42 PM, Mei Wu <[hidden email]> wrote:
>> I changed the <xform:submission> to:
>>
>> <xforms:submission id="default-submission" method="post"
>> action="/worklist/save.view?taskId=5&userId=john &claimedBy=john"
>> separator="&amp;"
>>       replace="all"/>
>
> OK, I see. Can you try setting the
> oxf.xforms.optimize-local-submission property to false, and try this
> again. If this works, you have a work-around, but I would be
> interested in seeing an example we can reproduce here, so we can fix
> this one.
>
> Alex


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: issues in xform submission action mapping in 3.6

Alessandro Vernet
Administrator
On Thu, Oct 2, 2008 at 2:38 PM, Mei Wu <[hidden email]> wrote:
> Same problem, the URI is not matched to page in page-flow.xml and also it is
> not appended after context root:  2008-10-02 18:49:38,365 DEBUG XFormsServer

OK - then maybe it's not what I thought. Could you create a simple
example that reproduces this, and attach it to your response here? Since
you have your own page flow, I guess you will have to go with zipped
app. More on:

http://www.orbeon.com/ops/doc/home-faq#reporting-issues

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: issues in xform submission action mapping in 3.6

Mei Wu-2
I got it to work eventually (with debugging the orbeon source)

1. The property oxf.xforms.optimize-local-submission should be false, in my case, true would never work.
2. The action (or resource) in xforms:submission  should be a path either relative to this xform document (in my a case, a jsp produces the xform document) or an absolute path starting with "/YourContextRoot/", taking out the context root will not work. I was a little confused by what is said in the User Guide  (http://www.orbeon.com/ops/doc/reference-page-flow) "The XForms submission's action attribute instead matches a PFC <page> element's path-info attribute.", it is not a String match but a URI match.

I'm still a little puzzled by 1, the URI resolved from action attribute is always a fully qualified URI starting with http://localhost:8080,  this URI is given to ServletContext.getRequestDispatcher () and always will throw exception since the path must start with "/", how is it supposed to work with optimized call to servlet instead of open URIConnection?

To test this, it could be a JSP in xforms-jsp producing an xform, which has submission with action/resource pointing to a page.

I'm using the 3.6 (orbeon-3.6.0.200712061930).

Thanks
Mei



Alessandro Vernet wrote:
On Thu, Oct 2, 2008 at 2:38 PM, Mei Wu [hidden email] wrote:
Same problem, the URI is not matched to page in page-flow.xml and also it is
not appended after context root:  2008-10-02 18:49:38,365 DEBUG XFormsServer

OK - then maybe it's not what I thought. Could you create a simple example that reproduces this, and attach it to your response here? Since you have your own page flow, I guess you will have to go with zipped app. More on:

http://www.orbeon.com/ops/doc/home-faq#reporting-issues

Alex


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