From c913243dae6d9a08c1b7c713fcc60d5f326eb313 Mon Sep 17 00:00:00 2001 From: bdaniel Date: Sat, 21 Mar 2009 04:38:29 +0000 Subject: TUSCANY-2932 Throw org.apache.tuscany.sca.data.collection.NotFoundException on 404 errors if AtomReferenceBindingProvider.supportsFeedEntries() is false git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756876 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/atom/provider/AtomBindingInvoker.java | 30 +++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding') diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java index 7219a3395b..7dd85a79d9 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java @@ -118,7 +118,10 @@ class AtomBindingInvoker implements Invoker { } } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } @@ -198,7 +201,10 @@ class AtomBindingInvoker implements Invoker { } } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } @@ -265,7 +271,10 @@ class AtomBindingInvoker implements Invoker { msg.setBody(null); } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } @@ -304,7 +313,10 @@ class AtomBindingInvoker implements Invoker { msg.setBody(null); } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } @@ -365,7 +377,10 @@ class AtomBindingInvoker implements Invoker { } } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } @@ -431,7 +446,10 @@ class AtomBindingInvoker implements Invoker { } } else if (status == 404) { - msg.setFaultBody(new NotFoundException()); + if ( provider.supportsFeedEntries()) + msg.setFaultBody(new NotFoundException()); + else + msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException()); } else { msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status)); } -- cgit v1.2.3