Hi

What version are you testing ?
I think this issue has been fixed as part of
https://issues.apache.org/jira/browse/CXF-6252

and the test should pass with CXF 3.0.4

Cheers, Sergey

On 05/05/15 07:11, ellen wrote:
Hi all,

I'm watching and testing CXF with jaxrs spec.

When using invocation, I see here is a document said:
"Note that calling the Future.get() method on the returned Future instance
may throw an ExecutionException that *wraps a ProcessingException* thrown in
case of an invocation /processing failure/"

But when I test it by using a non-exist url, cxf doesn't report
ProcessingException to me, still doesn't warp . I think this should be an
issue.

Here is my sample test:

        public static void main(String[] args) {

                Client client = ClientBuilder.newClient();
                WebTarget target = client.target("/http://test.test/";);
                Invocation.Builder builder = target.request();
                Entity<String> entity = Entity.entity("submitGenericTypeTest",
MediaType.WILDCARD_TYPE);
                Invocation invocation = builder.buildPost(entity);
                Future<String> future = invocation.submit(new 
GenericType<String>() {
                });
                
                try {
                        future.get();
                } catch (Exception e) {
                        System.out.println(e.getCause());
                }
        }

you can test without any config.

The result is:
java.net.UnknownHostException: UnknownHostException invoking
http://test.test: test.test

You can see the UnknownHostException is not wrapped as ProcessingException.

Thanks! :)



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Does-not-follow-spec-throw-ProcessingException-if-an-invocation-processing-failure-tp5756972.html
Sent from the cxf-user mailing list archive at Nabble.com.



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to