You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2007/02/06 09:24:55 UTC

svn commit: r504026 - in /incubator/cxf/trunk: ./ api/src/main/java/org/apache/cxf/endpoint/ distribution/src/main/release/etc/ rt/frontend/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxw...

Author: ningjiang
Date: Tue Feb  6 00:24:53 2007
New Revision: 504026

URL: http://svn.apache.org/viewvc?view=rev&rev=504026
Log:
1. [CXF-342] Moved the servlet transport from jaxws frontend to http transport
2. [CXF-344] Moved the Jaxws servlet test to systest 
3. Also get ?wsdl work again in CXF Servlet.

NOTE this commitment will effect to  CXF servlet demos and CPI tests.
Please update the web.xml by changing the <servlet-class> element value from "org.apache.cxf.jaxws.servlet.CXFServlet" to "org.apache.cxf.transport.servlet.CXFServlet" 

Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java   (with props)
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/
      - copied from r502142, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
      - copied, changed from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/Messages.properties
      - copied unchanged from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/Messages.properties
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
      - copied, changed from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletController.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
      - copied, changed from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java
      - copied, changed from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/AbstractServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/CXFServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/ExternalServicesServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/SpringServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/cxf-servlet.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml
      - copied unchanged from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/spring.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-external.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-spring.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml
      - copied, changed from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web.xml
Removed:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-servlet.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/
Modified:
    incubator/cxf/trunk/distribution/src/main/release/etc/web.xml
    incubator/cxf/trunk/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
    incubator/cxf/trunk/rt/transports/http/pom.xml
    incubator/cxf/trunk/systests/pom.xml

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java Tue Feb  6 00:24:53 2007
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.endpoint;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+
+/**
+ * The Publish API for the different front-end Endpoint 
+ *
+ */
+public interface EndpointPublisher {
+    
+    void buildEndpoint(Bus bus, String implName, String serviceName, URL wsdl, String portName) 
+        throws BusException; 
+    
+    void publish(String address) throws BusException;    
+}

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointPublisher.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/distribution/src/main/release/etc/web.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/etc/web.xml?view=diff&rev=504026&r1=504025&r2=504026
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/etc/web.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/etc/web.xml Tue Feb  6 00:24:53 2007
@@ -26,7 +26,7 @@
         <servlet-name>cxf</servlet-name>
         <display-name>cxf</display-name>
         <description>Apache CXF Endpoint</description>
-        <servlet-class>org.apache.cxf.jaxws.servlet.CXFServlet</servlet-class>
+        <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet-mapping>

Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?view=diff&rev=504026&r1=504025&r2=504026
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Tue Feb  6 00:24:53 2007
@@ -329,6 +329,7 @@
                         <excludes>
                             <exclude>**/*$*</exclude>
                             <exclude>**/LocatorClientServerTest.java</exclude>
+                            <exclude>**/AbstractServletTest.java</exclude>
                         </excludes>
                         <reportFormat>${surefire.format}</reportFormat>
                         <useFile>${surefire.usefile}</useFile>
@@ -422,12 +423,6 @@
                 <groupId>httpunit</groupId>
                 <artifactId>httpunit</artifactId>
                 <version>1.6.1</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>rhino</groupId>
-                        <artifactId>js</artifactId>
-                    </exclusion>
-                </exclusions>
             </dependency>
             <dependency>
                 <groupId>jtidy</groupId>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/pom.xml?view=diff&rev=504026&r1=504025&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/pom.xml Tue Feb  6 00:24:53 2007
@@ -42,11 +42,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>httpunit</groupId>
-            <artifactId>httpunit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>jtidy</groupId>
             <artifactId>jtidy</artifactId>
             <scope>test</scope>

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java Tue Feb  6 00:24:53 2007
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxws;
+
+import java.net.URL;
+
+import javax.xml.ws.Provider;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.endpoint.EndpointPublisher;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
+import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
+
+public class EndpointPublisherImpl implements EndpointPublisher {
+    private EndpointImpl ep;
+
+    @SuppressWarnings("unchecked")
+    public void buildEndpoint(Bus bus,
+                              String implName,
+                              String serviceName,
+                              URL wsdl,
+                              String portName) 
+        throws BusException {
+        try {
+            Class cls = ClassLoaderUtils.loadClass(implName, getClass());
+            Object impl = cls.newInstance();
+    
+            JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(cls);
+            JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
+            serviceFactory.setBus(bus);
+            if (implInfo.isWebServiceProvider()) {
+                serviceFactory.setInvoker(new ProviderInvoker((Provider<?>)impl));
+            } else {
+                serviceFactory.setInvoker(new JAXWSMethodInvoker(impl));
+            }
+            serviceFactory.setServiceClass(impl.getClass());
+            
+            if (null != wsdl) {
+                serviceFactory.setWsdlURL(wsdl);
+            }
+            
+            ep = new EndpointImpl(bus, impl, serviceFactory);        
+                
+        } catch (ClassNotFoundException ex) {
+            throw new BusException(ex);
+        } catch (InstantiationException ex) {
+            throw new BusException(ex);
+        } catch (IllegalAccessException ex) {
+            throw new BusException(ex);
+        }
+        
+    }
+
+    public void publish(String address) throws BusException {        
+        ep.publish(address);        
+    }
+
+}

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointPublisherImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/transports/http/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/pom.xml?view=diff&rev=504026&r1=504025&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/pom.xml (original)
+++ incubator/cxf/trunk/rt/transports/http/pom.xml Tue Feb  6 00:24:53 2007
@@ -53,6 +53,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-tools-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-core</artifactId>
             <version>${project.version}</version>
         </dependency>

Copied: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java (from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java&r1=503961&p2=incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java Tue Feb  6 00:24:53 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.transport.servlet;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -36,7 +36,7 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.ws.Provider;
+
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -47,12 +47,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.common.classloader.ClassLoaderUtils;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.jaxws.JAXWSMethodInvoker;
-import org.apache.cxf.jaxws.ProviderInvoker;
-import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
-import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
+import org.apache.cxf.endpoint.EndpointPublisher;
 import org.apache.cxf.resource.URIResolver;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
@@ -69,18 +64,22 @@
     static final String ADDRESS_PERFIX = "http://localhost/services";
     static final Map<String, WeakReference<Bus>> BUS_MAP = new Hashtable<String, WeakReference<Bus>>();
     static final Logger LOG = Logger.getLogger(CXFServlet.class.getName());
-    protected Bus bus;
-
+    
+    private Bus bus;
     private ServletTransportFactory servletTransportFactory;
     private ServletController controller;
 
     public ServletController createServletController() {
-        return new ServletController(servletTransportFactory, this.getServletContext());
+        return new ServletController(servletTransportFactory, this.getServletContext(), this);
     }
 
     public ServletController getController() {
         return controller;
     }
+    
+    public Bus getBus() {
+        return bus;
+    }
 
     public void init(ServletConfig servletConfig) throws ServletException {
         super.init(servletConfig);
@@ -108,7 +107,13 @@
             }
             
             // This constructor works whether there is a context or not
-            bus = new SpringBusFactory(ctx).createBus();
+            // If the ctx is null, we need to load the cxf-servlet as default
+            if (ctx == null) {
+                bus = new SpringBusFactory().createBus("/META-INF/cxf/cxf-servlet.xml");
+            } else {
+                bus = new SpringBusFactory(ctx).createBus();
+            }
+            
             SpringBusFactory.setDefaultBus(bus);
         }
         if (null != busid) {
@@ -129,6 +134,7 @@
         if (location == null) {
             location = "/WEB-INF/cxf-servlet.xml";
         }
+                 
         InputStream ins = servletConfig.getServletContext().getResourceAsStream(location);
 
         if (ins == null) {
@@ -184,37 +190,29 @@
 
     public void buildEndpoint(ServletConfig servletConfig, Node node) throws ServletException {
         Element el = (Element)node;
+        String publisherName = el.getAttribute("publisher");
         String implName = el.getAttribute("implementation");
         String serviceName = el.getAttribute("service");
         String wsdlName = el.getAttribute("wsdl");
         String portName = el.getAttribute("port");
         String urlPat = el.getAttribute("url-pattern");
 
-        buildEndpoint(implName, serviceName, wsdlName, portName, urlPat);
+        buildEndpoint(publisherName, implName, serviceName, wsdlName, portName, urlPat);
     }
 
     @SuppressWarnings("unchecked")
-    public void buildEndpoint(String implName, String serviceName, String wsdlName, String portName,
+    public void buildEndpoint(String publisherName,
+                              String implName, 
+                              String serviceName, 
+                              String wsdlName, 
+                              String portName,
                               String urlPat) throws ServletException {
 
         try {
-                    
-            Class cls = ClassLoaderUtils.loadClass(implName, getClass());
-            Object impl = cls.newInstance();
-
-            JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(cls);
-
-            JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
-            serviceFactory.setBus(bus);
-            if (implInfo.isWebServiceProvider()) {
-                serviceFactory.setInvoker(new ProviderInvoker((Provider<?>)impl));
-            } else {
-                serviceFactory.setInvoker(new JAXWSMethodInvoker(impl));
-            }
-            serviceFactory.setServiceClass(impl.getClass());
+            URL url = null;
             
             if (!"".equals(wsdlName)) {
-                URL url = null;
+                
                 try {
                     url = new URL(wsdlName);
                 } catch (MalformedURLException e) {
@@ -233,16 +231,23 @@
                     } catch (MalformedURLException e) {
                         //ignore
                     }
-                }
-                serviceFactory.setWsdlURL(url);
+                }                
+            }
+            if (null == publisherName || publisherName.length() == 0) {
+                publisherName = "org.apache.cxf.jaxws.EndpointPublisherImpl";
             }
+            System.out.println("[publisherName] " + publisherName);
+            EndpointPublisher publisher = (EndpointPublisher)Class.forName(publisherName).newInstance();
             
-            EndpointImpl ep = new EndpointImpl(bus, impl, serviceFactory);
+            publisher.buildEndpoint(bus, implName, serviceName, url, portName);
+
             LOG.info("publish the servcie to {context}/ " + (urlPat.charAt(0) == '/' ? "" : "/") + urlPat);
             
             // TODO we may need to get the url-pattern from servlet context
-            ep.publish(ADDRESS_PERFIX + (urlPat.charAt(0) == '/' ? "" : "/") + urlPat);
+            publisher.publish(ADDRESS_PERFIX + (urlPat.charAt(0) == '/' ? "" : "/") + urlPat);
             
+        } catch (BusException ex) {
+            throw new ServletException(ex.getCause());        
         } catch (ClassNotFoundException ex) {
             throw new ServletException(ex);
         } catch (InstantiationException ex) {

Copied: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java (from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletController.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletController.java&r1=503961&p2=incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletController.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java Tue Feb  6 00:24:53 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.transport.servlet;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -60,10 +60,12 @@
 
     private ServletTransportFactory transport;
     private ServletContext servletContext;
+    private CXFServlet cxfServlet;
 
-    public ServletController(ServletTransportFactory df, ServletContext servCont) {
+    public ServletController(ServletTransportFactory df, ServletContext servCont, CXFServlet servlet) {
         this.transport = df;
-        this.servletContext = servCont;   
+        this.servletContext = servCont;
+        this.cxfServlet = servlet;
     }
 
     public void invoke(HttpServletRequest request, HttpServletResponse res) throws ServletException {
@@ -178,8 +180,7 @@
                                 HttpServletResponse response, 
                                 ServletDestination d)
         throws ServletException {
-        response.setHeader(HttpHeaderHelper.CONTENT_TYPE, "text/xml");
-
+        
         try {
             OutputStream os = response.getOutputStream();
 
@@ -199,17 +200,20 @@
                 }
             }
             
-            Bus bus = CXFServlet.BUS_MAP.get("bus.id").get();
+            Bus bus = cxfServlet.getBus();
             if (bus.getExtension(QueryHandlerRegistry.class) != null) { 
                 for (QueryHandler qh : bus.getExtension(QueryHandlerRegistry.class).getHandlers()) {
-                    if (qh.isRecognizedQuery(request.getQueryString(), ei)) {
-                      
-                        try {
-                            qh.writeResponse(request.getRequestURL().toString(), ei, os);
-                        } catch (Exception e) {
-                            throw new ServletException(e);
+                    if (null != request.getQueryString() && request.getQueryString().length() > 0) {
+                        String requestURL = request.getPathInfo() + "?" + request.getQueryString();
+                        if (qh.isRecognizedQuery(requestURL, ei)) {
+                            response.setContentType(qh.getResponseContentType(requestURL));
+                            try {
+                                qh.writeResponse(requestURL, ei, os);
+                            } catch (Exception e) {
+                                throw new ServletException(e);
+                            }
                         }
-                    }
+                    }   
                 }
             }
 

Copied: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java (from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java&r1=503961&p2=incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java Tue Feb  6 00:24:53 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.transport.servlet;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -26,7 +26,6 @@
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Level;
@@ -190,26 +189,6 @@
      * @param headers the current set of headers
      */
     protected void copyResponseHeaders(Message message, HttpServletResponse response) {
-        
-        Map<?, ?> headers = (Map<?, ?>)message.get(Message.PROTOCOL_HEADERS);
-        if (null != headers) {
-            if (!headers.containsKey(Message.CONTENT_TYPE)) {
-                setContentType(message, response);
-            }
-            for (Iterator<?> iter = headers.keySet().iterator(); iter.hasNext();) {
-                String header = (String)iter.next();
-                List<?> headerList = (List<?>)headers.get(header);
-                for (Object value : headerList) {
-                    response.addHeader(header, (String)value);
-                }
-            }
-        } else {
-            setContentType(message, response);
-        }
-        
-    }
-
-    protected void setContentType(Message message, HttpServletResponse response) {
         String ct = (String) message.get(Message.CONTENT_TYPE);
         String enc = (String) message.get(Message.ENCODING);
         
@@ -222,6 +201,7 @@
             response.setContentType("text/xml; charset=" + enc);
         }
     }
+    
     
     
     protected void doMessage(MessageImpl inMessage) throws IOException {

Copied: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java (from r503961, incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java&r1=503961&p2=incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java Tue Feb  6 00:24:53 2007
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.transport.servlet;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -26,6 +26,7 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 
 import org.apache.cxf.Bus;
@@ -33,6 +34,8 @@
 import org.apache.cxf.transport.AbstractTransportFactory;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.DestinationFactory;
+import org.apache.cxf.transport.http.WSDLQueryHandler;
+import org.apache.cxf.transports.http.QueryHandlerRegistry;
 
 public class ServletTransportFactory extends AbstractTransportFactory
     implements DestinationFactory {
@@ -55,6 +58,18 @@
     @Resource
     public void setBus(Bus bus) {
         this.bus = bus;
+    }
+    
+    @PostConstruct
+    void registerWithQueryHandler() {
+        if (null == bus) {
+            return;
+        }
+                
+        QueryHandlerRegistry qhr = bus.getExtension(QueryHandlerRegistry.class);
+        if (null != qhr) {
+            qhr.registerHandler(new WSDLQueryHandler());
+        }
     }
 
     public Destination getDestination(EndpointInfo endpointInfo)

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml Tue Feb  6 00:24:53 2007
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean id="org.apache.cxf.transports.http.QueryHandlerRegistry" class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl">
+        <property name="bus" ref="cxf"/>
+    </bean>
+    
+    <bean class="org.apache.cxf.transport.servlet.ServletTransportFactory">
+        <property name="bus" ref="cxf"/>
+        <property name="transportIds">
+            <set>
+                <value>http://schemas.xmlsoap.org/soap/http</value>
+                <value>http://schemas.xmlsoap.org/wsdl/http/</value>
+                <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
+ 	            <value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
+                <value>http://cxf.apache.org/transports/http/configuration</value>
+            </set>
+        </property>
+    </bean>
+     
+</beans>

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?view=diff&rev=504026&r1=504025&r2=504026
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Tue Feb  6 00:24:53 2007
@@ -162,11 +162,24 @@
                 <artifactId>activemq-core</artifactId>
                 <scope>test</scope>
         </dependency>
+        
+        <dependency>
+            <groupId>httpunit</groupId>
+            <artifactId>httpunit</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
         </dependency>
+ 
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <scope>test</scope>
+            <version>${spring.version}</version>
+        </dependency> 
 
         <dependency>
             <groupId>junit</groupId>
@@ -186,12 +199,14 @@
         <dependency>
             <groupId>rhino</groupId>
             <artifactId>js</artifactId>
-            <scope>provided</scope>
+            <version>1.6R5</version>              
+            <scope>test</scope>
         </dependency>
+
         <dependency>
             <groupId>xmlbeans</groupId>
             <artifactId>xbean</artifactId>
-            <scope>provided</scope>
+            <scope>test</scope>
         </dependency>
         
     </dependencies>

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/AbstractServletTest.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/AbstractServletTest.java&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/AbstractServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java Tue Feb  6 00:24:53 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.systest.servlet;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -52,7 +52,7 @@
     } 
     
     public void tearDown() {
-        bus.shutdown(false);
+        BusFactory.getDefaultBus().shutdown(false);
         BusFactory.setDefaultBus(null);                
     }
        
@@ -70,7 +70,7 @@
      * @return The web.xml to use for testing.
      */
     protected String getConfiguration() {
-        return "/org/apache/cxf/jaxws/servlet/web.xml";
+        return "/org/apache/cxf/systest/servlet/web.xml";
     }
 
     protected ServletUnitClient newClient() {

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/CXFServletTest.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/CXFServletTest.java&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/CXFServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Tue Feb  6 00:24:53 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.systest.servlet;
 
 import java.net.URL;
 
@@ -34,10 +34,11 @@
 import org.apache.cxf.service.invoker.BeanInvoker;
 import org.apache.hello_world_soap_http.GreeterImpl;
 
-public class CXFServletTest extends AbstractServletTest {
-    public void testPostInvokeServices() throws Exception {
-        newClient();
 
+public class CXFServletTest extends AbstractServletTest {
+    
+    // Create the 
+    protected void setupJaxwsService() {
         JaxWsServerFactoryBean svr = new JaxWsServerFactoryBean();
         URL resource = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(resource);
@@ -45,23 +46,31 @@
         svr.setBus(getBus());
         svr.setServiceClass(GreeterImpl.class);
         svr.setAddress("http://localhost/services/Greeter");
-
         GreeterImpl greeter = new GreeterImpl();
         BeanInvoker invoker = new BeanInvoker(greeter);
         svr.getServiceFactory().setInvoker(invoker);
 
         svr.create();
-
+        
+    }
+    
+    public void testPostInvokeServices() throws Exception {
+        setupJaxwsService();
+        
+        //Thread.sleep(6000000);
+        //newClient();        
         invoke("UTF-8");
-        invoke("iso-8859-1");
+        invoke("iso-8859-1");        
     }
 
-    private void invoke(String encoding) throws Exception {
+    private void invoke(String encoding) throws Exception {        
         WebRequest req = new PostMethodWebRequest("http://localhost/services/Greeter", 
-            getClass().getResourceAsStream("/org/apache/cxf/jaxws/GreeterMessage.xml"), 
+            getClass().getResourceAsStream("GreeterMessage.xml"), 
             "text/xml; charset=" + encoding);
-
-        WebResponse response = newClient().getResponse(req);
+        
+        ServletUnitClient client = newClient();
+        WebResponse response = client.getResponse(req);
+        client.setExceptionsThrownOnErrorStatus(false);
 
         assertEquals("text/xml", response.getContentType());
         assertEquals(encoding, response.getCharacterSet());
@@ -72,26 +81,12 @@
         addNamespace("h", "http://apache.org/hello_world_soap_http/types");
 
         assertValid("/s:Envelope/s:Body", doc);
-        assertValid("//h:sayHiResponse", doc);
+        assertValid("//h:sayHiResponse", doc);        
     }
     
     public void testGetServiceList() throws Exception {
         ServletUnitClient client = newClient();
-        
-        JaxWsServerFactoryBean svr = new JaxWsServerFactoryBean();
-        URL resource = getClass().getResource("/wsdl/hello_world.wsdl");
-        assertNotNull(resource);
-        svr.getServiceFactory().setWsdlURL(resource);
-        svr.setBus(getBus());
-        svr.setServiceClass(GreeterImpl.class);
-        svr.setAddress("http://localhost/services/Greeter");
-
-        GreeterImpl greeter = new GreeterImpl();
-        BeanInvoker invoker = new BeanInvoker(greeter);
-        svr.getServiceFactory().setInvoker(invoker);
-
-        svr.create();
-        
+        setupJaxwsService();
         client.setExceptionsThrownOnErrorStatus(false);
 
         WebResponse res = client.getResponse("http://localhost/services");       
@@ -99,6 +94,20 @@
         assertEquals("There should get one link for service", links.length, 1);
         assertEquals(links[0].getURLString(), "http://localhost/services/Greeter?wsdl");       
         assertEquals("text/html", res.getContentType());
+    }
+    
+    public void testGetWSDL() throws Exception {
+        ServletUnitClient client = newClient();
+        setupJaxwsService();
+        client.setExceptionsThrownOnErrorStatus(true);
+        
+        WebRequest req = new GetMethodQueryWebRequest("http://localhost/services/Greeter?wsdl");
+        
+        WebResponse res = client.getResponse(req); 
+        assertEquals(200, res.getResponseCode());
+        assertEquals("text/xml", res.getContentType());
+        assertTrue("the wsdl should contain the opertion greetMe",
+                   res.getText().contains("<wsdl:operation name=\"greetMe\">"));
     }
 
     public void testInvalidServiceUrl() throws Exception {

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/ExternalServicesServletTest.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/ExternalServicesServletTest.java&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/ExternalServicesServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java Tue Feb  6 00:24:53 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.systest.servlet;
 
 import org.w3c.dom.Document;
 
@@ -30,14 +30,14 @@
     
     @Override
     protected String getConfiguration() {
-        return "/org/apache/cxf/jaxws/servlet/web-external.xml";
+        return "/org/apache/cxf/systest/servlet/web-external.xml";
     }
 
     public void testPostInvokeServices() throws Exception {
         newClient();
         
         WebRequest req = new PostMethodWebRequest("http://localhost/services/greeter1",
-                getClass().getResourceAsStream("/org/apache/cxf/jaxws/GreeterMessage.xml"),
+                getClass().getResourceAsStream("GreeterMessage.xml"),
                 "text/xml; charset=UTF-8");
         
         WebResponse response = newClient().getResponse(req);

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java Tue Feb  6 00:24:53 2007
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.servlet;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+
+//Customer WebRequest for sending the "http://localhost/xxx?wsdl" request
+public class GetMethodQueryWebRequest extends GetMethodWebRequest {
+    private String urlString;
+    
+    public GetMethodQueryWebRequest(String urlStr) {        
+        super(urlStr);
+        urlString = urlStr;        
+    }
+    
+    public String getQueryString() {
+        int pos = urlString.indexOf('?');
+        if (pos > 0) {
+            return urlString.substring(pos + 1);
+        } else {
+            return "";
+        }                
+    }
+    
+    
+
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GetMethodQueryWebRequest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml Tue Feb  6 00:24:53 2007
@@ -0,0 +1,23 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
+ <env:Body>
+  <m:sayHi xmlns:m="http://apache.org/hello_world_soap_http/types"/>
+ </env:Body>
+</env:Envelope>
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/GreeterMessage.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/SpringServletTest.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/SpringServletTest.java&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/SpringServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Tue Feb  6 00:24:53 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxws.servlet;
+package org.apache.cxf.systest.servlet;
 
 import org.w3c.dom.Document;
 
@@ -29,13 +29,13 @@
 public class SpringServletTest extends AbstractServletTest {
     @Override
     protected String getConfiguration() {
-        return "/org/apache/cxf/jaxws/servlet/web-spring.xml";
+        return "/org/apache/cxf/systest/servlet/web-spring.xml";
     }
 
     public void testInvokingSpringBeans() throws Exception {
 
         WebRequest req = new PostMethodWebRequest("http://localhost/services/Greeter",
-            getClass().getResourceAsStream("/org/apache/cxf/jaxws/GreeterMessage.xml"),
+            getClass().getResourceAsStream("GreeterMessage.xml"),
             "text/xml; charset=utf-8");
 
         WebResponse response = newClient().getResponse(req);

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/cxf-servlet.xml?view=auto&rev=504026
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/cxf-servlet.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/cxf-servlet.xml Tue Feb  6 00:24:53 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<endpoints>
+
+    <endpoint
+        name="greeter1"        
+        implementation="org.apache.hello_world_soap_http.GreeterImpl"
+        url-pattern="/greeter1" />
+
+    <endpoint
+        name="greeter2"
+        publisher="org.apache.cxf.jaxws.EndpointPublisherImpl"
+        implementation="org.apache.hello_world_soap_http.GreeterImpl"
+        url-pattern="/greeter2" />
+
+</endpoints>
\ No newline at end of file

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-external.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-external.xml&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-external.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml Tue Feb  6 00:24:53 2007
@@ -29,11 +29,11 @@
     <servlet-name>CXFServlet</servlet-name>
     <display-name>CXF Servlet</display-name>
     <servlet-class>
-        org.apache.cxf.jaxws.servlet.CXFServlet
+        org.apache.cxf.transport.servlet.CXFServlet
     </servlet-class>
     <init-param>
       <param-name>config-location</param-name>
-      <param-value>org/apache/cxf/jaxws/servlet/cxf-servlet.xml</param-value>
+      <param-value>org/apache/cxf/systest/servlet/cxf-servlet.xml</param-value>
     </init-param>
   </servlet>
 

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-spring.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-spring.xml&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web-spring.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml Tue Feb  6 00:24:53 2007
@@ -27,7 +27,7 @@
 	<context-param>
 		<param-name>contextConfigLocation</param-name>
 		<param-value>
-			classpath:org/apache/cxf/jaxws/servlet/spring.xml
+			classpath:org/apache/cxf/systest/servlet/spring.xml
 		</param-value>
 	</context-param>
 
@@ -41,7 +41,7 @@
 		<servlet-name>CXFServlet</servlet-name>
 		<display-name>CXF Servlet</display-name>
 		<servlet-class>
-			org.apache.cxf.jaxws.servlet.CXFServlet
+			org.apache.cxf.transport.servlet.CXFServlet
 		</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml (from r502088, incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml?view=diff&rev=504026&p1=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web.xml&r1=502088&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml&r2=504026
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/web.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml Tue Feb  6 00:24:53 2007
@@ -29,7 +29,7 @@
     <servlet-name>CXFServlet</servlet-name>
     <display-name>CXF Servlet</display-name>
     <servlet-class>
-        org.apache.cxf.jaxws.servlet.CXFServlet
+        org.apache.cxf.transport.servlet.CXFServlet
     </servlet-class>
   </servlet>