some added logging
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 11 Sep 2007 01:14:37 +0000 (01:14 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 11 Sep 2007 01:14:37 +0000 (01:14 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2381 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/AbstractSAMLProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOEndpointSelector.java

index 8439489..6c09293 100644 (file)
@@ -26,6 +26,7 @@ import org.opensaml.common.IdentifierGenerator;
 import org.opensaml.common.binding.decoding.SAMLMessageDecoder;
 import org.opensaml.common.binding.encoding.SAMLMessageEncoder;
 import org.opensaml.log.Level;
+import org.opensaml.saml2.metadata.Endpoint;
 import org.opensaml.saml2.metadata.provider.MetadataProvider;
 import org.opensaml.ws.message.encoder.MessageEncodingException;
 import org.opensaml.ws.transport.InTransport;
@@ -226,8 +227,16 @@ public abstract class AbstractSAMLProfileHandler extends
         }
 
         try {
+            Endpoint peerEndpoint = requestContext.getPeerEntityEndpoint();
+            if(peerEndpoint == null){
+                log.error("No return endpoint available for relying party " + requestContext.getInboundMessageIssuer());
+                throw new ProfileException("No peer endpoint available to which to send SAML response");
+            }
+            
             SAMLMessageEncoder encoder = getMessageEncoders().get(requestContext.getPeerEntityEndpoint().getBinding());
             if (encoder == null) {
+                log.error("No outbound message encoder configured for binding "
+                        + requestContext.getPeerEntityEndpoint().getBinding());
                 throw new ProfileException("No outbound message encoder configured for binding "
                         + requestContext.getPeerEntityEndpoint().getBinding());
             }
index 184e20e..46cc57d 100644 (file)
@@ -92,6 +92,9 @@ public class ShibbolethSSOEndpointSelector extends BasicEndpointSelector {
             }
         }
 
+        if(log.isDebugEnabled()){
+            log.debug("No endpoint meets selection criteria for SAML entity " + getEntityMetadata().getEntityID());
+        }
         return null;
     }
 }
\ No newline at end of file