geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r538442 - in /geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src: main/webapp/WEB-INF/ main/webapp/WEB-INF/wsdl/ test/java/org/apache/geronimo/testsuite/testset/
Date Wed, 16 May 2007 05:52:57 GMT
Author: gawor
Date: Tue May 15 22:52:55 2007
New Revision: 538442

URL: http://svn.apache.org/viewvc?view=rev&rev=538442
Log:
improved tests to test wsdl/schema file publishing. deploy the same service with wsdl and
without.

Added:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
  (with props)
Modified:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/webservices.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml?view=diff&rev=538442&r1=538441&r2=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
Tue May 15 22:52:55 2007
@@ -32,7 +32,7 @@
       <protocol>http</protocol>
       <host>localhost</host>
       <port>8080</port>
-      <uri>/jaxws-war-2.0-SNAPSHOT/servlet</uri>
+      <uri>/jaxws-war-2.0-SNAPSHOT/servlet1</uri>
    </port>
  </service-ref>
 

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml?view=diff&rev=538442&r1=538441&r2=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
Tue May 15 22:52:55 2007
@@ -25,15 +25,27 @@
     <display-name>Geronimo POJO WS War</display-name>
 
     <servlet>
-        <display-name>Geronimo POJO WS</display-name>
-        <servlet-name>POJOServlet</servlet-name>
+        <display-name>Geronimo POJO WS 1</display-name>
+        <servlet-name>POJOServlet1</servlet-name>
         <servlet-class>org.apache.greeter_control.GreeterImpl</servlet-class>
         <load-on-startup>0</load-on-startup>
     </servlet>
 
     <servlet-mapping>
-        <servlet-name>POJOServlet</servlet-name>
-        <url-pattern>/servlet</url-pattern>
+        <servlet-name>POJOServlet1</servlet-name>
+        <url-pattern>/servlet1</url-pattern>
+    </servlet-mapping>
+
+    <servlet>
+        <display-name>Geronimo POJO WS 2</display-name>
+        <servlet-name>POJOServlet2</servlet-name>
+        <servlet-class>org.apache.greeter_control.GreeterImpl</servlet-class>
+        <load-on-startup>0</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>POJOServlet2</servlet-name>
+        <url-pattern>/servlet2</url-pattern>
     </servlet-mapping>
 
     <env-entry>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/webservices.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/webservices.xml?view=diff&rev=538442&r1=538441&r2=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/webservices.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/webservices.xml
Tue May 15 22:52:55 2007
@@ -27,17 +27,15 @@
 		http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
              version="1.2">
     <webservice-description>
-        <webservice-description-name>POJO WS</webservice-description-name>
-        <!--<wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>-->
-        <wsdl-file></wsdl-file>
+        <webservice-description-name>POJO WS (without wsdl)</webservice-description-name>
         <port-component>
-            <port-component-name>POJOPort</port-component-name>
+            <port-component-name>POJOPort1</port-component-name>
             <wsdl-service>greeter:GreeterService</wsdl-service>
             <wsdl-port>greeter:GreeterPort</wsdl-port> 
             <enable-mtom>false</enable-mtom>
             <service-endpoint-interface>org.apache.greeter_control.Greeter</service-endpoint-interface>
             <service-impl-bean>
-                <servlet-link>POJOServlet</servlet-link>
+                <servlet-link>POJOServlet1</servlet-link>
             </service-impl-bean>
             <handler-chains>
                 <handler-chain>
@@ -51,6 +49,21 @@
                     </handler>
                 </handler-chain>
             </handler-chains>
+        </port-component>
+    </webservice-description>
+
+    <webservice-description>
+        <webservice-description-name>POJO WS (with wsdl)</webservice-description-name>
+        <wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>
+        <port-component>
+            <port-component-name>POJOPort2</port-component-name>
+            <wsdl-service>greeter:GreeterService</wsdl-service>
+            <wsdl-port>greeter:GreeterPort</wsdl-port> 
+            <enable-mtom>false</enable-mtom>
+            <service-endpoint-interface>org.apache.greeter_control.Greeter</service-endpoint-interface>
+            <service-impl-bean>
+                <servlet-link>POJOServlet2</servlet-link>
+            </service-impl-bean>
         </port-component>
     </webservice-description>
 

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd?view=auto&rev=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
Tue May 15 22:52:55 2007
@@ -0,0 +1,35 @@
+<?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.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            targetNamespace="http://geronimo.apache.org/account"
+            xmlns:tns="http://geronimo.apache.org/account">
+
+  <xsd:element name="Account">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="FirstName" type="xsd:string"
+                     minOccurs="1"  maxOccurs="1"/>
+        <xsd:element name="LastName" type="xsd:string"
+                     minOccurs="1"  maxOccurs="1"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+</xsd:schema>

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/account.xsd
------------------------------------------------------------------------------
    svn:executable = *

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl?view=diff&rev=538442&r1=538441&r2=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl
Tue May 15 22:52:55 2007
@@ -27,6 +27,10 @@
     <wsdl:types>
         <schema targetNamespace="http://apache.org/greeter_control/types" 
             xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+            <import namespace="http://geronimo.apache.org/account" 
+                    schemaLocation="account.xsd" />
+
             <element name="sayHi">
                 <complexType/>
             </element>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java?view=diff&rev=538442&r1=538441&r2=538442
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
Tue May 15 22:52:55 2007
@@ -53,15 +53,26 @@
 
     private String baseURL = "http://localhost:8080/";
 
+    
     @Test
-    public void testInvocation() throws Exception {
+    public void testInvocation1() throws Exception {
+        testInvocation("/servlet1");
+    }
+
+    @Test
+    public void testInvocation2() throws Exception {
+        testInvocation("/servlet2");
+    }
+
+    @Test
+    private void testInvocation(String servlet) throws Exception {
         String warName = System.getProperty("webAppName");
         assertNotNull("Web application name not specified", warName);
         
         InputStream requestInput = JaxWSTest.class.getResourceAsStream("/request1.xml");
         assertNotNull("SOAP request not specified", requestInput);
                 
-        URL url = new URL(baseURL + warName + "/servlet");
+        URL url = new URL(baseURL + warName + servlet);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
         try {
             conn.setDoOutput(true);
@@ -136,11 +147,21 @@
     }
 
     @Test
-    public void testWSDL() throws Exception {
+    public void testWSDL1() throws Exception {
+        testWSDL("/servlet1");
+    }
+
+    @Test
+    public void testWSDL2() throws Exception { 
+        testWSDL("/servlet2");
+    }
+
+    private void testWSDL(String servlet) throws Exception {
+
         String warName = System.getProperty("webAppName");
         assertNotNull("Web application name not specified", warName);
         
-        URL url = new URL(baseURL + warName + "/servlet?wsdl");
+        URL url = new URL(baseURL + warName + servlet + "?wsdl");
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
         try {
             conn.setUseCaches(false);



Mime
View raw message