Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: vijaysr
Reporter: tony_robertson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

WebServiceContextImpl.getUserPrincipal throws IllegalStateException in cases when it should just return null

Created: 21/Mar/06 09:57 PM   Updated: 30/Nov/10 05:20 PM   Resolved: 24/Mar/06 05:05 PM
Component/s: web_services
Affects Version/s: 9.0pe
Fix Version/s: 9.0pe_dev

Time Tracking:
Not Specified


Issuezilla Id: 455
Participants: tony_robertson and vijaysr

 Description  « Hide

According to the API docs for,
the "getUserPrincipal" method should return null when the user has not been
authenticated, and should only throw "IllegalStateException" if the method is
called while no request is being serviced.

The implementation in com.sun.enterprise.webservice.WebServiceContextImpl
actually throws the IllegalStateException for the case above where it should be
returning null.

The code is trying to get the user principal from the HttpServletRequest, if
there is one, and otherwise from the directly set principal (for EJB3
endpoints) if that is set. However, if there IS an HttpServletRequest, but
just no authenticated user, the method should return null rather than throwing
the exception at the last line.

vijaysr added a comment - 24/Mar/06 09:25 AM

chaning owner

vijaysr added a comment - 24/Mar/06 09:29 AM


vijaysr added a comment - 24/Mar/06 05:05 PM

fixed in GF build 42