<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 11/12/15 10:57 AM, Cantor, Scott
wrote:<br>
</div>
<blockquote cite="mid:6B62EB32-2BFF-4EF3-8946-B1B182F0A6D0@osu.edu"
type="cite">
<pre wrap="">On 11/12/15, 9:31 AM, "dev on behalf of Marvin Addison" <a class="moz-txt-link-rfc2396E" href="mailto:dev-bounces@shibboleth.netonbehalfofmarvin.addison@gmail.com"><dev-bounces@shibboleth.net on behalf of marvin.addison@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The parse issue discussed in a recent users thread [1] is really biting us hard at Virginia Tech. Spring Security versions as recent at 3.2.5.RELEASE are affected, and we have lots of SS integrations here. That has prompted research into adding a configuration option to force the SOAP envelope namespace prefix to be what the CAS client expects, SOAP-ENV. I did some recon, but simply don't see a way to control that. Can one of our OpenSAML experts point me in the right direction to investigate further?
</pre>
</blockquote>
<pre wrap="">
IIRC when you use an XMLObjectBuilder, there's a buildObject variant to specify the entire element, including the prefix.</pre>
</blockquote>
<br>
Yes. I just tested it out to make sure that it works as intended.
Be aware that you do have to specify the custom prefix on *all* the
affected elements, e.g. both the Envelope and Body (and Header if
you have that). <br>
<br>
Something like this should work (or you can use builder instances
directly instead of using the XMLObjectSupport method.<br>
<br>
<tt> String customPrefix = "SOAP-ENV";</tt><tt><br>
</tt><tt> QName envelopeName = new QName(SOAPConstants.SOAP11_NS,
Envelope.DEFAULT_ELEMENT_LOCAL_NAME, customPrefix);</tt><tt><br>
</tt><tt> QName bodyName = new QName(SOAPConstants.SOAP11_NS,
Body.DEFAULT_ELEMENT_LOCAL_NAME, customPrefix);</tt><tt><br>
</tt><tt> </tt><tt><br>
</tt><tt> Envelope envelope = (Envelope)
XMLObjectSupport.buildXMLObject(envelopeName);</tt><tt><br>
</tt><tt> envelope.setBody((Body)
XMLObjectSupport.buildXMLObject(bodyName));</tt><tt><br>
</tt><br>
<br>
We consciously don't expose XML namespace prefixes as a directly
configurable option in the library, because code (like the stuff in
question here) that can't deal with with arbitrary prefixes is just
broken, and we're not going to complicate the library for something
that is, or should be, a non-problem.<br>
<br>
But regarding this, just curious: I thought this was fixed in newer
versions of the CAS client, and the workaround was just dropping in
a newer version of the CAS client jar. B/c Walter said in the
original thread:<br>
<br>
<blockquote type="cite"><br>
I ran in to this problem with a couple of applications. In every
case, it was easily <br>
solved by updating the "CAS Client for Java" jar to a recent
version.</blockquote>
<br>
<br>
... and others said they did that and it worked fine for them. Do I
infer that is not possible in all cases? IMHO it's preferable to
fix the broken software than the other way around.<br>
<br>
<br>
</body>
</html>