Hi All,
Say for example I am creating new form as shown in below url
http://localhost:8080/orbeon-PE/fr/orbeon/builder/new
so to pass request parameters from here how can I achive this
is there any sample code?
http://localhost:8080/orbeon-PE/fr/orbeon/builder/new?username=smaran
Regards,
Smaran
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Wednesday, March 09, 2011 10:52 AM
To: [hidden email]
Subject: [ops-users] Re: RE: RE: RE: Re: Can anyone tell me where this
file will be whats the name of this
Smaran,
crud.xpl is the implementation of the persistence services,
i.e.:
/fr/service/oracle/crud/…
This URL is not the same as the URL that you see in your
browser. It is the URL of an HTTP service, called either from XPL, or from
XForms, as explained in another message.
If you want to pass parameters to an HTTP service, you have
a few options:
* use the request body; this is not possible here because
the body contains the form definition of data
* use request parameters; this should be possible here
* use HTTP headers; this should also be possible here
There are 2 sides to this:
* crud.xpl extracting the request parameters/headers from
the request, using oxf:request
* whoever calls the service must pass those request
parameters/headers
-Erik
On Tue, Mar 8, 2011 at 9:09 PM, <[hidden email]>
wrote:
Hi
You mean to say I have following url while creating new form http://localhost:8080/orbeon-PE/fr/orbeon/builder/new
so you suggest me to change url as below?
http://localhost:8080/orbeon-PE/fr/orbeon/builder/new?username=smaran
so that I can acess in crud.xpl as
<username><xsl:value-of select="$request/ username
"/></username>
Please correct me if I am wrong attaching my crud.xpl for reference
Regards,
Smaran
-----Original Message-----
From: Tom Grahame [mailto:[hidden email]]
Sent: Tuesday, March 08, 2011 8:35 PM
To: [hidden email]
Subject: [ops-users] RE: RE:
Re: Can anyone tell me where this file will be whats the name of this
Smaran,
There are two ways that I can think of to add attributes to that XML infoset;
changing the HTTP request that the request generator is describing and
transforming the infoset using XSLT. I think the first way is the one you might
be interested in.
Depending upon how crud.xpl is activated in page-flow, you could add URL
parameters to a GET request and they would appear in the request infoset. So if
your page flow was like this (not tested):
And you made this GET request
http://locahost:8080/orbeon/crud?username=tom&password=insecure
This would appear as part of your request infoset (the rest of the infoset
excluded for brevity):
username
tom
password
insecure
Similarly, if you change any other parts of the HTTP request the crud.xpl
receives, like the port, remote address, or anything else, those values will be
changed in the request infoset.
I recommend you add a debug attribute to your request generator and then
execute crud.xpl with different HTTP requests, whilst watching the output of
orbeon.log to see how the XML changes.
/request
Now if what you're actually trying to achieve is an authentication mechanism, I
have had success by reading session parameters in XPL using the scope-generator
processor. In my application a Struts action handles the authentication against
LDAP and writes a parameter isValid into the session if the authentication is
successful. Any pipelines that need to be authenticated are able to read from
the session and check for that value:
isValid
session
application
Hope that helps,
Tom
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Can-anyone-tell-me-where-this-file-will-be-whats-the-name-of-this-tp3341219p3341548.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
Please do not print this email unless it is absolutely
necessary.
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com
--
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
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
Free forum by Nabble | Edit this page |