<p:param type="input" name="instance"/>

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

<p:param type="input" name="instance"/>

smaran

Hi All, 

<p:param type="input" name="instance"/>

What does this indicate?can any one let me know

smaran

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

Re: <p:param type="input" name="instance"/>

fl.schmitt(ops-users)
Smaran,

> <p:param type="input" name="instance"/>
>
> What does this indicate?can any one let me know

i suppose it's a fragment of a XPL pipelines. It defines an input
parameter passed to that pipeline:

http://www.orbeon.com/orbeon/doc/reference-xpl-pipelines#param

HTH
florian





--
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: <p:param type="input" name="instance"/>

smaran
Hi All,
Can you tell me
<xforms:action if="xxforms:property('oxf.fr.authentication.method') = 'container'">
            <!-- Case where we get the username and roles from the container -->
            <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'username']/@value" value="xxforms:get-remote-user()"/>
            <xforms:message level="xxforms:log-debug">Roles: <xforms:output value="xxforms:property('oxf.fr.authentication.container.roles')"/></xforms:message>
            <xforms:action xxforms:iterate="tokenize(xxforms:property('oxf.fr.authentication.container.roles'), '\s+')">
                <xxforms:variable name="role" select="."/>
                <xforms:action if="xxforms:is-user-in-role($role)">
                    <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'roles']/@value" value="if (. = '') then $role else concat(., ' ', $role)"/>
                </xforms:action>
            </xforms:action>
        </xforms:action>


From where the username its expecting
smarna

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 2:24 PM
To: [hidden email]
Subject: [ops-users] Re: <p:param type="input" name="instance"/>

Smaran,

> <p:param type="input" name="instance"/>
>
> What does this indicate?can any one let me know

i suppose it's a fragment of a XPL pipelines. It defines an input parameter passed to that pipeline:

http://www.orbeon.com/orbeon/doc/reference-xpl-pipelines#param

HTH
florian




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

Re: RE: Re: <p:param type="input" name="instance"/>

fl.schmitt(ops-users)
Smaran,

> Can you tell me
> <xforms:action if="xxforms:property('oxf.fr.authentication.method') = 'container'">
>             <!-- Case where we get the username and roles from the container -->
>             <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'username']/@value" value="xxforms:get-remote-user()"/>
>             <xforms:message level="xxforms:log-debug">Roles: <xforms:output value="xxforms:property('oxf.fr.authentication.container.roles')"/></xforms:message>
>             <xforms:action xxforms:iterate="tokenize(xxforms:property('oxf.fr.authentication.container.roles'), '\s+')">
>                 <xxforms:variable name="role" select="."/>
>                 <xforms:action if="xxforms:is-user-in-role($role)">
>                     <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'roles']/@value" value="if (. = '') then $role else concat(., ' ', $role)"/>
>                 </xforms:action>
>             </xforms:action>
>         </xforms:action>
>
>
> From where the username its expecting
i suppose the important line is

<xforms:setvalue ref="instance('fr-authentication-headers')/header[@name
= 'username']/@value" value="xxforms:get-remote-user()"/>

It tries to determine the user using the function
xxforms:get-remote-user(). (1)

If the function doesn't return a user name, it's most likely that the
request doesn't contain authentication data, maybe because the requested
resource didn't require authentication. So, to narrow down the problem i
would start with the tomcat configuration - is authentication set up
correctly, does the request fail if no authentication information is
given? Using, for example, an AccessLogValve (2) could be useful to
determine if a remote user was authenticated (using u%).

HTH
florian

(1)
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:get-remote-user-
(2)
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve




--
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: <p:param type="input" name="instance"/>

smaran
Hi,
I use the sample application '/java-authentication/' for user authentication.

________________________________________
tomcat-user.xml (Users in Tomcat)

<tomcat-users>
    <role rolename="orbeon-admin"/>
    <user name="orbeon" password="orbeon" roles="orbeon-admin"/>
</tomcat-users>
________________________________________
web.xml

...
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Orbeon Builder</web-resource-name>
            <url-pattern>/fr/orbeon/builder/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>orbeon-admin</role-name>
        </auth-constraint>
    </security-constraint>
       
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/java-authentication/login</form-login-page>
            <form-error-page>/java-authentication/login-error</form-error-page>
        </form-login-config>
    </login-config>
       
    <security-role>
        <role-name>orbeon-admin</role-name>
    </security-role>
...

Trying to access the list of forms of 'Orbeon Builder' (which is shown by 'Orbeon Runner') http://[localhost]/orbeon/fr/orbeon/builder/summary, goes to the authentication form in the url '/java-authentication/', right, is the expected behavior, once authenticated, is once again the summary page of 'Orbeon Builder ".

- Image: Login Form by the app '/java-authentication/
- Image: User info displayed by the app '/java-authentication/'
- Image: Session in Tomcat for the user authenticated (smaran)
- Image: Details of the session in Tomcat for the user

So far all right, but although there is an authenticated user in the context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no reference to the user, or when you create or modify forms, data is not saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains empty although there is an authenticated user.

Why this is happening.
Regards,
Smaran

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 3:38 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

> Can you tell me
> <xforms:action if="xxforms:property('oxf.fr.authentication.method') = 'container'">
>             <!-- Case where we get the username and roles from the container -->
>             <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'username']/@value" value="xxforms:get-remote-user()"/>
>             <xforms:message level="xxforms:log-debug">Roles: <xforms:output value="xxforms:property('oxf.fr.authentication.container.roles')"/></xforms:message>
>             <xforms:action xxforms:iterate="tokenize(xxforms:property('oxf.fr.authentication.container.roles'), '\s+')">
>                 <xxforms:variable name="role" select="."/>
>                 <xforms:action if="xxforms:is-user-in-role($role)">
>                     <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'roles']/@value" value="if (. = '') then $role else concat(., ' ', $role)"/>
>                 </xforms:action>
>             </xforms:action>
>         </xforms:action>
>
>
> From where the username its expecting
i suppose the important line is

<xforms:setvalue ref="instance('fr-authentication-headers')/header[@name
= 'username']/@value" value="xxforms:get-remote-user()"/>

It tries to determine the user using the function xxforms:get-remote-user(). (1)

If the function doesn't return a user name, it's most likely that the request doesn't contain authentication data, maybe because the requested resource didn't require authentication. So, to narrow down the problem i would start with the tomcat configuration - is authentication set up correctly, does the request fail if no authentication information is given? Using, for example, an AccessLogValve (2) could be useful to determine if a remote user was authenticated (using u%).

HTH
florian

(1)
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:get-remote-user-
(2)
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve



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

RE: Re: RE: Re: <p:param type="input" name="instance"/>

smaran
In reply to this post by fl.schmitt(ops-users)
Hi All,
Please see the log below
/orbeon-PE/fr/orbeon/builder/summary
/orbeon-PE/config/theme/orbeon.css
/orbeon-PE/config/smaran/orbeon-logo-trimmed-transparent-60.png
/orbeon-PE/config/theme/images/tab-shadow-top.png
/orbeon-PE/config/theme/images/tab-shadow-left.png
/orbeon-PE/config/theme/images/tabbar-blue.png
/orbeon-PE/j_security_check
/orbeon-PE/fr/service/i18n/fr-resources/orbeon/builder
/orbeon-PE/fr/service/resource/crud/orbeon/builder/form/form.xhtml
/orbeon-PE/fr/service/oracle/search/orbeon/builder
/orbeon-PE/fr/orbeon/builder/summary
/orbeon-PE/apps/fr/style/orbeon-logo-trimmed-transparent-30.png
/orbeon-PE/xforms-server/dynamic/90e91d56c69f3934d8bd91e135d91746
/orbeon-PE/xforms-server
/orbeon-PE/fr/service/resource/crud/orbeon/builder/form/form.xhtml
/orbeon-PE/apps/fr/style/orbeon-logo-trimmed-transparent-30.png
/orbeon-PE/xforms-server/dynamic/90e91d56c69f3934d8bd91e135d91746
/orbeon-PE/fr/orbeon/builder/new
127.0.0.1 - - [07/Mar/2011:16:03:10 +0530] "GET /orbeon-PE/ HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2011:16:03:10 +0530] "GET /orbeon-PE/home/ HTTP/1.1" 200 5708
127.0.0.1 - - [07/Mar/2011:16:03:12 +0530] "GET /orbeon-PE/fr/orbeon/builder/summary HTTP/1.1" 200 8037
127.0.0.1 - - [07/Mar/2011:16:03:15 +0530] "POST /orbeon-PE/j_security_check HTTP/1.1" 302 -
127.0.0.1 - a [07/Mar/2011:16:03:19 +0530] "GET /orbeon-PE/fr/service/i18n/fr-resources/orbeon/builder HTTP/1.1" 200 42809
127.0.0.1 - a [07/Mar/2011:16:03:19 +0530] "GET /orbeon-PE/fr/service/resource/crud/orbeon/builder/form/form.xhtml HTTP/1.1" 200 88847
127.0.0.1 - a [07/Mar/2011:16:03:20 +0530] "POST /orbeon-PE/fr/service/oracle/search/orbeon/builder HTTP/1.1" 200 1614
127.0.0.1 - a [07/Mar/2011:16:03:22 +0530] "GET /orbeon-PE/fr/orbeon/builder/summary HTTP/1.1" 200 84117
127.0.0.1 - - [07/Mar/2011:16:03:22 +0530] "GET /orbeon-PE/apps/fr/style/orbeon-logo-trimmed-transparent-30.png HTTP/1.1" 200 78006
127.0.0.1 - a [07/Mar/2011:16:03:22 +0530] "GET /orbeon-PE/xforms-server/dynamic/90e91d56c69f3934d8bd91e135d91746 HTTP/1.1" 200 78006
127.0.0.1 - a [07/Mar/2011:16:03:54 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 240
127.0.0.1 - a [07/Mar/2011:16:03:54 +0530] "GET /orbeon-PE/fr/service/resource/crud/orbeon/builder/form/form.xhtml HTTP/1.1" 200 88847
127.0.0.1 - - [07/Mar/2011:16:03:57 +0530] "GET /orbeon-PE/apps/fr/style/orbeon-logo-trimmed-transparent-30.png HTTP/1.1" 200 78006
127.0.0.1 - a [07/Mar/2011:16:03:57 +0530] "GET /orbeon-PE/xforms-server/dynamic/90e91d56c69f3934d8bd91e135d91746 HTTP/1.1" 200 78006
127.0.0.1 - a [07/Mar/2011:16:03:57 +0530] "GET /orbeon-PE/fr/orbeon/builder/new HTTP/1.1" 200 199188
127.0.0.1 - a [07/Mar/2011:16:04:01 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 349
127.0.0.1 - a [07/Mar/2011:16:04:02 +0530] "GET /orbeon-PE/fr/service/oracle/crud/orbeon/library/form/form.xhtml HTTP/1.1" 200 -
127.0.0.1 - a [07/Mar/2011:16:04:02 +0530] "GET /orbeon-PE/fr/service/oracle/crud/ds/library/form/form.xhtml HTTP/1.1" 200 -
127.0.0.1 - a [07/Mar/2011:16:04:02 +0530] "GET /orbeon-PE/fr/service/custom/orbeon/builder/toolbox?application=ds HTTP/1.1" 200 97447
127.0.0.1 - a [07/Mar/2011:16:04:02 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 18784
127.0.0.1 - a [07/Mar/2011:16:04:07 +0530] "PUT /orbeon-PE/fr/service/oracle/crud/orbeon/builder/data/a71668ddc7b3cfcad19eed59952fabc6/data.xml HTTP/1.1" 200 590
127.0.0.1 - a [07/Mar/2011:16:04:07 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 1378
127.0.0.1 - a [07/Mar/2011:16:04:08 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 261
127.0.0.1 - a [07/Mar/2011:16:04:10 +0530] "PUT /orbeon-PE/fr/service/oracle/crud/ds/dsds/form/form.xhtml HTTP/1.1" 200 590
127.0.0.1 - a [07/Mar/2011:16:04:10 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 386
127.0.0.1 - a [07/Mar/2011:16:04:12 +0530] "POST /orbeon-PE/xforms-server HTTP/1.1" 200 243

Not sure whts the problem
Regards,
Smaran

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 3:38 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

> Can you tell me
> <xforms:action if="xxforms:property('oxf.fr.authentication.method') = 'container'">
>             <!-- Case where we get the username and roles from the container -->
>             <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'username']/@value" value="xxforms:get-remote-user()"/>
>             <xforms:message level="xxforms:log-debug">Roles: <xforms:output value="xxforms:property('oxf.fr.authentication.container.roles')"/></xforms:message>
>             <xforms:action xxforms:iterate="tokenize(xxforms:property('oxf.fr.authentication.container.roles'), '\s+')">
>                 <xxforms:variable name="role" select="."/>
>                 <xforms:action if="xxforms:is-user-in-role($role)">
>                     <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'roles']/@value" value="if (. = '') then $role else concat(., ' ', $role)"/>
>                 </xforms:action>
>             </xforms:action>
>         </xforms:action>
>
>
> From where the username its expecting
i suppose the important line is

<xforms:setvalue ref="instance('fr-authentication-headers')/header[@name
= 'username']/@value" value="xxforms:get-remote-user()"/>

It tries to determine the user using the function xxforms:get-remote-user(). (1)

If the function doesn't return a user name, it's most likely that the request doesn't contain authentication data, maybe because the requested resource didn't require authentication. So, to narrow down the problem i would start with the tomcat configuration - is authentication set up correctly, does the request fail if no authentication information is given? Using, for example, an AccessLogValve (2) could be useful to determine if a remote user was authenticated (using u%).

HTH
florian

(1)
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:get-remote-user-
(2)
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve



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

Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

fl.schmitt(ops-users)
In reply to this post by smaran
Smaran,

> So far all right, but although there is an authenticated user in the
>  context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no
>  reference to the user, or when you create or modify forms, data is not
>  saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains
>  empty although there is an authenticated user.

it seems that crud.xpl doesn't use the container authentication data;
this may be a bug.

If i understand crud.xpl correctly, the username value is set in line 82
of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64
of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In
both cases, the output of /request/headers/header[name =
'orbeon-username']/value is used, assuming that this header field
contains the user name.

But the name of the authenticated user isn't availbe
in /request/headers/header[name = 'orbeon-username']/value. The path
should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the
sources. The docs of the request generator don't mention a header field
named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37

You could try to change crud.xpl manually to use the name of the
authenticated user as username; i've attached a patch. Since i don't use
SQL persistence, i wasn't able to test i myselft, and i don't know which
other effects may be caused by this chance.

HTH
florian



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

patch.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

smaran
Hi,
After changing the file I am unable to publish the forms.It shows error log as below
2011-03-07 18:09:34,781 INFO  ProcessorService  - /xforms-server - Received request
2011-03-07 18:09:34,890 INFO  ProcessorService  - /fr/service/custom/orbeon/builder/toolbox - Received request
2011-03-07 18:09:35,031 INFO  ProcessorService  - /fr/service/oracle/crud/orbeon/library/form/form.xhtml - Received request
2011-03-07 18:09:35,187 ERROR XSLTTransformer  - Error at line 86 of oxf:/apps/fr/persistence/oracle/crud.xpl:
An empty sequence is not allowed as the value of variable $matcher-groups
2011-03-07 18:09:35,187 ERROR ProcessorService  - Exception at line 86 of oxf:/apps/fr/persistence/oracle/crud.xpl
; SystemID: oxf:/apps/fr/persistence/oracle/crud.xpl; Line#: 86; Column#: -1
org.orbeon.saxon.trans.XPathException: An empty sequence is not allowed as the value of variable $matcher-groups
        at org.orbeon.saxon.expr.CardinalityCheckingIterator.typeError(CardinalityCheckingIterator.java:120)
        at org.orbeon.saxon.expr.CardinalityCheckingIterator.<init>(CardinalityCheckingIterator.java:47)
        at org.orbeon.saxon.expr.CardinalityChecker.iterate(CardinalityChecker.java:171)
        at org.orbeon.saxon.value.MemoClosure.iterate(MemoClosure.java:89)
        at org.orbeon.saxon.value.Value.getIterator(Value.java:202)


Modification I had done for crud.xpl

<p:input name="matcher-groups" href="#matcher-groups"/>
        <p:input name="instance" href="#instance"/>
        <p:input name="request" href="#request"/>
        <p:input name="data"><dummy/></p:input>


<xsl:copy-of select="doc('input:instance')"/>
                 </document>
                 <timestamp><xsl:value-of select="current-dateTime()"/></timestamp>
                <username><xsl:value-of select="$request/headers/header[name = 'orbeon-username']/value"/></username>
                <username><xsl:value-of select="$request/remote-user"/></username>
                 <roles><xsl:value-of select="$request/headers/header[name = 'orbeon-roles']/value"/></roles>
                 <app><xsl:value-of select="$matcher-groups[1]"/></app>
                 <form><xsl:value-of select="$matcher-groups[2]"/></form>


Regards,
Smaran
-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 5:28 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

> So far all right, but although there is an authenticated user in the  
> context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no  
> reference to the user, or when you create or modify forms, data is not  
> saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains  
> empty although there is an authenticated user.

it seems that crud.xpl doesn't use the container authentication data; this may be a bug.

If i understand crud.xpl correctly, the username value is set in line 82 of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64 of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In both cases, the output of /request/headers/header[name = 'orbeon-username']/value is used, assuming that this header field contains the user name.

But the name of the authenticated user isn't availbe in /request/headers/header[name = 'orbeon-username']/value. The path should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the sources. The docs of the request generator don't mention a header field named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37

You could try to change crud.xpl manually to use the name of the authenticated user as username; i've attached a patch. Since i don't use SQL persistence, i wasn't able to test i myselft, and i don't know which other effects may be caused by this chance.

HTH
florian


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

Re: RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

fl.schmitt(ops-users)
Smaran,

i can't help with the error message without knowing the _complete_
crud.xpl. The error contains a line number which is useless without the
complete file.

> <xsl:copy-of select="doc('input:instance')"/>
>                  </document>
>                  <timestamp><xsl:value-of select="current-dateTime()"/></timestamp>
>                 <username><xsl:value-of select="$request/headers/header[name = 'orbeon-username']/value"/></username>
>                 <username><xsl:value-of select="$request/remote-user"/></username>
>                  <roles><xsl:value-of select="$request/headers/header[name = 'orbeon-roles']/value"/></roles>
>                  <app><xsl:value-of select="$matcher-groups[1]"/></app>
>                  <form><xsl:value-of select="$matcher-groups[2]"/></form>

hmm - this fragment shows two username entries, not one. I would
recommend to remove the first username entry containing the reference to
orbeon-username.

HTH
florian




--
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: Re: <p:param type="input" name="instance"/>

smaran
Hi,
Trust me I am struggling from 5 days breaking my head why username is not getting stored in database.
Now I am able to see the user name in data base(got confused with patch you attached which contains username entry twice).Actually I want user-id also to be inserted in database. Like I need to add column userID.Is that possible. If so please tell me where I need to modify the code exactly.so that we can go ahead and close this poc before we purchase your
PE of orbeon
Regards,
Smaran.

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 6:39 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

i can't help with the error message without knowing the _complete_ crud.xpl. The error contains a line number which is useless without the complete file.

> <xsl:copy-of select="doc('input:instance')"/>
>                  </document>
>                  <timestamp><xsl:value-of select="current-dateTime()"/></timestamp>
>                 <username><xsl:value-of select="$request/headers/header[name = 'orbeon-username']/value"/></username>
>                 <username><xsl:value-of select="$request/remote-user"/></username>
>                  <roles><xsl:value-of select="$request/headers/header[name = 'orbeon-roles']/value"/></roles>
>                  <app><xsl:value-of select="$matcher-groups[1]"/></app>
>                  <form><xsl:value-of
> select="$matcher-groups[2]"/></form>

hmm - this fragment shows two username entries, not one. I would recommend to remove the first username entry containing the reference to orbeon-username.

HTH
florian



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

Re: RE: Re: RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

fl.schmitt(ops-users)
Smaran,

> Actually I want  user-id also to be inserted in database. Like I need
>  to add column  userID.Is that possible. If so please tell me where I
>  need to modify  the code exactly.so that we can go ahead and close
>  this poc before we  purchase your PE of orbeon

to guard against misunderstandings, i can't speak for orbeon, i'm just a
simple user trying to assist you. So i can't promise that it's possible
to implement any feature.

Regarding the user ID: the easier part would be to modify the
persistence layer (adapting the db scheme and the crud.xpl). In
crud.xpl, the sql commands are created based on literals and modified
using XSLT. Basically, crud.xpl calls the SQL processor (1), offering a
very flexible way to connect OF with SQL databases. To make an
additional db column accesible, you just could insert another sql:param
element in lines 356-372 of crud.xpl.

But i can't tell you how to handle that data in FormBuilder /
FormRunner, because i don't use FB/FR in my own XForms application, so i
don't know where the data structures are defined inside  FB/FR.

HTH
florian

(1) http://www.orbeon.com/orbeon/doc/processors-sql




--
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: Re: RE: Re: <p:param type="input" name="instance"/>

smaran
Thanks a lot.can you explain me how the flow is going on like from PFC how the crud.xpl is called.
Regards,
Smaran

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 7:33 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

> Actually I want  user-id also to be inserted in database. Like I need  
> to add column  userID.Is that possible. If so please tell me where I  
> need to modify  the code exactly.so that we can go ahead and close  
> this poc before we  purchase your PE of orbeon

to guard against misunderstandings, i can't speak for orbeon, i'm just a simple user trying to assist you. So i can't promise that it's possible to implement any feature.

Regarding the user ID: the easier part would be to modify the persistence layer (adapting the db scheme and the crud.xpl). In crud.xpl, the sql commands are created based on literals and modified using XSLT. Basically, crud.xpl calls the SQL processor (1), offering a very flexible way to connect OF with SQL databases. To make an additional db column accesible, you just could insert another sql:param element in lines 356-372 of crud.xpl.

But i can't tell you how to handle that data in FormBuilder / FormRunner, because i don't use FB/FR in my own XForms application, so i don't know where the data structures are defined inside  FB/FR.

HTH
florian

(1) http://www.orbeon.com/orbeon/doc/processors-sql



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

RE: Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

smaran
In reply to this post by fl.schmitt(ops-users)
Hi,
For Authentication Instead of j_security I had written my own servlet.And I am taking username and password from
User and setting that in request.In crud.xpl I am trying to acess this user name as below.
<include>/request/attributes</include>

  <username><xsl:value-of select="$request/username"/></username>

But user name is stored as null in database can any one correct me whts wrong in my approach.
I am adding the crud.xpl of mine
Reagrds,
Smaran

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]]
Sent: Monday, March 07, 2011 5:28 PM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>

Smaran,

> So far all right, but although there is an authenticated user in the  
> context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no  
> reference to the user, or when you create or modify forms, data is not  
> saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains  
> empty although there is an authenticated user.

it seems that crud.xpl doesn't use the container authentication data; this may be a bug.

If i understand crud.xpl correctly, the username value is set in line 82 of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64 of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In both cases, the output of /request/headers/header[name = 'orbeon-username']/value is used, assuming that this header field contains the user name.

But the name of the authenticated user isn't availbe in /request/headers/header[name = 'orbeon-username']/value. The path should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the sources. The docs of the request generator don't mention a header field named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37

You could try to change crud.xpl manually to use the name of the authenticated user as username; i've attached a patch. Since i don't use SQL persistence, i wasn't able to test i myselft, and i don't know which other effects may be caused by this chance.

HTH
florian


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

crud.xpl (37K) Download Attachment