[java-opensaml] 07/09: IDP-2352: SOAP client wiring references old bean ID
Scott Cantor
cantor.2 at osu.edu
Thu Mar 13 18:41:58 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-5.1
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=268384b30e43574df364be0bfbf10f6def58adf1
commit 268384b30e43574df364be0bfbf10f6def58adf1
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri Jan 31 20:07:33 2025 -0500
IDP-2352: SOAP client wiring references old bean ID
MessageHandlers became initializable in 5.x. So need to init the body
handler impl that is created in code within the SAML SOAP decoders.
---
.../decoding/impl/HttpClientResponseSOAP11Decoder.java | 12 +++++++++++-
.../decoding/impl/HttpClientResponseSOAP11Decoder.java | 12 +++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
index d62c87f42..ead85928d 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
@@ -20,6 +20,7 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.decoder.MessageDecodingException;
import org.opensaml.saml.common.SAMLObject;
+import org.opensaml.saml.common.SAMLRuntimeException;
import org.opensaml.saml.common.binding.BindingDescriptor;
import org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder;
import org.opensaml.saml.common.binding.impl.SAMLSOAPDecoderBodyHandler;
@@ -28,6 +29,7 @@ import org.opensaml.saml.common.xml.SAMLConstants;
import org.slf4j.Logger;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
+import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.primitive.LoggerFactory;
/**
@@ -47,7 +49,15 @@ public class HttpClientResponseSOAP11Decoder
* Constructor.
*/
public HttpClientResponseSOAP11Decoder() {
- setBodyHandler(new SAMLSOAPDecoderBodyHandler());
+ final SAMLSOAPDecoderBodyHandler bodyHandler = new SAMLSOAPDecoderBodyHandler();
+ try {
+ bodyHandler.initialize();
+ } catch (ComponentInitializationException e) {
+ // This handler init can't really fail, but we need to handle
+ // without changing the ctor signature by adding a checked exception
+ throw new SAMLRuntimeException("Error initializing SOAP decoder body handler", e);
+ }
+ setBodyHandler(bodyHandler);
setProtocolMessageLoggerSubCategory("SAML");
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
index 097cb00e9..8564e469f 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/impl/HttpClientResponseSOAP11Decoder.java
@@ -20,6 +20,7 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.decoder.MessageDecodingException;
import org.opensaml.saml.common.SAMLObject;
+import org.opensaml.saml.common.SAMLRuntimeException;
import org.opensaml.saml.common.binding.BindingDescriptor;
import org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder;
import org.opensaml.saml.common.binding.impl.SAMLSOAPDecoderBodyHandler;
@@ -28,6 +29,7 @@ import org.opensaml.saml.common.xml.SAMLConstants;
import org.slf4j.Logger;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
+import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.primitive.LoggerFactory;
/**
@@ -47,7 +49,15 @@ public class HttpClientResponseSOAP11Decoder
* Constructor.
*/
public HttpClientResponseSOAP11Decoder() {
- setBodyHandler(new SAMLSOAPDecoderBodyHandler());
+ final SAMLSOAPDecoderBodyHandler bodyHandler = new SAMLSOAPDecoderBodyHandler();
+ try {
+ bodyHandler.initialize();
+ } catch (ComponentInitializationException e) {
+ // This handler init can't really fail, but we need to handle
+ // without changing the ctor signature by adding a checked exception
+ throw new SAMLRuntimeException("Error initializing SOAP decoder body handler", e);
+ }
+ setBodyHandler(bodyHandler);
setProtocolMessageLoggerSubCategory("SAML");
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list