oopss, actually need to set the endpoint on the encoder for it to work
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 3 Jul 2007 20:57:09 +0000 (20:57 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 3 Jul 2007 20:57:09 +0000 (20:57 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2288 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java

index 1bdc85c..5e2e31d 100644 (file)
@@ -432,14 +432,17 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
             log.debug("Encoding response to SAML request from relying party " + requestContext.getRelyingPartyId());
         }
 
+        Endpoint relyingPartyEndpoint;
+
         BasicEndpointSelector endpointSelector = new BasicEndpointSelector();
         endpointSelector.setEndpointType(AssertionConsumerService.DEFAULT_ELEMENT_NAME);
         endpointSelector.setMetadataProvider(getMetadataProvider());
         endpointSelector.setRelyingParty(requestContext.getRelyingPartyMetadata());
         endpointSelector.setRelyingPartyRole(requestContext.getRelyingPartyRoleMetadata());
         endpointSelector.setSamlRequest(requestContext.getSamlRequest());
-        endpointSelector.getSupportedIssuerBindings().addAll(getMessageEncoderFactory().getEncoderBuilders().keySet());
-        Endpoint relyingPartyEndpoint = endpointSelector.selectEndpoint();
+        endpointSelector.getSupportedIssuerBindings().addAll(
+                getMessageEncoderFactory().getEncoderBuilders().keySet());
+        relyingPartyEndpoint = endpointSelector.selectEndpoint();
 
         if (relyingPartyEndpoint == null) {
             log.error("Unable to determine endpoint, from metadata, for relying party "
@@ -450,7 +453,7 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
 
         MessageEncoder<ServletResponse> encoder = getMessageEncoderFactory().getMessageEncoder(
                 relyingPartyEndpoint.getBinding());
-
+        encoder.setRelyingPartyEndpoint(relyingPartyEndpoint);
         super.populateMessageEncoder(encoder);
         ProfileResponse<ServletResponse> profileResponse = requestContext.getProfileResponse();
         encoder.setResponse(profileResponse.getRawResponse());