Login  Register

Re: xforms:submission resource url re-writing

Posted by bsteuhl on Dec 10, 2010; 12:43pm
URL: https://discuss.orbeon.com/xforms-submission-resource-url-re-writing-tp3081280p3081884.html

In the REST URL within your form you can use an AVT to dynamically create the url from values stored in an instance and depending on the event within the form choosen, use xforms:setvalue to set an element used for the AVT.

There are other options but would need to understand more about the design.
 

Brian Steuhl
website: http://BTMSoftwareSolutions.com
business email: [hidden email]
cell: 908-421-0742

home office: 732-961-3187
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Arlo White <[hidden email]>
To: [hidden email]
Sent: Thu, December 9, 2010 8:35:32 PM
Subject: [ops-users] xforms:submission resource url re-writing

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