Thanks Alex, I have that working now.

However, having got over that hurdle I now have another problem. We have the following code to get the user from a request:

<p:processor name="oxf:request">
<p:input name="config">
<config>
<include>/request/headers/header[name = 'authorization']/value</include>
</config>
</p:input>
<p:output name="data" id="request"/>
</p:processor>
<p:processor name="oxf:xslt-2.0">
<p:input name="data" href="#request"/>
<p:input name="config">
<username xsl:version="2.0" xmlns:base64="java:org.orbeon.oxf.util.Base64" xmlns:string="java:java.lang.String" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xsl:variable name="base64-user-basic" as="xs:string" select="/request/headers/header/value"/>
<xsl:variable name="base64-user" as="xs:string" select="tokenize($base64-user-basic, ' ')[2]"/>
<xsl:variable name="user" as="xs:string" select="string:new(base64:decode($base64-user))"/>
<xsl:value-of select="tokenize($user, ':')[1]"/>
</username>
</p:input>
<p:output name="data" id="username"/>
</p:processor>


This code no longer works, the exception below being thrown.

Type class org.orbeon.oxf.common.ValidationException
Message oxf:/common-xpl/get-user-info.xpl, line 0, column 0 : Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() : oxf:/common-xpl/get-user-info.xpl, line 0, column 0: Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new()



Line 39 is this one BTW:
<xsl:variable name="user" as="xs:string" select="string:new(base64:decode($base64-user))"/>


I am completely stumped as to why this might be happening...

David Sinclair.


------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to