12.07.2015 Views

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Result ClassInterpret a Result ObjectEach result object and its Facility/Severity/Status combination are representedby a unique value. These unique values are associated with predefinedconstants defined in the SmApiResult class—<strong>for</strong> example,SERVER_CONFIGURATION_FAILURE.To determine the Facility/Severity/Status in<strong>for</strong>mation <strong>for</strong> a result, you cancall the equals() method to compare the returned SmApiResult object with theresult constants.■■Facility: FACILITY_CONNECTIONSeverity: SEVERITY_ERROR■ Status: 4■Message: Unable to get server configurationYou can output a result object as a string—<strong>for</strong> example, you can generate aresult string by calling toString() on the SmApiResult object.A result string has five space-separated name/value pairs in the following<strong>for</strong>mat:[facility=facility severity=severity reason=reasonstatus=statusCode message=message]For example, suppose you call toString() <strong>for</strong> an SmApiResult object that occursbecause a user attempted to create a password with fewer than the minimumnumber of alphabetic characters. The method might return a result string thatlooks like this:[facility=4 severity=3 reason=1008 status=13 message=nArg=1,Arg1=3]The fields in the result have the following meanings:■■■facility=4. The result originated on the server.severity=3. The result is an error.reason=1008. The error occurred because the requested password hasfewer than the minimum number of alphabetic characters required <strong>for</strong>passwords.28 <strong>Developer's</strong> <strong>Guide</strong> <strong>for</strong> <strong>Java</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!