Login  Register

Re: Re: xforms:submission resource url re-writing

Posted by Arlo White on Dec 10, 2010; 6:22pm
URL: https://discuss.orbeon.com/xforms-submission-resource-url-re-writing-tp3081280p3082480.html

I'm not using the OrbeonXFormsFilter. All of our XForms are viewed in
the Form Runner. We've implemented REST services in the other webapp to
serve XForms to the Form Runner and provide REST data services.

So our webapp redirects the user to
/orbeon/fr/app/form/edit/1234
Orbeon requests the XForm through our REST persistence layer in our webapp.
xforms:submissions go to a REST service is our webapp as well. (But here
I need to specify an absolute url in the XForm, which I want to avoid as
I explained in the first post)

Should I still use the OrbeonXFormsFilter with the Form Runner?

Of course our webapp could pre-process the XForms and rewrite the
xforms:submission resource attribute, but I was hoping there was an
easier Orbeon way.


On 12/09/2010 08:19 PM, Erik Bruchez wrote:

> Arlo,
>
> So which case doesn't work?
>
> I am trying this, with /myapp being the context of a separate all, and
> /orbeon the context of the Orbeon Forms WAR:
>
>    http://localhost:8080/myapp/xforms-jsp/page1.jsp
>
> contains the following submission:
>
>    <xf:submission id="page1" action="/xforms-jsp/page2.jsp" method="get"/>
>
> I correctly end up at:
>
>    http://localhost:8080/myapp/xforms-jsp/page2.jsp
>
> -Erik
>
> On Thu, Dec 9, 2010 at 5:35 PM, Arlo White<[hidden email]>  wrote:
>> We have a separate webapp (/remote) with REST services that Orbeon accesses.
>> I want my xforms:submission resource urls to point to this webapp without
>> having to hard-code an absolute url. This is because these xforms will be
>> transferred between different servers and I don't want to edit the XForm
>> every time I do so.
>>
>> One possibility is to pass in the remote service url prefix through a
>> parameter or property. I couldn't get xxforms:get-request-parameter() to
>> work for me. I'm not sure what other methods I might use. Maybe I can create
>> my own property in properties-local.xml and inject it into the url?
>>
>> I've been reading through:
>> http://wiki.orbeon.com/forms/doc/developer-guide/admin/url-rewriting
>>
>> This seems to indicate that I can use .. in a url and Orbeon will translate
>> it. However, ../remote/my/service didn't work. This would have been the
>> easiest...
>>
>> Portions of the documentation sound promising:
>>
>> If the URL is an absolute path, the URL is rewritten
>>   * usually, this means that the servlet context path is prepended
>>   * in some cases, like separate deployment, a different context is prepended
>> depending on the type of resources
>>
>> But I'm not sure how to configure Orbeon to prepend a different context in
>> some cases. (for xforms:submission resource attributes)
>>
>> I tried setting<property as="xs:anyURI"
>> name="oxf.url-rewriting.service.base-uri" value="/remote"/>
>> But this broke the Form Runner and Builder.
>>
>> I'd appreciate any recommendations on the best way to do this.
>>
>> --
>> Arlo White
>> Application Management / ITS
>> CalPoly, San Luis Obispo
>> [hidden email]
>>
>>
>> --
>> 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