[jbossws-commits] JBossWS SVN: r4880 - in stack/metro/trunk: ant-import and 5 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Oct 24 07:05:30 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-10-24 07:05:30 -0400 (Wed, 24 Oct 2007)
New Revision: 4880

Added:
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java
Removed:
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java
Modified:
   stack/metro/trunk/ant-import/build-thirdparty.xml
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
   stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
   stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml
   stack/metro/trunk/version.properties
Log:
Registry refactoring:  svn merge -r4849:HEAD https://svn.jboss.org/repos/jbossws/stack/metro/branches/hbraun

Modified: stack/metro/trunk/ant-import/build-thirdparty.xml
===================================================================
--- stack/metro/trunk/ant-import/build-thirdparty.xml	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/ant-import/build-thirdparty.xml	2007-10-24 11:05:30 UTC (rev 4880)
@@ -57,9 +57,11 @@
     <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxrpc/${sun-jaxrpc}/lib/jaxrpc-api.jar" dest="${thirdparty.dir}/jaxrpc-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/FastInfoset.jar" dest="${thirdparty.dir}/FastInfoset.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/http.jar" dest="${thirdparty.dir}/http.jar" usetimestamp="true" verbose="true"/>
-    <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar" dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true" verbose="true"/> 
+    <get src="${jboss.repository}/sun-jaf/${sun-jaf}/lib/activation.jar" dest="${thirdparty.dir}/activation.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar" dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-ri-src.jar" dest="${thirdparty.dir}/jaxws-ri-src.jar" usetimestamp="true" verbose="true"/> 
     <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-rt.jar" dest="${thirdparty.dir}/jaxws-rt.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-tools.jar" dest="${thirdparty.dir}/jaxws-tools.jar" usetimestamp="true" verbose="true"/>

Modified: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -75,9 +75,7 @@
 import com.sun.xml.ws.util.xml.XmlUtil;
 
 /**
- * A copy of DeploymentDescriptorParser that externalizes
- * 
- * {@link createInvoker(Class)}
+ * A copy of DeploymentDescriptorParser
  *  
  *
  * @see com.sun.xml.ws.transport.http.servlet.WSServletContextListener
@@ -94,6 +92,8 @@
    private final ResourceLoader loader;
    private final AdapterFactory<A> adapterFactory;
 
+   private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(DeploymentDescriptorParserExt.class);
+
    /**
     * Endpoint names that are declared.
     * Used to catch double definitions.
@@ -123,8 +123,22 @@
       this.container = container;
       this.adapterFactory = adapterFactory;
 
-      collectDocs("/WEB-INF/wsdl/");
-      logger.fine("war metadata=" + docs);
+      // toggle EJB and WEB deployments
+      String resourcePath = "/META-INF/";
+      try
+      {
+         loader.getResource(resourcePath);
+         log.warn("bypass collectDocs(), it doesnt work for EJB endpoints");
+      }
+      catch (MalformedURLException e)
+      {
+         resourcePath = "/WEB-INF/";
+         log.debug("Collecting docs from " + resourcePath);
+
+         collectDocs(resourcePath+"wsdl/");
+         logger.fine("metadata=" + docs);
+      }
+
    }
 
    /**
@@ -393,16 +407,17 @@
 
       if (wsdlFile != null)
       {
-         if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR))
+         /*if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR))
          {
             logger.warning("Ignoring wrong wsdl=" + wsdlFile + ". It should start with " + JAXWS_WSDL_DD_DIR + ". Going to generate and publish a new WSDL.");
             return null;
-         }
+         }*/
 
          URL wsdl;
          try
          {
-            wsdl = loader.getResource('/' + wsdlFile);
+            //wsdl = loader.getResource('/' + wsdlFile);
+            wsdl = loader.getResource(wsdlFile);
          }
          catch (MalformedURLException e)
          {
@@ -412,6 +427,10 @@
          {
             throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr);
          }
+
+         // bypass the docs init
+         docs.put(wsdl.toExternalForm(), SDDocumentSource.create(wsdl));
+
          SDDocumentSource docInfo = docs.get(wsdl.toExternalForm());
          assert docInfo != null;
          return docInfo;

Modified: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -23,27 +23,25 @@
 
 //$Id$
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.spi.invocation.RequestHandler;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.ws.WebServiceException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
 
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-
-import com.sun.xml.ws.transport.http.servlet.WSServlet;
-import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
-
 /**
  * A request handler
- * 
+ *
  * @author Thomas.Diesler at jboss.org
  * @since 25-Apr-2007
  */
@@ -58,40 +56,87 @@
 
    public void handleHttpRequest(Endpoint endpoint, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
    {
-      WSServletDelegate delegate = (WSServletDelegate)context.getAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
-      if (delegate == null)
-         throw new IllegalStateException("Cannot obtain servlet delegate");
-      
+      ServletAdapter target = endpoint.getAttachment(ServletAdapter.class);
+      if(null == target)
+         throw new IllegalArgumentException("Cannot obtain ServletAdapter");
+
       String method = req.getMethod();
       if (method.equals("POST"))
       {
-         delegate.doPost(req, res, context);
+         doPost(target, context, req, res);
       }
-      else if (method.equals("GET"))
+      else if(method.equals("GET"))
       {
-         delegate.doGet(req, res, context);
+         doGet(target, req, context, res);
       }
-      else if (method.equals("PUT"))
+      else
       {
-         delegate.doPut(req, res, context);
+         throw new WebServiceException("Unsupported method: " + method);
       }
-      else if (method.equals("DELETE"))
+   }
+
+   private void doGet(ServletAdapter target, HttpServletRequest req, ServletContext context, HttpServletResponse res)
+     throws ServletException
+   {
+      try {
+
+         if (target != null)
+         {
+            String query = req.getQueryString();
+            if (target.isMetadataQuery(query)) {
+               // Sends published WSDL and schema documents
+               target.publishWSDL(context, req, res);
+               return;
+            }
+            else
+            {
+               sendResponse(405, "HTTP GET not supported", res);
+            }
+         }
+         else
+         {
+            sendResponse(404, "Not found", res);
+         }
+      }
+      catch (Exception e)
       {
-         delegate.doDelete(req, res, context);
+         log.error("Failed to process GET request", e);
+         throw new ServletException(e.getMessage());
       }
-      else
+   }
+
+   private static void sendResponse(int status, String message, HttpServletResponse res)
+     throws IOException
+   {
+      res.setStatus(status);
+      res.setContentType("text/plain");
+      Writer out = res.getWriter();
+      out.write(message);
+      out.close();
+   }
+
+   private void doPost(ServletAdapter target, ServletContext context, HttpServletRequest req, HttpServletResponse res)
+   {
+      try
       {
-         throw new WebServiceException("Unsupported method: " + method);
+         target.handle(context, req, res);
       }
+      catch (Throwable e)
+      {
+         log.error("Failed to process POST request", e);
+         res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+      }
    }
 
+
+
    public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext context)
    {
-      throw new IllegalArgumentException("Not implemented");
+      throw new IllegalArgumentException("JBWS-1869: Not implemented");
    }
 
    public void handleWSDLRequest(Endpoint endpoint, OutputStream outStream, InvocationContext context)
    {
-      throw new IllegalArgumentException("Not implemented");
+      throw new IllegalArgumentException("JBWS-1869: Not implemented");
    }
 }

Modified: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -28,6 +28,7 @@
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoint;
 import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
+import org.jboss.wsf.stack.sunri.metadata.RuntimeModelDeploymentAspect;
 
 import javax.xml.ws.BindingType;
 import javax.xml.ws.soap.SOAPBinding;
@@ -81,7 +82,7 @@
             contextParams = new HashMap<String, String>();
             dep.setProperty(propKey, contextParams);
          }
-         contextParams.put(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL, dd.createFileURL().toExternalForm());
+         contextParams.put(RuntimeModelDeploymentAspect.PARAM_SUN_JAXWS_URL, dd.createFileURL().toExternalForm());
       }
    }
 

Deleted: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -1,189 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri;
-
-// $Id$
-
-import com.sun.istack.NotNull;
-import com.sun.xml.ws.api.server.BoundEndpoint;
-import com.sun.xml.ws.api.server.Container;
-import com.sun.xml.ws.api.server.Module;
-import com.sun.xml.ws.api.server.ResourceInjector;
-import com.sun.xml.ws.resources.WsservletMessages;
-import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
-import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
-import com.sun.xml.ws.transport.http.servlet.ServletAdapterList;
-import com.sun.xml.ws.transport.http.servlet.WSServlet;
-import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
-
-import javax.servlet.*;
-import javax.xml.ws.WebServiceException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * A copy of WSServletContextListener that externalizes
- * 
- * getDeploymentDescriptorURL()
- * createDeploymentDescriptorParser()
- *
- * @author WS Development Team
- * @author Thomas.Diesler at jboss.org
- * @since 10-May-2007
- */
-public class WSServletContextListenerExt implements ServletContextAttributeListener, ServletContextListener
-{
-   private WSServletDelegate delegate;
-
-   public void attributeAdded(ServletContextAttributeEvent event)
-   {
-   }
-
-   public void attributeRemoved(ServletContextAttributeEvent event)
-   {
-   }
-
-   public void attributeReplaced(ServletContextAttributeEvent event)
-   {
-   }
-
-   public void contextInitialized(ServletContextEvent event)
-   {
-      if (logger.isLoggable(Level.INFO))
-      {
-         logger.info(WsservletMessages.LISTENER_INFO_INITIALIZE());
-      }
-      ServletContext context = event.getServletContext();
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      if (classLoader == null)
-      {
-         classLoader = getClass().getClassLoader();
-      }
-
-      ServletContainer container = new ServletContainer(context);
-      try
-      {
-         ServletResourceLoader resourceLoader = new ServletResourceLoader(context);
-         ServletAdapterList adapterList = new ServletAdapterList();
-
-         // Parse the descriptor file and build endpoint infos
-         DeploymentDescriptorParserExt<ServletAdapter> parser = createDeploymentDescriptorParser(classLoader, container, resourceLoader, adapterList);
-
-         URL sunJaxWsXml = getDeploymentDescriptorURL(context);
-         List<ServletAdapter> adapters = parser.parse(sunJaxWsXml.toExternalForm(), sunJaxWsXml.openStream());
-
-         delegate = new WSServletDelegate(adapters, context);
-
-         context.setAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO, delegate);
-      }
-      catch (Throwable e)
-      {
-         logger.log(Level.SEVERE, WsservletMessages.LISTENER_PARSING_FAILED(e), e);
-         context.removeAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
-         throw new WebServiceException("listener.parsingFailed", e);
-      }
-   }
-
-   public void contextDestroyed(ServletContextEvent event)
-   {
-      if (delegate != null)
-      { // the deployment might have failed.
-         delegate.destroy();
-      }
-
-      if (logger.isLoggable(Level.INFO))
-      {
-         logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
-      }
-   }
-
-   /**
-    * Externalized for integration 
-    */
-   protected DeploymentDescriptorParserExt<ServletAdapter> createDeploymentDescriptorParser(ClassLoader classLoader, ServletContainer container,
-         ServletResourceLoader resourceLoader, AdapterFactory<ServletAdapter> adapterList) throws MalformedURLException
-   {
-      DeploymentDescriptorParserExt<ServletAdapter> parser = new DeploymentDescriptorParserExt<ServletAdapter>(classLoader, resourceLoader, container, adapterList);
-      return parser;
-   }
-
-   /**
-    * Externalized for integration 
-    */
-   protected URL getDeploymentDescriptorURL(ServletContext context) throws MalformedURLException
-   {
-      URL sunJaxWsXml = context.getResource(JAXWS_RI_RUNTIME);
-      return sunJaxWsXml;
-   }
-
-   /**
-    * Provides access to {@link ServletContext} via {@link Container}. Pipes
-    * can get ServletContext from Container and use it to load some resources. 
-    */
-   static class ServletContainer extends Container
-   {
-      private final ServletContext servletContext;
-
-      private final Module module = new Module()
-      {
-         private final List<BoundEndpoint> endpoints = new ArrayList<BoundEndpoint>();
-
-         public @NotNull
-         List<BoundEndpoint> getBoundEndpoints()
-         {
-            return endpoints;
-         }
-      };
-
-      ServletContainer(ServletContext servletContext)
-      {
-         this.servletContext = servletContext;
-      }
-
-      public <T> T getSPI(Class<T> spiType)
-      {
-         if (spiType == ServletContext.class)
-         {
-            return (T)servletContext;
-         }
-         else if (spiType == Module.class)
-         {
-            return spiType.cast(module);
-         }
-         else if(spiType == ResourceInjector.class)
-         {
-            return (T)ResourceInjector.STANDALONE;
-         }
-
-         logger.log(Level.WARNING, "Unable to resolve SPI for type: " + spiType);
-         return null;
-      }
-   }
-
-   protected static final String JAXWS_RI_RUNTIME = "/WEB-INF/sun-jaxws.xml";
-
-   private static final Logger logger = Logger.getLogger(com.sun.xml.ws.util.Constants.LoggingDomain + ".server.http");
-}

Deleted: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri;
-
-// $Id$
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-import javax.xml.ws.WebServiceException;
-
-import com.sun.xml.ws.resources.WsservletMessages;
-import com.sun.xml.ws.transport.http.HttpAdapter;
-import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
-import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
-
-/**
- * Parses {@code sun-jaxws.xml} and sets up
- * {@link HttpAdapter}s for all deployed endpoints.
- *
- * <p>
- * This code is the entry point at the server side.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 18-May-2007
- */
-public class WSServletContextListenerJBWS extends WSServletContextListenerExt
-{
-   public static final String PARAM_SUN_JAXWS_URL = "jbossws-sun-jaxws-url";
-
-   /**
-    * Fall back to the 'jbossws-sun-jaxws-url' init parameter for the URL location 
-    * of sun-jaxws.xml  
-    */
-   @Override
-   protected URL getDeploymentDescriptorURL(ServletContext context) throws MalformedURLException
-   {
-      URL sunJaxWsXml = super.getDeploymentDescriptorURL(context);
-      if (sunJaxWsXml == null)
-      {
-         String urlStr = context.getInitParameter(PARAM_SUN_JAXWS_URL);
-         if (urlStr != null && urlStr.length() > 0)
-            sunJaxWsXml = new URL(urlStr);
-      }
-      if (sunJaxWsXml == null)
-         throw new WebServiceException(WsservletMessages.NO_SUNJAXWS_XML(JAXWS_RI_RUNTIME));
-
-      return sunJaxWsXml;
-   }
-
-   /**
-    * Externalized for integration 
-    */
-   @Override
-   protected DeploymentDescriptorParserExt<ServletAdapter> createDeploymentDescriptorParser(ClassLoader classLoader, ServletContainer container,
-         ServletResourceLoader resourceLoader, AdapterFactory<ServletAdapter> adapterList) throws MalformedURLException
-   {
-      DeploymentDescriptorParserExt<ServletAdapter> parser = new DeploymentDescriptorParserJBWS<ServletAdapter>(classLoader, resourceLoader, container, adapterList);
-      return parser;
-   }
-}

Modified: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -24,9 +24,8 @@
 import com.sun.istack.NotNull;
 import com.sun.xml.ws.api.server.ResourceInjector;
 import com.sun.xml.ws.api.server.WSWebServiceContext;
+import org.jboss.logging.Logger;
 
-import javax.xml.ws.WebServiceContext;
-
 /**
  * Default {@link ResourceInjector}.
  *
@@ -35,6 +34,8 @@
  */
 public final class JBossResourceInjector extends ResourceInjector {
 
+   private static final org.jboss.logging.Logger log = Logger.getLogger(JBossResourceInjector.class);
+
    public void inject(@NotNull WSWebServiceContext context, @NotNull Object instance) {
 //      AbstractInstanceResolver.buildInjectionPlan(
 //          instance.getClass(),
@@ -42,6 +43,6 @@
 //          false
 //      ).inject(instance,context);
 
-      System.out.println("!!! inject " + context+ " into " + instance);
+      log.warn("Context injection not implemeted, failed to inject " + context+ " into " + instance);
    }
 }

Copied: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java (from rev 4876, stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java)
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java	                        (rev 0)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -0,0 +1,171 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.log;
+
+import com.sun.xml.ws.api.message.Packet;
+import com.sun.xml.ws.api.pipe.Pipe;
+import com.sun.xml.ws.api.pipe.PipeCloner;
+import com.sun.xml.ws.api.pipe.helper.AbstractFilterPipeImpl;
+import org.jboss.logging.Logger;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+
+/**
+ * {@link Pipe} that dumps messages that pass through.
+ * Borrowed from the SUN-RI sources.
+ *
+ * @author Kohsuke Kawaguchi
+ * @author Heiko Braun
+ */
+public class DumpPipe extends AbstractFilterPipeImpl {
+
+   private static Logger msgLog = Logger.getLogger("org.jboss.wsf.spi.MessageTrace");
+
+   private final String name;
+
+   private final PrintStream out;
+
+   private final XMLOutputFactory staxOut;
+
+   /**
+    * @param name
+    *      Specify the name that identifies this {@link DumpPipe}
+    *      instance. This string will be printed when this pipe
+    *      dumps messages, and allows people to distinguish which
+    *      pipe instance is dumping a message when multiple
+    *      {@link DumpPipe}s print messages out.
+    * @param out
+    *      The output to send dumps to.
+    * @param next
+    *      The next {@link Pipe} in the pipeline.
+    */
+   public DumpPipe(String name, PrintStream out, Pipe next) {
+      super(next);
+      this.name = name;
+      this.out = out;
+      this.staxOut = XMLOutputFactory.newInstance();
+      //staxOut.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES,true);
+   }
+
+   /**
+    * @param out
+    *      The output to send dumps to.
+    * @param next
+    *      The next {@link Pipe} in the pipeline.
+    *
+    * @deprecated
+    *      use {@link #DumpPipe(String, PrintStream, Pipe)}
+    */
+   public DumpPipe(PrintStream out, Pipe next) {
+      this("DumpPipe",out,next);
+   }
+
+   /**
+    * Copy constructor.
+    */
+   private DumpPipe(DumpPipe that, PipeCloner cloner) {
+      super(that,cloner);
+      this.name = that.name;
+      this.out = that.out;
+      this.staxOut = that.staxOut;
+   }
+
+   public Packet process(Packet packet) {
+      dump("request",packet);
+      Packet reply = next.process(packet);
+      dump("response",reply);
+      return reply;
+   }
+
+   private void dump(String header, Packet packet) {
+
+      if(!msgLog.isTraceEnabled())
+         return;
+
+      msgLog.trace("====["+name+":"+header+"]====");
+      if(packet.getMessage()==null)
+      {
+         msgLog.trace("(none)");
+      }
+      else
+      {
+         ByteArrayOutputStream bout = new ByteArrayOutputStream();
+
+         try {
+
+            XMLStreamWriter writer = staxOut.createXMLStreamWriter(new PrintStream(bout) {
+               public void close() {
+                  // noop
+               }
+            });
+            writer = createIndenter(writer);
+            packet.getMessage().copy().writeTo(writer);
+            writer.close();
+
+         } catch (XMLStreamException e) {
+            e.printStackTrace(new PrintStream(bout));
+         }
+         
+         msgLog.trace(new String(bout.toByteArray()));
+      }
+
+      msgLog.trace("============");
+   }
+
+   /**
+    * Wraps {@link XMLStreamWriter} by an indentation engine if possible.
+    *
+    * <p>
+    * We can do this only when we have <tt>stax-utils.jar</tt> in the classpath.
+    */
+   private XMLStreamWriter createIndenter(XMLStreamWriter writer) {
+      try {
+         Class clazz = getClass().getClassLoader().loadClass("javanet.staxutils.IndentingXMLStreamWriter");
+         Constructor c = clazz.getConstructor(XMLStreamWriter.class);
+         writer = (XMLStreamWriter)c.newInstance(writer);
+      } catch (Exception e) {
+         // if stax-utils.jar is not in the classpath, this will fail
+         // so, we'll just have to do without indentation
+         if(!warnStaxUtils) {
+            warnStaxUtils = true;
+            msgLog.warn("WARNING: put stax-utils.jar to the classpath to indent the dump output");
+         }
+      }
+      return writer;
+   }
+
+
+   public Pipe copy(PipeCloner cloner) {
+      return new DumpPipe(this,cloner);
+   }
+
+   public void preDestroy() {
+      // noop
+   }
+
+   private static boolean warnStaxUtils;
+}

Copied: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java (from rev 4876, stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java)
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java	                        (rev 0)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.log;
+
+import com.sun.xml.ws.api.server.ServerPipelineHook;
+import com.sun.xml.ws.api.pipe.Pipe;
+import com.sun.xml.ws.api.pipe.ServerPipeAssemblerContext;
+import com.sun.istack.NotNull;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class MessageLogPipelineHook extends ServerPipelineHook
+{
+
+   public
+   @NotNull
+   Pipe createMonitoringPipe(ServerPipeAssemblerContext ctxt, @NotNull Pipe tail)
+   {
+      return new DumpPipe("Message Log", System.out, tail);
+   }
+}

Copied: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java (from rev 4876, stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java)
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java	                        (rev 0)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -0,0 +1,201 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.metadata;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.server.BoundEndpoint;
+import com.sun.xml.ws.api.server.Container;
+import com.sun.xml.ws.api.server.Module;
+import com.sun.xml.ws.api.server.ResourceInjector;
+import com.sun.xml.ws.api.server.ServerPipelineHook;
+import com.sun.xml.ws.transport.http.DeploymentDescriptorParser;
+import com.sun.xml.ws.transport.http.ResourceLoader;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapterList;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.stack.sunri.DeploymentDescriptorParserExt;
+import org.jboss.wsf.stack.sunri.log.MessageLogPipelineHook;
+
+import javax.xml.ws.WebServiceException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Creates a Metro runtime model and associates it with the deployment.
+ * Doing so requires a valid runtime loader present, that will act as a temporary
+ * thread local classloader. <p>The <code>spi.Endpoint</code> carries a Metro <code>ServletAdapter</code>
+ * that is associated with the runtime model:<br>
+ * <code>(Endpoint.getAttachment(ServletAdapter.class))</code>
+ * This adapter acts as the main entry point for SOAP/HTTP requests.
+ * Please note that the current implementation doesnt support the stream based RequestHandler API.
+ *
+ * @see org.jboss.wsf.stack.sunri.RequestHandlerImpl
+ * @see org.jboss.wsf.stack.sunri.DeploymentDescriptorParserExt
+ *
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class RuntimeModelDeploymentAspect extends DeploymentAspect
+{
+   private static final org.jboss.logging.Logger log = Logger.getLogger(RuntimeModelDeploymentAspect.class);
+
+   protected static final String JAXWS_RI_RUNTIME = "/WEB-INF/sun-jaxws.xml";
+
+   public static final String PARAM_SUN_JAXWS_URL = "jbossws-sun-jaxws-url";
+   
+   public void create(Deployment deployment)
+   {
+      ClassLoader runtimeLoader = deployment.getRuntimeClassLoader();
+      if(null == runtimeLoader)
+         throw new IllegalArgumentException("Null runtimeLoader");
+
+      ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader();
+      JBossWSContainer container = new JBossWSContainer();
+
+      try
+      {
+         // Metro uses the thread contetx classloader in several places
+         Thread.currentThread().setContextClassLoader(runtimeLoader);
+
+         ResourceLoaderAdapter resourceLoaderAdapter = new ResourceLoaderAdapter(runtimeLoader);
+         ResourceLoader resourceLoader = new VFSResourceLoader(resourceLoaderAdapter);
+
+         // TODO: refactor to general HTTPAdapter usage 
+         ServletAdapterList adapterList = new ServletAdapterList();
+
+         // Parse the descriptor file and build endpoint infos
+         DeploymentDescriptorParserExt<ServletAdapter> parser =
+           createDeploymentDescriptorParser(runtimeLoader, container, resourceLoader, adapterList);
+
+         //URL sunJaxWsXml = getDDUrlFromResourceLoader(resourceLoaderAdapter);
+         URL sunJaxWsXml = getDDUrlFromContext(deployment);
+         
+         List<ServletAdapter> adapters = parser.parse(sunJaxWsXml.toExternalForm(), sunJaxWsXml.openStream());
+         
+         for(ServletAdapter adapter : adapters)
+         {
+            for(Endpoint ep : deployment.getService().getEndpoints() )
+            {
+               // TODO matching need to be improved
+               if(ep.getShortName().equals(adapter.getName())&&                 
+                 ep.getTargetBeanClass().equals(adapter.getEndpoint().getImplementationClass()))
+               {
+                  ep.addAttachment(ServletAdapter.class, adapter);
+                  break;
+               }
+            }                       
+         }
+
+      }
+      catch (Throwable e)
+      {         
+         throw new WebServiceException("Failed to build METRO runtime model", e);
+      }
+      finally{
+         Thread.currentThread().setContextClassLoader(origClassLoader);
+      }
+
+   }
+
+   private URL getDDUrlFromContext(Deployment deployment)
+     throws MalformedURLException
+   {
+      HashMap<String, String> contextProperties =
+        (HashMap<String, String>)deployment.getProperty("org.jboss.ws.webapp.ContextParameterMap");
+      URL sunJaxWsXml = new URL(contextProperties.get(PARAM_SUN_JAXWS_URL));
+      return sunJaxWsXml;
+   }
+
+   /**
+    * Externalized for integration
+    */
+   protected DeploymentDescriptorParserExt<ServletAdapter> createDeploymentDescriptorParser(
+     ClassLoader classLoader, JBossWSContainer container,
+     ResourceLoader resourceLoader, DeploymentDescriptorParser.AdapterFactory<ServletAdapter> adapterList)
+     throws MalformedURLException
+   {
+      DeploymentDescriptorParserExt<ServletAdapter> parser =
+        new DeploymentDescriptorParserExt<ServletAdapter>(classLoader, resourceLoader, container, adapterList);
+      return parser;
+   }
+
+   /**
+    * Externalized for integration
+    */
+   protected URL getDDUrlFromResourceLoader(UnifiedVirtualFile vfsRoot) throws IOException
+   {
+      URL sunJaxWsXml = vfsRoot.findChild(JAXWS_RI_RUNTIME).toURL();
+      return sunJaxWsXml;
+   }
+
+
+   /**
+    * Provides access to {@link javax.servlet.ServletContext} via {@link com.sun.xml.ws.api.server.Container}. Pipes
+    * can get ServletContext from Container and use it to load some resources.
+    */
+   static class JBossWSContainer extends Container
+   {
+      private final Module module = new Module()
+      {
+         private final List<BoundEndpoint> endpoints = new ArrayList<BoundEndpoint>();
+
+         public @NotNull
+         List<BoundEndpoint> getBoundEndpoints()
+         {
+            return endpoints;
+         }
+      };
+
+      JBossWSContainer()
+      {
+      }
+
+      public <T> T getSPI(Class<T> spiType)
+      {
+         if (spiType == Module.class)
+         {
+            return spiType.cast(module);
+         }
+         else if(spiType == ResourceInjector.class)
+         {
+            return (T)ResourceInjector.STANDALONE;
+         }
+         else if (spiType == ServerPipelineHook.class)
+         {
+            return (T)new MessageLogPipelineHook();
+         }
+
+         log.warn("Unable to resolve SPI for type: " + spiType);
+         return null;
+      }
+   }
+
+}

Copied: stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java (from rev 4876, stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java)
===================================================================
--- stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java	                        (rev 0)
+++ stack/metro/trunk/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java	2007-10-24 11:05:30 UTC (rev 4880)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.metadata;
+
+import com.sun.xml.ws.transport.http.ResourceLoader;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.logging.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.jar.JarFile;
+import java.util.jar.JarEntry;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class VFSResourceLoader implements ResourceLoader
+{
+
+   private static final Logger log = Logger.getLogger(VFSResourceLoader.class);
+
+   UnifiedVirtualFile vfs;
+
+   public VFSResourceLoader(UnifiedVirtualFile vfs)
+   {
+      this.vfs = vfs;
+   }
+
+   public URL getResource(String path) throws MalformedURLException
+   {
+      try
+      {
+         if(path.startsWith("/"))
+            path = path.substring(1, path.length());
+
+         return vfs.findChild(path).toURL();
+      }
+      catch (IOException e)
+      {
+         throw new MalformedURLException(e.getMessage());
+      }
+   }
+
+   public URL getCatalogFile() throws MalformedURLException
+   {
+      URL resource = null;
+      try
+      {
+         resource = getResource("/WEB-INF/jax-ws-catalog.xml");
+      }
+      catch (MalformedURLException e)
+      {
+         // ingore
+      }
+      return resource;
+   }
+
+   public Set<String> getResourcePaths(String path)
+   {
+      Set<String> resources = new HashSet<String>();
+
+      try
+      {
+         URL rootUrl = getResource(path);
+         if(rootUrl.getProtocol().equals("jar"))
+         {
+            /*String urlString = rootUrl.toExternalForm();
+            String jarRoot = urlString.substring(4, urlString.indexOf("jar!")+3);
+           
+            File jar = new File(jarRoot);
+            assert jar.exists();
+            JarFile jarFile = new JarFile(jar);
+            
+            List<String> jarResources = getJARResources(jarFile, path);
+
+            resources.addAll(jarResources);*/
+            log.warn("Cannot collect resourcePaths from EJB jar");
+         }
+         else
+         {
+            File root = new File(  rootUrl.toURI() );
+            List<String> fileResources = getFileResources(root, path);
+            resources.addAll(fileResources);
+         }
+      }
+      catch (Exception e)
+      {
+         log.error("Failed to read resource paths from '"+path+"': ", e);
+      }
+
+      return resources;
+   }
+
+   private static List<String> getFileResources(File root, String path)
+   {
+      List<String> resources = new ArrayList<String>();
+
+      if(root.exists())
+      {
+         File[] files = root.listFiles();
+         if (files != null) {
+            for( File f : files) {
+               if(f.isDirectory()) {
+                  resources.add(path+f.getName()+'/');
+               } else {
+                  resources.add(path+f.getName());
+               }
+            }
+         }
+      }
+      return resources;
+   }
+
+   private static List<String> getJARResources(JarFile jarFile, String path) {
+      List<String> resources = new ArrayList<String>();
+
+      Enumeration entries = jarFile.entries();
+      while (entries.hasMoreElements()) {
+         JarEntry entry = (JarEntry) entries.nextElement();
+         String entryName = entry.getName();
+
+         if (entryName.matches(".*?\\.xml$")
+           || entryName.matches(".*?\\.wsdl$")
+           || entryName.matches(".*?\\.xsd$"))
+         {
+            resources.add(entryName);
+         }
+      }
+
+      return resources;
+   }
+}

Modified: stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml	2007-10-24 11:05:30 UTC (rev 4880)
@@ -57,24 +57,28 @@
     <property name="provides">ContextProperties</property>
     <property name="contextProperties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
-        <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.sunri.EndpointServlet</value></entry>
-        <entry><key>org.jboss.ws.webapp.ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
+        <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.sunri.EndpointServlet</value></entry>        
       </map>
     </property>
   </bean>
-  
+
+
   <bean name="WSMetroEndpointHandlerDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
     <property name="requires">ContainerEndpointHandler</property>
-    <property name="provides">StackEndpointHandler</property>   
+    <property name="provides">StackEndpointHandler</property>
   </bean>
-  
+
   <bean name="WSMetroDescriptorDeploymentAspect" class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect">
     <property name="requires">URLPattern</property>
     <property name="provides">StackDescriptor</property>
   </bean>
-  
-  <!-- Deployment aspect installers -->  
 
+  <bean name="WSRuntimeModelDeploymentAspect" class="org.jboss.wsf.stack.sunri.metadata.RuntimeModelDeploymentAspect">
+    <property name="requires">RuntimeLoader, StackDescriptor</property>
+    <property name="provides">RuntimeModel</property>
+  </bean>
+      <!-- Deployment aspect installers -->
+
   <!-- Phase 1 -->
   <bean name="WSMetroDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
     <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
@@ -95,6 +99,7 @@
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">        
         <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
+        <inject bean="WSRuntimeModelDeploymentAspect"/>
       </set>
     </property>
     <depends>WSDeploymentAspectInstallerPostJSE</depends>
@@ -108,6 +113,7 @@
         <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
         <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
         <inject bean="WSMetroDescriptorDeploymentAspect"/>
+        <inject bean="WSRuntimeModelDeploymentAspect"/>
       </set>
     </property>
     <depends>WSDeploymentAspectInstallerEJB</depends>

Modified: stack/metro/trunk/version.properties
===================================================================
--- stack/metro/trunk/version.properties	2007-10-24 10:55:20 UTC (rev 4879)
+++ stack/metro/trunk/version.properties	2007-10-24 11:05:30 UTC (rev 4880)
@@ -19,11 +19,13 @@
 jbossws-spi=1.0.0.GA
 jbossws-jboss42=2.0.1.GA
 
+junit=3.8.1
 jboss-common-core=2.0.2.GA
 jboss-common-logging-spi=2.0.2.GA
 jboss-javaee=5.0.0-SNAPSHOT
 jboss-jaxr=1.2.0.GA
 jboss-security-spi=2.0.0.Beta
+sun-jaf=1.1
 sun-jaxb=2.1.4
 sun-jaxrpc=1.1
 sun-jaxws=2.1.1




More information about the jbossws-commits mailing list