You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2008/03/07 23:07:31 UTC

svn commit: r634839 - in /incubator/tuscany/java/sca/modules: binding-rss-rome/ binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/ binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/impl/ binding-rss-rome/src/main/java/...

Author: lresende
Date: Fri Mar  7 14:07:28 2008
New Revision: 634839

URL: http://svn.apache.org/viewvc?rev=634839&view=rev
Log:
New RSS binding

Added:
    incubator/tuscany/java/sca/modules/binding-rss/
      - copied from r634357, incubator/tuscany/java/sca/modules/binding-feed/
    incubator/tuscany/java/sca/modules/binding-rss-rome/
      - copied from r634357, incubator/tuscany/java/sca/modules/binding-feed/
Removed:
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBindingFactory.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBindingFactory.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingFactoryImpl.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingFactoryImpl.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingProviderFactory.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomFeedEntryUtil.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.feed.AtomBindingFactory
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.feed.RSSBindingFactory
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBindingFactory.java
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/collection/
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingFactoryImpl.java
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/feed/provider/
    incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.feed.AtomBindingFactory
    incubator/tuscany/java/sca/modules/binding-rss/src/test/java/org/
    incubator/tuscany/java/sca/modules/binding-rss/src/test/resources/org/
Modified:
    incubator/tuscany/java/sca/modules/binding-rss-rome/pom.xml
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Consumer.composite
    incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Provider.composite
    incubator/tuscany/java/sca/modules/binding-rss/pom.xml
    incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
    incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory

Modified: incubator/tuscany/java/sca/modules/binding-rss-rome/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss-rome/pom.xml?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss-rome/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-rss-rome/pom.xml Fri Mar  7 14:07:28 2008
@@ -26,13 +26,19 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-feed</artifactId>
-    <name>Apache Tuscany SCA Atom+RSS Feed Binding Extension</name>
+    <artifactId>tuscany-binding-rss-rome</artifactId>
+    <name>Apache Tuscany SCA RSS Feed Binding Extension</name>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-assembly</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rss</artifactId>
             <version>1.2-incubating-SNAPSHOT</version>
         </dependency>
 

Modified: incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java Fri Mar  7 14:07:28 2008
@@ -72,9 +72,6 @@
     private static final Logger logger = Logger.getLogger(FeedBindingListenerServlet.class.getName());
     private static final long serialVersionUID = 1L;
 
-    private final static Namespace APP_NS = Namespace.getNamespace("app", "http://purl.org/atom/app#");
-    private final static Namespace ATOM_NS = Namespace.getNamespace("atom", "http://www.w3.org/2005/Atom");
-
     private RuntimeWire wire;
     private Invoker getFeedInvoker;
     private Invoker getAllInvoker;
@@ -157,207 +154,79 @@
         // The feedType parameter is used to override what type of feed is going
         // to be produced
         String requestFeedType = request.getParameter("feedType");
-        if (requestFeedType == null)
+        if (requestFeedType == null) {
             requestFeedType = feedType;
+        }
+        
+        if (requestFeedType.startsWith("atom_")) {
+        	throw new UnsupportedOperationException(requestFeedType + " Not supported !");
+        }
 
         logger.info(">>> FeedEndPointServlet (" + requestFeedType + ") " + request.getRequestURI());
 
-        // Handle an Atom request
-        if (requestFeedType.startsWith("atom_")) {
-
-            if (path != null && path.equals("/atomsvc")) {
+        // Handle an RSS request
+        if (path == null || path.length() == 0 || path.equals("/")) {
 
-                // Return the Atom service document
-                response.setContentType("application/atomsvc+xml; charset=utf-8");
-                Document document = new Document();
-                Element service = new Element("service", APP_NS);
-                document.setRootElement(service);
-
-                Element workspace = new Element("workspace", APP_NS);
-                Element title = new Element("title", ATOM_NS);
-                title.setText("resource");
-                workspace.addContent(title);
-                service.addContent(workspace);
-
-                Element collection = new Element("collection", APP_NS);
-                String href = request.getRequestURL().toString();
-                href = href.substring(0, href.length() - "/atomsvc".length());
-                collection.setAttribute("href", href);
-                Element collectionTitle = new Element("title", ATOM_NS);
-                collectionTitle.setText("entries");
-                collection.addContent(collectionTitle);
-                workspace.addContent(collection);
-
-                XMLOutputter outputter = new XMLOutputter();
-                Format format = Format.getPrettyFormat();
-                format.setEncoding("UTF-8");
-                outputter.setFormat(format);
-                outputter.output(document, getWriter(response));
-
-            } else if (path == null || path.length() == 0 || path.equals("/")) {
-
-                // Return a feed containing the entries in the collection
-                Feed feed = null;
-                if (supportsFeedEntries) {
-
-                    // The service implementation supports feed entries, invoke its getFeed operation
-                    Message requestMessage = messageFactory.createMessage();
-                    Message responseMessage = getFeedInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    feed = (Feed)responseMessage.getBody();
-                    
-                } else {
+            // Return an RSS feed containing the entries in the collection
+            Feed feed = null;
+            if (supportsFeedEntries) {
 
-                    // The service implementation does not support feed entries,
-                    // invoke its getAll operation to get the data item collection, then create
-                    // feed entries from the items
-                    Message requestMessage = messageFactory.createMessage();
-                    Message responseMessage;
-                    if (request.getQueryString() != null) {
-                        requestMessage.setBody(new Object[] {request.getQueryString()});
-                        responseMessage = queryInvoker.invoke(requestMessage);
-                    } else {
-                        responseMessage = getAllInvoker.invoke(requestMessage);
-                    }
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
-                        (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
-                    if (collection != null) {
-                        // Create the feed
-                        feed = new Feed();
-                        feed.setTitle("Feed");
-                        for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
-                            Entry feedEntry = createFeedEntry(entry);
-                            feed.getEntries().add(feedEntry);
-                        }
-                    }
-                }
-                if (feed != null) {
-                    
-                    // Write the Atom feed
-                    response.setContentType("application/atom+xml; charset=utf-8");
-                    feed.setFeedType(requestFeedType);
-                    WireFeedOutput feedOutput = new WireFeedOutput();
-                    try {
-                        feedOutput.output(feed, getWriter(response));
-                    } catch (FeedException e) {
-                        throw new ServletException(e);
-                    }
-                } else {
-                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
+                // The service implementation supports feed entries, invoke its getFeed operation
+                Message requestMessage = messageFactory.createMessage();
+                Message responseMessage = getFeedInvoker.invoke(requestMessage);
+                if (responseMessage.isFault()) {
+                    throw new ServletException((Throwable)responseMessage.getBody());
                 }
+                feed = (Feed)responseMessage.getBody();
                 
-            } else if (path.startsWith("/")) {
-
-                // Return a specific entry in the collection
-                Entry feedEntry;
+            } else {
 
-                // Invoke the get operation on the service implementation
+                // The service implementation does not support feed entries, invoke its
+                // getAll operation to get the data item collection. then create feed entries
+                // from the data items
                 Message requestMessage = messageFactory.createMessage();
-                String id = path.substring(1);
-                requestMessage.setBody(new Object[] {id});
-                Message responseMessage = getInvoker.invoke(requestMessage);
+                Message responseMessage;
+                if (request.getQueryString() != null) {
+                    requestMessage.setBody(new Object[] {request.getQueryString()});
+                    responseMessage = queryInvoker.invoke(requestMessage);
+                } else {
+                    responseMessage = getAllInvoker.invoke(requestMessage);
+                }
                 if (responseMessage.isFault()) {
                     throw new ServletException((Throwable)responseMessage.getBody());
                 }
-                if (supportsFeedEntries) {
-                    
-                    // The service implementation returns a feed entry 
-                    feedEntry = responseMessage.getBody();
-                    
-                } else {
-                    
-                    // The service implementation only returns a data item, create an entry
-                    // from it
-                    feedEntry = createFeedEntry(new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(id, responseMessage.getBody()));
-                }
-
-                // Write the Atom entry
-                if (feedEntry != null) {
-                    response.setContentType("application/atom+xml; charset=utf-8");
-                    try {
-                        AtomFeedEntryUtil.writeFeedEntry(feedEntry, feedType, getWriter(response));
-                    } catch (FeedException e) {
-                        throw new ServletException(e);
+                org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
+                    (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
+                if (collection != null) {
+                    // Create the feed
+                    feed = new Feed();
+                    feed.setTitle("Feed");
+                    for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
+                        Entry feedEntry = createFeedEntry(entry);
+                        feed.getEntries().add(feedEntry);
                     }
-                } else {
-                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
                 }
-
-            } else {
-
-                // Path doesn't match any known pattern
-                response.sendError(HttpServletResponse.SC_NOT_FOUND);
             }
-        } else {
 
-            // Handle an RSS request
-            if (path == null || path.length() == 0 || path.equals("/")) {
-
-                // Return an RSS feed containing the entries in the collection
-                Feed feed = null;
-                if (supportsFeedEntries) {
-
-                    // The service implementation supports feed entries, invoke its getFeed operation
-                    Message requestMessage = messageFactory.createMessage();
-                    Message responseMessage = getFeedInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    feed = (Feed)responseMessage.getBody();
-                    
-                } else {
-
-                    // The service implementation does not support feed entries, invoke its
-                    // getAll operation to get the data item collection. then create feed entries
-                    // from the data items
-                    Message requestMessage = messageFactory.createMessage();
-                    Message responseMessage;
-                    if (request.getQueryString() != null) {
-                        requestMessage.setBody(new Object[] {request.getQueryString()});
-                        responseMessage = queryInvoker.invoke(requestMessage);
-                    } else {
-                        responseMessage = getAllInvoker.invoke(requestMessage);
-                    }
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
-                        (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
-                    if (collection != null) {
-                        // Create the feed
-                        feed = new Feed();
-                        feed.setTitle("Feed");
-                        for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
-                            Entry feedEntry = createFeedEntry(entry);
-                            feed.getEntries().add(feedEntry);
-                        }
-                    }
-                }
-
-                // Convert to an RSS feed
-                if (feed != null) {
-                    response.setContentType("application/rss+xml; charset=utf-8");
-                    feed.setFeedType("atom_1.0");
-                    SyndFeed syndFeed = new SyndFeedImpl(feed);
-                    syndFeed.setFeedType(requestFeedType);
-                    SyndFeedOutput syndOutput = new SyndFeedOutput();
-                    try {
-                        syndOutput.output(syndFeed, getWriter(response));
-                    } catch (FeedException e) {
-                        throw new ServletException(e);
-                    }
-                } else {
-                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
+            // Convert to an RSS feed
+            if (feed != null) {
+                response.setContentType("application/rss+xml; charset=utf-8");
+                feed.setFeedType("atom_1.0");
+                SyndFeed syndFeed = new SyndFeedImpl(feed);
+                syndFeed.setFeedType(requestFeedType);
+                SyndFeedOutput syndOutput = new SyndFeedOutput();
+                try {
+                    syndOutput.output(syndFeed, getWriter(response));
+                } catch (FeedException e) {
+                    throw new ServletException(e);
                 }
             } else {
                 response.sendError(HttpServletResponse.SC_NOT_FOUND);
             }
+        } else {
+            response.sendError(HttpServletResponse.SC_NOT_FOUND);
         }
+
     }
 
     /**
@@ -491,236 +360,10 @@
         }
     }
 
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
-        IOException {
-
-        // Authenticate the user
-        String user = processAuthorizationHeader(request);
-        if (user == null) {
-            unauthorized(response);
-            return;
-        }
-
-        // Get the request path
-        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
-
-        if (path == null || path.length() == 0 || path.equals("/")) {
-            Entry createdFeedEntry = null;
-
-            // Create a new Atom entry
-            String contentType = request.getContentType();
-            if (contentType.startsWith("application/atom+xml")) {
-
-                // Read the entry from the request
-                Entry feedEntry;
-                try {
-                    feedEntry = AtomFeedEntryUtil.readFeedEntry(feedType, request.getReader());
-                } catch (JDOMException e) {
-                    throw new ServletException(e);
-                } catch (FeedException e) {
-                    throw new ServletException(e);
-                }
-
-                // Let the component implementation create it
-                if (supportsFeedEntries) {
-                    
-                    // The service implementation supports feed entries, pass the entry to it
-                    Message requestMessage = messageFactory.createMessage();
-                    requestMessage.setBody(new Object[] {feedEntry});
-                    Message responseMessage = postInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    createdFeedEntry = responseMessage.getBody();
-                } else {
-                    
-                    // The service implementation does not support feed entries, pass the data item to it
-                    Message requestMessage = messageFactory.createMessage();
-                    org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
-                    requestMessage.setBody(new Object[] {entry.getKey(), entry.getData()});
-                    Message responseMessage = postInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                    entry.setKey(responseMessage.getBody());
-                    createdFeedEntry = createFeedEntry(entry);
-                }
-
-            } else if (contentType != null) {
-
-                // Create a new media entry
-
-                // Get incoming headers
-                String title = request.getHeader("Title");
-                String slug = request.getHeader("Slug");
-
-                // Let the component implementation create the media entry
-                Message requestMessage = messageFactory.createMessage();
-                requestMessage.setBody(new Object[] {title, slug, contentType, request.getInputStream()});
-                Message responseMessage = postMediaInvoker.invoke(requestMessage);
-                if (responseMessage.isFault()) {
-                    throw new ServletException((Throwable)responseMessage.getBody());
-                }
-                createdFeedEntry = responseMessage.getBody();
-            } else {
-                response.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE);
-            }
-
-            // A new entry was created successfully
-            if (createdFeedEntry != null) {
-
-                // Set location of the created entry in the Location header
-                for (Object l : createdFeedEntry.getOtherLinks()) {
-                    Link link = (Link)l;
-                    if (link.getRel() == null || "edit".equals(link.getRel())) {
-                        response.addHeader("Location", link.getHref());
-                        break;
-                    }
-                }
-
-                // Write the created Atom entry
-                response.setStatus(HttpServletResponse.SC_CREATED);
-                response.setContentType("application/atom+xml; charset=utf-8");
-                try {
-                    AtomFeedEntryUtil.writeFeedEntry(createdFeedEntry, feedType, getWriter(response));
-                } catch (FeedException e) {
-                    throw new ServletException(e);
-                }
-
-            } else {
-                response.sendError(HttpServletResponse.SC_NOT_FOUND);
-            }
-
-        } else {
-            response.sendError(HttpServletResponse.SC_NOT_FOUND);
-        }
-    }
 
     private Writer getWriter(HttpServletResponse response) throws UnsupportedEncodingException, IOException {
         Writer writer = new OutputStreamWriter(response.getOutputStream(), "UTF-8");
         return writer;
-    }
-
-    @Override
-    protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-
-        // Authenticate the user
-        String user = processAuthorizationHeader(request);
-        if (user == null) {
-            unauthorized(response);
-            return;
-        }
-
-        // Get the request path
-        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
-
-        if (path != null && path.startsWith("/")) {
-            String id = path.substring(1);
-
-            // Update an Atom entry
-            String contentType = request.getContentType();
-            if (contentType.startsWith("application/atom+xml")) {
-
-                // Read the entry from the request
-                Entry feedEntry;
-                try {
-                    feedEntry = AtomFeedEntryUtil.readFeedEntry(feedType, request.getReader());
-                } catch (JDOMException e) {
-                    throw new ServletException(e);
-                } catch (FeedException e) {
-                    throw new ServletException(e);
-                }
-
-                // Let the component implementation create it
-                if (supportsFeedEntries) {
-                    
-                    // The service implementation supports feed entries, pass the entry to it
-                    Message requestMessage = messageFactory.createMessage();
-                    requestMessage.setBody(new Object[] {id, feedEntry});
-                    Message responseMessage = putInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        Object body = responseMessage.getBody();
-                        if (body.getClass().getName().endsWith(".NotFoundException")) {
-                            response.sendError(HttpServletResponse.SC_NOT_FOUND);
-                        } else {
-                            throw new ServletException((Throwable)responseMessage.getBody());
-                        }
-                    }
-                } else {
-                    
-                    // The service implementation does not support feed entries, pass the data item to it
-                    Message requestMessage = messageFactory.createMessage();
-                    org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
-                    requestMessage.setBody(new Object[] {entry.getKey(), entry.getData()});
-                    Message responseMessage = putInvoker.invoke(requestMessage);
-                    if (responseMessage.isFault()) {
-                        Object body = responseMessage.getBody();
-                        if (body.getClass().getName().endsWith(".NotFoundException")) {
-                            response.sendError(HttpServletResponse.SC_NOT_FOUND);
-                        } else {
-                            throw new ServletException((Throwable)responseMessage.getBody());
-                        }
-                    }
-                }
-
-            } else if (contentType != null) {
-
-                // Updated a media entry
-
-                // Let the component implementation create the media entry
-                Message requestMessage = messageFactory.createMessage();
-                requestMessage.setBody(new Object[] {id, contentType, request.getInputStream()});
-                Message responseMessage = putMediaInvoker.invoke(requestMessage);
-                Object body = responseMessage.getBody();
-                if (responseMessage.isFault()) {
-                    if (body.getClass().getName().endsWith(".NotFoundException")) {
-                        response.sendError(HttpServletResponse.SC_NOT_FOUND);
-                    } else {
-                        throw new ServletException((Throwable)responseMessage.getBody());
-                    }
-                }
-            } else {
-                response.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE);
-            }
-        } else {
-            response.sendError(HttpServletResponse.SC_NOT_FOUND);
-        }
-    }
-
-    @Override
-    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException,
-        IOException {
-
-        // Authenticate the user
-        String user = processAuthorizationHeader(request);
-        if (user == null) {
-            unauthorized(response);
-            return;
-        }
-
-        // Get the request path
-        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
-
-        String id;
-        if (path != null && path.startsWith("/")) {
-            id = path.substring(1);
-        } else {
-            id = "";
-        }
-
-        // Delete a specific entry from the collection
-        Message requestMessage = messageFactory.createMessage();
-        requestMessage.setBody(new Object[] {id});
-        Message responseMessage = deleteInvoker.invoke(requestMessage);
-        if (responseMessage.isFault()) {
-            Object body = responseMessage.getBody();
-            if (body.getClass().getName().endsWith(".NotFoundException")) {
-                response.sendError(HttpServletResponse.SC_NOT_FOUND);
-            } else {
-                throw new ServletException((Throwable)responseMessage.getBody());
-            }
-        }
     }
 
     /**

Modified: incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory (original)
+++ incubator/tuscany/java/sca/modules/binding-rss-rome/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory Fri Mar  7 14:07:28 2008
@@ -16,5 +16,4 @@
 # under the License. 
 
 # Implementation class for the binding extension
-org.apache.tuscany.sca.binding.feed.provider.AtomBindingProviderFactory;model=org.apache.tuscany.sca.binding.feed.AtomBinding
 org.apache.tuscany.sca.binding.feed.provider.RSSBindingProviderFactory;model=org.apache.tuscany.sca.binding.feed.RSSBinding

Modified: incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Consumer.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Consumer.composite?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Consumer.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Consumer.composite Fri Mar  7 14:07:28 2008
@@ -25,7 +25,7 @@
     <component name="CustomerClient">
         <implementation.java class="org.apache.tuscany.sca.binding.feed.CustomerClientImpl"/>
         <reference name="resourceCollection">
-        	<tuscany:binding.atom uri="http://localhost:8084/customer"/>
+        	<tuscany:binding.rss uri="http://localhost:8084/customer"/>
         </reference>
     </component>
 

Modified: incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Provider.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Provider.composite?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Provider.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-rss-rome/src/test/resources/org/apache/tuscany/sca/binding/feed/Provider.composite Fri Mar  7 14:07:28 2008
@@ -23,7 +23,7 @@
 	   name="Provider">
 
 	<service name="customer" promote="CustomerCollection">
-		<tuscany:binding.atom uri = "http://localhost:8084/customer"/>
+		<tuscany:binding.rss uri = "http://localhost:8084/customer"/>
 	</service>
 	
     <component name="CustomerCollection">

Modified: incubator/tuscany/java/sca/modules/binding-rss/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss/pom.xml?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-rss/pom.xml Fri Mar  7 14:07:28 2008
@@ -26,8 +26,8 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-feed</artifactId>
-    <name>Apache Tuscany SCA Atom+RSS Feed Binding Extension</name>
+    <artifactId>tuscany-binding-rss</artifactId>
+    <name>Apache Tuscany SCA RSS Feed Binding Extension</name>
 
     <dependencies>
         <dependency>
@@ -56,44 +56,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-databinding</artifactId>
-            <version>1.2-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-http</artifactId>
-            <version>1.2-incubating-SNAPSHOT</version>
-        </dependency>
-        
-        <dependency>
-           <groupId>commons-httpclient</groupId>
-           <artifactId>commons-httpclient</artifactId>
-           <version>3.0.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>rome</groupId>
-            <artifactId>rome</artifactId>
-            <version>0.9</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.4</version> 
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-tomcat</artifactId>
-            <version>1.2-incubating-SNAPSHOT</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-implementation-java-runtime</artifactId>
             <version>1.2-incubating-SNAPSHOT</version>
             <scope>test</scope>
@@ -112,35 +74,6 @@
             <version>4.2</version>
             <scope>test</scope>
         </dependency>
-        
-        <dependency>
-           <groupId>commons-codec</groupId>
-           <artifactId>commons-codec</artifactId>
-           <version>1.3</version>
-           <exclusions>
-               <exclusion>
-                   <groupId>commons-codec</groupId>
-                   <artifactId>commons-codec</artifactId>
-               </exclusion>
-           </exclusions>
-        </dependency>
-
-        <dependency>
-           <groupId>commons-logging</groupId>
-           <artifactId>commons-logging</artifactId>
-           <version>1.1</version>
-           <exclusions>
-               <exclusion>
-                   <groupId>javax.servlet</groupId>
-                   <artifactId>servlet-api</artifactId>
-               </exclusion>
-               <exclusion>
-                   <groupId>avalon-framework</groupId>
-                   <artifactId>avalon-framework</artifactId>
-               </exclusion>
-           </exclusions>
-        </dependency>          
-                
     </dependencies>
 
 </project>

Modified: incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (original)
+++ incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Fri Mar  7 14:07:28 2008
@@ -16,5 +16,4 @@
 # under the License. 
 
 # Implementation class for the artifact processor extension
-org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#binding.atom,model=org.apache.tuscany.sca.binding.feed.AtomBinding,factory=org.apache.tuscany.sca.binding.feed.AtomBindingFactory
 org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#binding.rss,model=org.apache.tuscany.sca.binding.feed.RSSBinding,factory=org.apache.tuscany.sca.binding.feed.RSSBindingFactory

Modified: incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory?rev=634839&r1=634357&r2=634839&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory (original)
+++ incubator/tuscany/java/sca/modules/binding-rss/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory Fri Mar  7 14:07:28 2008
@@ -16,5 +16,4 @@
 # under the License. 
 
 # Implementation class for the binding extension
-org.apache.tuscany.sca.binding.feed.provider.AtomBindingProviderFactory;model=org.apache.tuscany.sca.binding.feed.AtomBinding
 org.apache.tuscany.sca.binding.feed.provider.RSSBindingProviderFactory;model=org.apache.tuscany.sca.binding.feed.RSSBinding



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org