<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 4/26/17 12:47 PM, Locatelli da
Silva, Thiago wrote:<br>
</div>
<blockquote type="cite"
cite="mid:D52647EC.D470%25thiago.locatellidasilva@transamerica.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>By any chance, does anyone know what I am doing wrong?</div>
<div><br>
</div>
<div><a
href="http://stackoverflow.com/questions/43636869/error-exception-while-marshalling-signed-and-encrypted-response-opensaml-v3"
moz-do-not-send="true">http://stackoverflow.com/questions/43636869/error-exception-while-marshalling-signed-and-encrypted-response-opensaml-v3</a></div>
<br>
</blockquote>
<br>
I can't see anything obviously wrong with what you are doing. I
suspect that the issue might lie with what you are doing *before*
the code you posted there, such as when/how you are encrypting the
Assertion and then adding the EncryptedAssertion to the Response;
how those XMLObjects are all being constructed, and so on.<br>
<br>
I can state with certainty that it does in general work, as we do
this very thing in the Shibboleth IdP. In case it's helpful, here
is the OpenSAML profile action component which encrypts Assertions
and adds them to the Response, which is used in the IdP for this
purpose:<br>
<br>
<a class="moz-txt-link-freetext" href="https://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/EncryptAssertions.java;hb=HEAD">https://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/EncryptAssertions.java;hb=HEAD</a><br>
<br>
It's possible you've got something in the wrong order? Or possibly
you've hit some unknown bug in the OpenSAML code. It might also be
an issue with the XML DOM/JAXP impl you're using. What Java
platform/vendor/version are you on? Have you done anything special
around DOM processing config, like endorse a custom Xerces or
anything like that? Or are you just using the JAXP impl that is
internal to your JRE?<br>
</body>
</html>