cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien (JIRA) <>
Subject [jira] Created: (CXF-3113) Meaningful Exception for HTTP Exceptions
Date Mon, 08 Nov 2010 10:03:15 GMT
Meaningful Exception for HTTP Exceptions

                 Key: CXF-3113
             Project: CXF
          Issue Type: Improvement
          Components: Transports
    Affects Versions: 2.2.11
            Reporter: S├ębastien
            Priority: Minor

In one of my unit test, a client interacts with a basic-authentication-protected web service.
If the authentication fails (an HTML 401 error page is displayed) the client receives a web
service exception caused by an IOException caused by a HTTPRetryException. But, there is no
programmatic way to know the cause. *This test illustrates a global issue: identifying the
HTTP error code*.

It could be interesting to have a web service exception containing an exception describing
the HTTP error code and the message. Like that third party clients can identify the origin
of the exception and eventually (through the usage of interceptors) throw a meaningful exception.

I'm using Spring security, this is my configuration:
            <sec:user name="myUser" password="password" authorities="ROLE_USER"/>

    <sec:http auto-config="true">
        <sec:http-basic />

        <!-- Anonymous clients are authorized to get WSDLs. -->
        <sec:intercept-url method="GET" pattern="/services/*" access="IS_AUTHENTICATED_ANONYMOUSLY"/>

        <!-- Anonymous clients are authorized to see the service list. -->
        <sec:intercept-url method="GET" pattern="/services" access="IS_AUTHENTICATED_ANONYMOUSLY"/>

        <!-- Web services and servlets require any authenticated user. -->
        <sec:intercept-url pattern="/services/**" access="ROLE_USER"/>

That request may also affect CXF 2.3 (I've only tried on 2.2.11).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message