Author: bimargulies
Date: Sun Oct 18 02:30:22 2009
New Revision: 826350

URL: http://svn.apache.org/viewvc?rev=826350&view=rev
Log:
CXF-1355 the rest of the test.

Modified:
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/spring-auto-launch.xml
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/web-spring-auto-launch.xml
    
cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java

Modified: 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java?rev=826350&r1=826349&r2=826350&view=diff
==============================================================================
--- 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
 (original)
+++ 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
 Sun Oct 18 02:30:22 2009
@@ -18,11 +18,8 @@
  */
 package org.apache.cxf.systest.servlet;
 
-import javax.xml.ws.Endpoint;
-
 import org.w3c.dom.Document;
 
-import com.meterware.httpunit.HttpNotFoundException;
 import com.meterware.httpunit.PostMethodWebRequest;
 import com.meterware.httpunit.WebRequest;
 import com.meterware.httpunit.WebResponse;
@@ -50,13 +47,13 @@
     @Test
     public void testInvokingSpringBeans() throws Exception {
 
-        WebRequest req = new PostMethodWebRequest(CONTEXT_URL + 
"/services/Greeter",
+        WebRequest req = new PostMethodWebRequest(CONTEXT_URL + 
"/services/SOAPService",
             getClass().getResourceAsStream("GreeterMessage.xml"),
             "text/xml; charset=utf-8");
 
         invokingEndpoint(req);
         
-        req = new PostMethodWebRequest(CONTEXT_URL + "/services/Greeter1",
+        req = new PostMethodWebRequest(CONTEXT_URL + 
"/services/DerivedGreeterService",
             getClass().getResourceAsStream("GreeterMessage.xml"), "text/xml; 
charset=utf-8");
         
         invokingEndpoint(req);
@@ -82,7 +79,7 @@
         client.setExceptionsThrownOnErrorStatus(true);
         
         WebRequest req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/Greeter/greetMe?"
+            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/SOAPService/greetMe?"
                                          + "requestType=hello");
         
         WebResponse response = client.getResponse(req);        
@@ -92,7 +89,7 @@
         assertValid("//h:greetMeResponse", doc);
         
         req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/Greeter1/greetMe?"
+            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/DerivedGreeterService/greetMe?"
                                          + "requestType=hello");
         
         response = client.getResponse(req);        
@@ -109,7 +106,7 @@
         client.setExceptionsThrownOnErrorStatus(true);
         
         WebRequest req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/Greeter?wsdl"); 
+            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/SOAPService?wsdl"); 
        
         WebResponse res = client.getResponse(req);        
         assertEquals(200, res.getResponseCode());
@@ -119,23 +116,10 @@
         assertNotNull(doc);
         
         assertValid("//wsdl:operati...@name='greetMe']", doc);
-        assertValid("//wsdlsoap:addre...@location='" + CONTEXT_URL + 
"/services/Greeter']", doc);
-        
-        req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/Greeter2?wsdl");
-        res = client.getResponse(req);    
-        assertEquals(200, res.getResponseCode());
-        assertEquals("text/xml", res.getContentType());
-        
-        doc = DOMUtils.readXml(res.getInputStream());
-        assertNotNull(doc);
-        
-        assertValid("//wsdl:operati...@name='greetMe']", doc);
-        
assertValid("//wsdlsoap:addre...@location='http://cxf.apache.org/Greeter']", 
doc);
+        assertValid("//wsdlsoap:addre...@location='" + CONTEXT_URL + 
"/services/SOAPService']", doc);
         
-        Endpoint.publish("/services/Greeter3", new 
org.apache.hello_world_soap_http.GreeterImpl());
         req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/Greeter3?wsdl");
+            new GetMethodQueryWebRequest(CONTEXT_URL + 
"/services/DerivedGreeterService?wsdl");
         res = client.getResponse(req);    
         assertEquals(200, res.getResponseCode());
         assertEquals("text/xml", res.getContentType());
@@ -144,22 +128,9 @@
         assertNotNull(doc);
         
         assertValid("//wsdl:operati...@name='greetMe']", doc);
-        assertValid("//wsdlsoap:addre...@location='" + CONTEXT_URL + 
"/services/Greeter3']", doc);
-
-    }
-    
-    @Test
-    public void testIgnoreServiceList() throws Exception {
-        ServletUnitClient client = newClient();
-        client.setExceptionsThrownOnErrorStatus(true);
+        assertValid("//wsdlsoap:address"
+                    + 
"[...@location='http://localhost/mycontext/services/DerivedGreeterService']", 
+                    doc);
         
-        WebRequest req = 
-            new GetMethodQueryWebRequest(CONTEXT_URL + "/services/");
-        try {
-            client.getResponse(req);
-            fail();
-        } catch (HttpNotFoundException ex) {
-            // expected
-        }
     }
 }

Modified: 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/spring-auto-launch.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/spring-auto-launch.xml?rev=826350&r1=826349&r2=826350&view=diff
==============================================================================
--- 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/spring-auto-launch.xml
 (original)
+++ 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/spring-auto-launch.xml
 Sun Oct 18 02:30:22 2009
@@ -26,31 +26,13 @@
 
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
   <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
-  <import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
   
+  <bean id="postprocess" 
class="org.apache.cxf.jaxws.spring.JaxWsWebServicePublisherBeanPostProcessor"/>
+
   
-  <bean id="greeterServerFactory"
-    class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" init-method="create">
-    <property name="serviceClass" 
value="org.apache.hello_world_soap_http.GreeterImpl" />
-    <property name="serviceBean">
-      <bean class="org.apache.hello_world_soap_http.GreeterImpl"/>
-    </property>
-    <property name="address" value="/services/Greeter"/>
-    <property name="bus" ref="cxf"/>
-    <property name="bindingId" value="http://apache.org/cxf/binding/http"/>
-  </bean>
-  
-   <jaxws:endpoint id="endpoint1" 
-              implementor="org.apache.hello_world_soap_http.GreeterImpl"
-              address="/services/Greeter1"
-              wsdlLocation="/wsdl/hello_world.wsdl"
-              />
+  <bean id='s1' class="org.apache.hello_world_soap_http.GreeterImpl"/>
    
-    <jaxws:endpoint id="endpoint2" 
-              implementor="org.apache.hello_world_soap_http.GreeterImpl"
-              address="/services/Greeter2"
-              publishedEndpointUrl="http://cxf.apache.org/Greeter";
-              />     
+  <bean id='s2' class="org.apache.hello_world_soap_http.DerivedGreeterImpl"/>  
 
   
 </beans>

Modified: 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/web-spring-auto-launch.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/web-spring-auto-launch.xml?rev=826350&r1=826349&r2=826350&view=diff
==============================================================================
--- 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/web-spring-auto-launch.xml
 (original)
+++ 
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/web-spring-auto-launch.xml
 Sun Oct 18 02:30:22 2009
@@ -27,7 +27,7 @@
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
-                       classpath:org/apache/cxf/systest/servlet/spring.xml
+                       
classpath:org/apache/cxf/systest/servlet/spring-auto-launch.xml
                </param-value>
        </context-param>
 

Modified: 
cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java?rev=826350&r1=826349&r2=826350&view=diff
==============================================================================
--- 
cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
 (original)
+++ 
cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
 Sun Oct 18 02:30:22 2009
@@ -37,9 +37,8 @@
 import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 
[email protected](name = "Greeter", serviceName = "SOAPService",
-                      targetNamespace = 
"http://apache.org/hello_world_soap_http";,
-                      wsdlLocation = "tetutils/hello_world.wsdl")
[email protected](name = "DerivedGreeter", serviceName = 
"DerivedGreeterService",
+                      targetNamespace = 
"http://apache.org/hello_world_soap_http";)
 public class DerivedGreeterImpl implements Greeter {
 
     private static final Logger LOG =


Reply via email to