HI

On Sat, May 29, 2010 at 11:59 PM, vanyatka <[email protected]> wrote:

>
> Hey,
>
> Just ran into the problem of testing endpoint when the endpoint method
> should throw business exception. In the Integration Test I have to catch &
> verify this exception. To my frustration, the call on the endpoint does not
> throw desired exception, but rather
>
> java.lang.ClassCastException: java.lang.Class cannot be cast to
> javax.ws.rs.core.Response
>
> The endpoint configuration (client test side) is done via Spring, as
> follows:
>
>    <jaxrs:client id="helloWorldEndpoint"
>        address="${jetty.url}"
>        serviceClass="endpoint.HelloWorldEndpointImpl">
>    </jaxrs:client>
>
>
> In the business scenario when endpoint finishes normally, the test works
> fine, endpoint returns Response object.
>
> Tried to register ResponseExceptionMapper, but no avail, ClassCastException
> issue persists.
>
> Any suggestions on what could be the matter and how to make IT tests handle
> exceptions in endpoints are very welcome :thinking:
>
>
What is the signature of the method in "endpoint.HelloWorldEndpointImpl"
which is being tested ?
How does the stack trace look like and what CXF version you're using ?
cheers, Sergey





> -Ivan
> --
> View this message in context:
> http://old.nabble.com/ClassCastException-prevents-thorough-endpoint-testing-tp28719118p28719118.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to