cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-3113) Meaningful Exception for HTTP Exceptions
Date Wed, 05 Apr 2017 15:04:41 GMT

     [ https://issues.apache.org/jira/browse/CXF-3113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-3113.
------------------------------
       Resolution: Not A Problem
    Fix Version/s: Invalid

The JAX-WS spec dictates the exception for this and the root causes are available if needed.

> Meaningful Exception for HTTP Exceptions
> ----------------------------------------
>
>                 Key: CXF-3113
>                 URL: https://issues.apache.org/jira/browse/CXF-3113
>             Project: CXF
>          Issue Type: Improvement
>          Components: Transports
>    Affects Versions: 2.2.11
>            Reporter: S├ębastien
>            Priority: Minor
>             Fix For: Invalid
>
>         Attachments: com.bsb.sf.sample.service.math.ws.HelloWorldWebServiceTestIt.txt
>
>
> In one of my unit tests, 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:
> {code}
>     <sec:authentication-provider>
>         <sec:user-service>
>             <sec:user name="myUser" password="password" authorities="ROLE_USER"/>
>         </sec:user-service>
>     </sec:authentication-provider>
>     <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"/>
>     </sec:http>
> {code}
> That request may also affect CXF 2.3 (I've only tried on 2.2.11).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message