View Full Version : servlet context issues w/php

02-09-2010, 06:20 PM
I'm not sure if this is a Resin issue, or a Quercus issue.

We're trying to use Quercus in it's role as a JSR-223 compatible scripting language (as opposed to using it for hosting PHP applications within Java).

Specifically, we're trying to use Quercus to allow us to script the creation of Shibboleth attributes, as described at..


I'm not really a java guy, so I don't have a great grasp of what's going on, but, the shib developers said..

The JSR-223 APIs have you pass in a processing context in to the script execution engine. This context contains a map where the keys are the attribute IDs and the values are the created objects. The keys then get changed in to variables within the script.

I can create the object just fine. My code can access other objects passed into it.. but when the code is finished executing, the objects that I've modified don't get passed back out to the application that invoked them.

import edu.internet2.middleware.shibboleth.common.attribu te.provider.BasicAt
$myString = $givenName->getValues()->get(0) . "'s value";
$phpAttr = new BasicAttribute("phpAttr");

I'm not sure if this is a bug in Quercus, or perhaps a configurable option.
It works as expected w/ ECMAScript, JRuby and Jython (the modified values are available back in shibboleth when the scripts in those other languages finish executing).

any help would be greatly appreciated