Hi,

I have :

CAS Client version 3.1
CAS Server version 3.2
Server tomcat : 5.5.25

I’ve tried to get Saml11TicketValidationFilter working but I got Exception :


Exception in thread "main" java.lang.NumberFormatException: For input
string: ""
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:468)
        at java.lang.Integer.parseInt(Integer.java:497)
        at org.opensaml.SAMLResponse.fromDOM(SAMLResponse.java:155)
        at org.opensaml.SAMLResponse.<init>(SAMLResponse.java:124)
        at
org.jasig.cas.client.validation.Saml11TicketValidator.parseResponseFromServer(Saml11TicketValidator.java:41)



So I’ve debugged client & server and I’ve found 2 bugs I think.

If in org.jasig.cas.client.validation.Saml11TicketValidator
retrieveResponseFromServer(final URL validationUrl, final String ticket) you
have :

conn.setRequestMethod("POST");

on server side in SamlService createServiceFrom (
        final HttpServletRequest request, final HttpClient httpClient)

you can’t call :

request.getParameter(CONST_PARAM_SERVICE);
requestBody = getRequestBody(request);

because requestBody will be/could be empty see : 
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#getParameter(java.lang.String)

I’ve change the order and it looked better, but I still was getting error
above. The problem was this time the SAML message. I’ve commented in 2 lines
in Saml10SuccessResponseView :

//            response.getWriter().print("<SOAP-ENV:Envelope
xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\";><SOAP-ENV:Header/><SOAP-ENV:Body>");
            response.getWriter().print(xmlResponse);
//           
response.getWriter().print("</SOAP-ENV:Body></SOAP-ENV:Envelope>");

I’ve done the same in Saml10FailureResponseView

Everything works fine now.

Anna
-- 
View this message in context: 
http://www.nabble.com/CAS-Server-3.2-Final-tp15568217p15708759.html
Sent from the CAS Dev mailing list archive at Nabble.com.

_______________________________________________
cas-dev mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas-dev

Reply via email to