<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 4/2/15 12:36 PM, Brent Putman wrote:<br>
</div>
<blockquote cite="mid:551D700A.4060206@georgetown.edu" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<br>
The general way to access subcontexts in the tree from a resolver
script is also documented there in the wiki. I can't test
off-hand, but I think the scripted variant for your question
should be something like the following:<br>
<br>
<tt>clazloader = resolutionContext.getClass().getClassLoader();</tt><tt><br>
</tt><tt><br>
bindingContextClass =
clazloader.loadClass("org.opensaml.saml.common.messaging.context.SAMLBindingContext");</tt><tt><br>
</tt><tt><br>
relayState =
resolutionContext.getInboundMessageContext().getSubcontext(bindingContextClass).getRelayState();</tt><tt><br>
</tt><tt> </tt><br>
</blockquote>
<br>
<br>
Actually, I thought Scott had added an overloaded String-based way
of getting at subcontexts, and I do see it there in BaseContext. So
you could try a slightly simpler approach, could even be a (longish)
one-liner:<br>
<br>
<tt><br>
relayState =
resolutionContext.getInboundMessageContext().getSubcontext(</tt><tt><tt>"org.opensaml.saml.common.messaging.context.SAMLBindingContext"</tt>).getRelayState();</tt><tt><br>
</tt><tt> </tt> <br>
<br>
Assuming that works, we will update the Scripted attribute wiki
page, since it still documents the old way of having to get a Class
literal. The latter is obviously inconvenient in resolver scripts,
as well as views.<br>
</body>
</html>