cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1380723 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/ rt/r...
Date Tue, 04 Sep 2012 16:10:24 GMT
Author: sergeyb
Date: Tue Sep  4 16:10:23 2012
New Revision: 1380723

URL: http://svn.apache.org/viewvc?rev=1380723&view=rev
Log:
[CXF-4455] Removing CXF-specific exception class for reporting client-only errors

Removed:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientWebApplicationException.java
Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/LocalClientState.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthJSONProvider.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
Tue Sep  4 16:10:23 2012
@@ -39,6 +39,7 @@ import java.util.ResourceBundle;
 import java.util.logging.Logger;
 
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.EntityTag;
 import javax.ws.rs.core.HttpHeaders;
@@ -265,7 +266,7 @@ public abstract class AbstractClient imp
         try {
             return state.getResponseBuilder().clone().build();
         } catch (CloneNotSupportedException ex) {
-            throw new ClientWebApplicationException(ex);
+            throw new ClientException(ex);
         }
     }
     
@@ -508,10 +509,10 @@ public abstract class AbstractClient imp
     protected void checkClientException(Message outMessage, Exception ex) throws Exception
{
         Integer responseCode = getResponseCode(outMessage.getExchange());
         if (responseCode == null) {
-            if (ex instanceof ClientWebApplicationException) {
+            if (ex instanceof ClientException) {
                 throw ex;
             } else if (ex != null) {
-                throw new ClientWebApplicationException(ex);
+                throw new ClientException(ex);
             } else if (!outMessage.getExchange().isOneWay() || cfg.isResponseExpectedForOneway())
{
                 waitForResponseCode(outMessage.getExchange());
             }
@@ -528,7 +529,7 @@ public abstract class AbstractClient imp
         }
         
         if (getResponseCode(exchange) == null) {
-            throw new ClientWebApplicationException("Response timeout");
+            throw new ClientException("Response timeout");
         }
     }
     
@@ -644,7 +645,7 @@ public abstract class AbstractClient imp
                                                    cls,
                                                    ct.toString());
         LOG.severe(errorMsg.toString());
-        throw new ClientWebApplicationException(errorMsg.toString(), cause, response);
+        throw new ClientException(errorMsg.toString(), cause);
     }
     
     private static MediaType getResponseContentType(Response r) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
Tue Sep  4 16:10:23 2012
@@ -37,6 +37,7 @@ import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.logging.Logger;
 
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -599,7 +600,7 @@ public class ClientProxyImpl extends Abs
                                                    m.getDeclaringClass().getName(), 
                                                    m.getName());
         LOG.severe(errorMsg.toString());
-        throw new ClientWebApplicationException(errorMsg.toString());
+        throw new ClientException(errorMsg.toString());
     }
     
     // TODO : what we really need to do is to refactor JAXRSOutInterceptor so that

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/LocalClientState.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/LocalClientState.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/LocalClientState.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/LocalClientState.java
Tue Sep  4 16:10:23 2012
@@ -20,6 +20,7 @@ package org.apache.cxf.jaxrs.client;
 
 import java.net.URI;
 
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.UriBuilder;
@@ -60,7 +61,7 @@ public class LocalClientState implements
         try {
             this.responseBuilder = cs.responseBuilder != null ? cs.responseBuilder.clone()
: null;
         } catch (CloneNotSupportedException ex) {
-            throw new ClientWebApplicationException(ex);
+            throw new ClientException(ex);
         }
         this.baseURI = cs.baseURI;
         this.currentBuilder = cs.currentBuilder != null ? cs.currentBuilder.clone() : null;

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java Tue
Sep  4 16:10:23 2012
@@ -30,6 +30,7 @@ import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.EntityTag;
 import javax.ws.rs.core.HttpHeaders;
@@ -808,8 +809,8 @@ public class WebClient extends AbstractC
         } catch (Exception ex) {
             throw ex instanceof WebApplicationException 
                 ? (WebApplicationException)ex 
-                : ex instanceof ClientWebApplicationException 
-                ? new ClientWebApplicationException(ex) : new RuntimeException(ex); 
+                : ex instanceof ClientException 
+                ? new ClientException(ex) : new RuntimeException(ex); 
         }
         
         Response response = null;
@@ -847,8 +848,8 @@ public class WebClient extends AbstractC
             ((ResponseImpl)r).setMessage(outMessage);
             return r;
         } catch (Throwable ex) {
-            throw (ex instanceof ClientWebApplicationException) ? (ClientWebApplicationException)ex
-                                                              : new ClientWebApplicationException(ex);
+            throw (ex instanceof ClientException) ? (ClientException)ex
+                                                  : new ClientException(ex);
         } finally {
             ProviderFactory.getInstance(outMessage).clearThreadLocalProxies();
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Tue
Sep  4 16:10:23 2012
@@ -49,6 +49,7 @@ import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.ws.rs.BadRequestException;
+import javax.ws.rs.ClientErrorException;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.InternalServerErrorException;
 import javax.ws.rs.NotAcceptableException;
@@ -132,12 +133,12 @@ public final class JAXRSUtils {
     static {
         EXCEPTIONS_MAP = new HashMap<Integer, Class<?>>();
         EXCEPTIONS_MAP.put(400, BadRequestException.class);
+        EXCEPTIONS_MAP.put(401, NotAuthorizedException.class);
         EXCEPTIONS_MAP.put(404, NotFoundException.class);
-        EXCEPTIONS_MAP.put(500, InternalServerErrorException.class);
         EXCEPTIONS_MAP.put(405, NotAllowedException.class);
         EXCEPTIONS_MAP.put(406, NotAcceptableException.class);
-        EXCEPTIONS_MAP.put(401, NotAuthorizedException.class);
         EXCEPTIONS_MAP.put(415, NotSupportedException.class);
+        EXCEPTIONS_MAP.put(500, InternalServerErrorException.class);
         EXCEPTIONS_MAP.put(503, ServiceUnavailableException.class);
     }
     
@@ -1246,10 +1247,12 @@ public final class JAXRSUtils {
         Class<?> cls = EXCEPTIONS_MAP.get(status);
         if (cls == null) {
             int family = status / 100;
-            if (family == 5) {
-                cls = ServerErrorException.class;
-            } else if (family == 3) {
+            if (family == 3) {
                 cls = RedirectionException.class;
+            } else if (family == 4) {
+                cls = ClientErrorException.class;
+            } else if (family == 5) {
+                cls = ServerErrorException.class;
             }
         }
         return cls == null ? defaultExceptionType : cls;

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
Tue Sep  4 16:10:23 2012
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.UUID;
 
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.UriBuilder;
 
 import net.oauth.OAuth;
@@ -31,7 +32,6 @@ import net.oauth.OAuthAccessor;
 import net.oauth.OAuthConsumer;
 import net.oauth.OAuthMessage;
 
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.rs.security.oauth.provider.OAuthServiceException;
@@ -172,7 +172,7 @@ public final class OAuthClientUtils {
             }
             return sb.toString();
         } catch (Exception ex) {
-            throw new ClientWebApplicationException(ex);
+            throw new ClientException(ex);
         }
     }
     

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
Tue Sep  4 16:10:23 2012
@@ -24,11 +24,11 @@ import java.net.URI;
 import java.util.Collections;
 import java.util.Map;
 
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 
 import org.apache.cxf.common.util.Base64Utility;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenGrant;
@@ -164,7 +164,7 @@ public final class OAuthClientUtils {
                     String data = consumer.getKey() + ":" + consumer.getSecret();
                     sb.append(Base64Utility.encode(data.getBytes("UTF-8")));
                 } catch (Exception ex) {
-                    throw new ClientWebApplicationException(ex);
+                    throw new ClientException(ex);
                 }
                 accessTokenService.header("Authorization", sb.toString());
             } else {
@@ -180,7 +180,7 @@ public final class OAuthClientUtils {
         try {
             map = new OAuthJSONProvider().readJSONResponse((InputStream)response.getEntity());
         } catch (IOException ex) {
-            throw new ClientWebApplicationException(ex);
+            throw new ClientException(ex);
         }
         if (200 == response.getStatus()) {
             ClientAccessToken token = fromMapToClientToken(map);
@@ -277,7 +277,7 @@ public final class OAuthClientUtils {
             String macSecret = token.getParameters().get(OAuthConstants.MAC_TOKEN_SECRET);
             sb.append(macAuthData.toAuthorizationHeader(macAlgo, macSecret));
         } else {
-            throw new ClientWebApplicationException(new OAuthServiceException("Unsupported
token type"));
+            throw new ClientException(new OAuthServiceException("Unsupported token type"));
         }
         
     }

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthJSONProvider.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthJSONProvider.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthJSONProvider.java
Tue Sep  4 16:10:23 2012
@@ -30,6 +30,7 @@ import java.util.Map;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -37,7 +38,6 @@ import javax.ws.rs.ext.MessageBodyWriter
 import javax.ws.rs.ext.Provider;
 
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils;
 import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken;
 import org.apache.cxf.rs.security.oauth2.common.OAuthError;
@@ -158,7 +158,7 @@ public class OAuthJSONProvider implement
             return Collections.emptyMap();
         }
         if (!str.startsWith("{") || !str.endsWith("}")) {
-            throw new ClientWebApplicationException("JSON Sequence is broken");
+            throw new ClientException("JSON Sequence is broken");
         }
         Map<String, String> map = new LinkedHashMap<String, String>();
         

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
Tue Sep  4 16:10:23 2012
@@ -34,6 +34,7 @@ import java.util.Map;
 import javax.ws.rs.NotAcceptableException;
 import javax.ws.rs.ServerErrorException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
@@ -52,7 +53,6 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
@@ -140,8 +140,8 @@ public class JAXRSClientServerBookTest e
                                                     BookStore.class);
         try {
             store.getBook("123");
-            fail("ClientWebApplicationException expected");
-        } catch (ClientWebApplicationException ex) {
+            fail("ClientException expected");
+        } catch (ClientException ex) {
             // expected
         }
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
Tue Sep  4 16:10:23 2012
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.Response;
 
 import org.apache.cxf.clustering.FailoverFeature;
@@ -34,7 +35,6 @@ import org.apache.cxf.clustering.RetrySt
 import org.apache.cxf.clustering.SequentialStrategy;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.feature.Feature;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.message.Exchange;
@@ -151,7 +151,7 @@ public class FailoverTest extends Abstra
         strategyTest(Server.ADDRESS1, feature, Server.ADDRESS2, Server.ADDRESS3, true, false,
false);
     }
     
-    @Test(expected = ClientWebApplicationException.class)    
+    @Test(expected = ClientException.class)    
     public void testSequentialStrategyFailure() throws Exception {
         FailoverFeature feature = 
             getFeature(false, false, "http://localhost:" + NON_PORT + "/non-existent"); 
@@ -176,7 +176,7 @@ public class FailoverTest extends Abstra
         try {
             store.getBook("1");
             fail("Exception expected");
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             assertEquals(10, strategy.getTotalCount());
             assertEquals(5, strategy.getAddressCount(address));
             assertEquals(5, strategy.getAddressCount(address2));

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
Tue Sep  4 16:10:23 2012
@@ -24,12 +24,12 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.ext.form.Form;
@@ -65,7 +65,7 @@ public class JAXRSSamlTest extends Abstr
             assertEquals(123L, book.getId());
         } catch (WebApplicationException ex) {
             fail(ex.getMessage());
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {
@@ -90,7 +90,7 @@ public class JAXRSSamlTest extends Abstr
             assertEquals(125L, book.getId());
         } catch (WebApplicationException ex) {
             fail(ex.getMessage());
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {
@@ -126,7 +126,7 @@ public class JAXRSSamlTest extends Abstr
             assertEquals(125L, book.getId());
         } catch (WebApplicationException ex) {
             fail(ex.getMessage());
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java?rev=1380723&r1=1380722&r2=1380723&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
Tue Sep  4 16:10:23 2012
@@ -25,10 +25,10 @@ import java.util.Map;
 
 import javax.ws.rs.BadRequestException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientException;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.rs.security.common.SecurityUtils;
@@ -88,7 +88,7 @@ public class JAXRSXmlSecTest extends Abs
             assertEquals(126L, book.getId());
         } catch (WebApplicationException ex) {
             fail(ex.getMessage());
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {
@@ -138,7 +138,7 @@ public class JAXRSXmlSecTest extends Abs
             assertEquals(126L, book.getId());
         } catch (WebApplicationException ex) {
             fail(ex.getMessage());
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {
@@ -300,7 +300,7 @@ public class JAXRSXmlSecTest extends Abs
             } else {
                 fail(ex.getMessage());
             }
-        } catch (ClientWebApplicationException ex) {
+        } catch (ClientException ex) {
             if (ex.getCause() != null && ex.getCause().getMessage() != null) {
                 fail(ex.getCause().getMessage());
             } else {



Mime
View raw message