Rearranged the SAML Failure again.
authordousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 12 Jun 2002 19:07:11 +0000 (19:07 +0000)
committerdousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 12 Jun 2002 19:07:11 +0000 (19:07 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@90 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AASaml.java
src/edu/internet2/middleware/shibboleth/aa/AAServlet.java

index 2fded93..00209ee 100755 (executable)
@@ -111,4 +111,10 @@ public class AASaml {
            binding.respond(resp,sResp,ourSE);      
        }
     }
+
+    public void fail(HttpServletResponse resp, SAMLException exception)
+       throws IOException{
+
+       binding.respond(resp, null, exception);
+    }
 }
index c32576c..8fe72d8 100755 (executable)
@@ -91,16 +91,23 @@ public class AAServlet extends HttpServlet {
 
            attrs = responder.getReleaseAttributes(uidSyntax, handle, shar, resource);
            System.err.println("AA debug: got attributes");
+           saml.respond(resp, attrs, null);
 
        }catch (org.opensaml.SAMLException se) {
-           ourSE = se;
-           
+           try{
+               saml.fail(resp, new SAMLException(null, "AA got a SAML Exception: "+se));
+           }catch(Exception ee){
+               throw new ServletException("AA failed to even make a SAML Failure message because "+ee+"  Origianl problem: "+se);
+           }
            //  }catch (HandleException he) {
            //      ourSE = new org.opensaml.SAMLException(org.opensaml.SAMLException.RESPONDER,"Bad Handle or Handle Service Problem: "+he);
        }catch (Exception e) {
-           ourSE = new org.opensaml.SAMLException(org.opensaml.SAMLException.RESPONDER,"AA Failed with: "+e);
-       }finally{
-           saml.respond(resp, attrs, ourSE);
+           try{
+               saml.fail(resp, new SAMLException(null, "AA got an Exception: "+e));
+           }catch(Exception ee){
+               throw new ServletException("AA failed to even make a SAML Failure message because "+ee+"  Origianl problem: "+e);
+           }
+
        }
     }