geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r595082 - in /geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src: main/java/org/apache/greeter_control/ main/webapp/WEB-INF/ test/java/org/apache/geronimo/testsuite/testset/
Date Wed, 14 Nov 2007 21:56:25 GMT
Author: gawor
Date: Wed Nov 14 13:56:24 2007
New Revision: 595082

URL: http://svn.apache.org/viewvc?rev=595082&view=rev
Log:
updated tests for GERONIMO-3602 but one of the tests is disabled for now

Added:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java
  (with props)
Modified:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/web.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/webservices.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/WSTest.java

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java?rev=595082&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java
Wed Nov 14 13:56:24 2007
@@ -0,0 +1,57 @@
+/**
+ * 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.greeter_control;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "Greeter", targetNamespace = "http://apache.org/greeter_control")
+public interface Greeter2 {
+
+    /**
+     * 
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(name = "responseType", targetNamespace = "http://apache.org/greeter_control/types")
+    @RequestWrapper(localName = "sayHi", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.SayHi")
+    @ResponseWrapper(localName = "sayHiResponse", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.SayHiResponse")
+    public String sayHi();
+    
+    /**
+     * 
+     * @param requestType
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(name = "responseType", targetNamespace = "http://apache.org/greeter_control/types")
+    @RequestWrapper(localName = "greetMe", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.GreetMe")
+    @ResponseWrapper(localName = "greetMeResponse", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.GreetMeResponse")
+    public String greetMe(
+        @WebParam(name = "requestType", targetNamespace = "http://apache.org/greeter_control/types")
+        String requestType);
+
+}

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/Greeter2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java?rev=595082&r1=595081&r2=595082&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
Wed Nov 14 13:56:24 2007
@@ -43,6 +43,10 @@
         return "Hello " + me;
     }
 
+    public String sayHi() {
+        return "Hi";
+    }
+    
     @PostConstruct
     public void init() {
         System.out.println(this + " PostConstruct");

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/web.xml?rev=595082&r1=595081&r2=595082&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/web.xml
Wed Nov 14 13:56:24 2007
@@ -29,7 +29,14 @@
 
     <servlet>
         <display-name>Geronimo JAX-WS POJO WS</display-name>
-        <servlet-name>JAXWSServlet</servlet-name>
+        <servlet-name>JAXWSServlet1</servlet-name>
+        <servlet-class>org.apache.greeter_control.GreeterImpl</servlet-class>
+        <load-on-startup>0</load-on-startup>
+    </servlet>
+    
+    <servlet>
+        <display-name>Geronimo JAX-WS POJO WS</display-name>
+        <servlet-name>JAXWSServlet2</servlet-name>
         <servlet-class>org.apache.greeter_control.GreeterImpl</servlet-class>
         <load-on-startup>0</load-on-startup>
     </servlet>
@@ -40,8 +47,13 @@
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>JAXWSServlet</servlet-name>
+        <servlet-name>JAXWSServlet1</servlet-name>
         <url-pattern>/servlet2</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>JAXWSServlet2</servlet-name>
+        <url-pattern>/servlet3</url-pattern>
     </servlet-mapping>
 
 </web-app>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/webservices.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/webservices.xml?rev=595082&r1=595081&r2=595082&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/webservices.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/main/webapp/WEB-INF/webservices.xml
Wed Nov 14 13:56:24 2007
@@ -38,15 +38,29 @@
     </webservice-description>
 
     <webservice-description>
-        <webservice-description-name>Geronimo JAX-WS POJO WS</webservice-description-name>
+        <webservice-description-name>Geronimo JAX-WS POJO WS I</webservice-description-name>
         <port-component>
-            <port-component-name>JAXWSPort</port-component-name>
+            <port-component-name>JAXWSPort1</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>JAXWSServlet</servlet-link>
+                <servlet-link>JAXWSServlet1</servlet-link>
+            </service-impl-bean>
+        </port-component>
+    </webservice-description>
+    
+    <webservice-description>
+        <webservice-description-name>Geronimo JAX-WS POJO WS II</webservice-description-name>
+        <port-component>
+            <port-component-name>JAXWSPort2</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.Greeter2</service-endpoint-interface>
+            <service-impl-bean>
+                <servlet-link>JAXWSServlet2</servlet-link>
             </service-impl-bean>
         </port-component>
     </webservice-description>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/WSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/WSTest.java?rev=595082&r1=595081&r2=595082&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/WSTest.java
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxrpc-jaxws-tests/jaxrpc-jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/WSTest.java
Wed Nov 14 13:56:24 2007
@@ -105,15 +105,22 @@
 
     @Test
     public void testJAXRPCWSDL() throws Exception {
-        testWSDL("servlet1");
+        testWSDL("servlet1", new String [] {"greetMe"});
     }
 
     @Test
-    public void testJAXWSWSDL() throws Exception {
-        testWSDL("servlet2");
+    public void testJAXWSWSDL1() throws Exception {
+        testWSDL("servlet2", new String [] {"greetMe"});
     }
-
-    private void testWSDL(String servlet) throws Exception {
+    
+    /*
+    @Test
+    public void testJAXWSWSDL2() throws Exception {
+        testWSDL("servlet3", new String [] {"greetMe", "sayHi"});
+    }    
+    */
+    
+    private void testWSDL(String servlet, String[] operations) throws Exception {
         String warName = System.getProperty("webAppName");
         assertNotNull("Web application name not specified", warName);
         
@@ -130,22 +137,20 @@
 
             System.out.println("WSDL: " + def);
 
-            assertTrue(def.getPortTypes().size() > 0);
-
-            boolean found = false;
+            assertEquals(1, def.getPortTypes().size());
 
             Iterator iter = def.getPortTypes().entrySet().iterator();
-            while (iter.hasNext()) {
-                PortType portType = 
-                    (PortType)((Map.Entry)iter.next()).getValue();
-                
-                if (found == false &&
-                    portType.getOperation("greetMe", null, null) != null) {
-                    found = true;
+                                  
+            PortType portType = 
+                (PortType)((Map.Entry)iter.next()).getValue();
+            
+            assertEquals("Number of operations", operations.length, portType.getOperations().size());
+            
+            for (String opName : operations) {
+                if (portType.getOperation(opName, null, null) == null) {
+                    fail("Operation " + opName + " not found");
                 }
             }
-
-            assertTrue("Operation not found", found);
             
         } finally {
             conn.disconnect();



Mime
View raw message