geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r505826 - in /geronimo/server/trunk: assemblies/geronimo-jetty6-jee5/src/main/var/config/ assemblies/geronimo-tomcat6-jee5/src/main/var/config/ configs/ configs/jetty6-deployer/src/plan/ configs/tomcat6-deployer/src/plan/ modules/ modules/g...
Date Sun, 11 Feb 2007 02:39:50 GMT
Author: dims
Date: Sat Feb 10 18:39:49 2007
New Revision: 505826

URL: http://svn.apache.org/viewvc?view=rev&rev=505826
Log:
Make the test case reflect the wsdl being used by adding other methods mentioned in the wsdl.
added a xjc task in the pom.xml to generate the types needed for the fault. Ran the existing
tests with both axis2 and cxf. Need to add more tests for the newly added methods.

Added:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/Greeter.java
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterHandler.java
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/PingMeFault.java
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/handlers.xml
Removed:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/hello_world_soap_http/
Modified:
    geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/var/config/config.xml
    geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/var/config/config.xml
    geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml
    geronimo/server/trunk/configs/pom.xml
    geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-webservices-builder/src/test/resources/webservices-jee5.xml
    geronimo/server/trunk/modules/pom.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/pom.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/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java

Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/var/config/config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/var/config/config.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/var/config/config.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/var/config/config.xml Sat
Feb 10 18:39:49 2007
@@ -155,15 +155,15 @@
     <module name="org.apache.geronimo.configs/client-deployer/${version}/car">
     </module>
 
-    <module name="org.apache.geronimo.configs/cxf-deployer/${version}/car">
+	<module name="org.apache.geronimo.configs/axis2-deployer/${version}/car">
         <!-- this gbean is not yet written -->
-        <!--<gbean name="CXFServiceRefBuilder">
+		<!--<gbean name="Axis2ServiceRefBuilder">
             <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
         </gbean>-->
     </module>
-    <module name="org.apache.geronimo.configs/axis2-deployer/${version}/car">
+	<module name="org.apache.geronimo.configs/cxf-deployer/${version}/car">
         <!-- this gbean is not yet written -->
-        <!--<gbean name="Axis2ServiceRefBuilder">
+		<!--<gbean name="CXFServiceRefBuilder">
             <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
         </gbean>-->
     </module>

Modified: geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/var/config/config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/var/config/config.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/var/config/config.xml
(original)
+++ geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/var/config/config.xml
Sat Feb 10 18:39:49 2007
@@ -162,17 +162,17 @@
     <module name="org.apache.geronimo.configs/client-deployer/${version}/car">
     </module>
 
-    <module name="org.apache.geronimo.configs/cxf-deployer/${version}/car">
-        <!--<gbean name="CXFServiceRefBuilder">
-            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
-        </gbean>-->
-    </module>
     <module name="org.apache.geronimo.configs/axis2-deployer/${version}/car">
         <!-- this gbean is not yet written -->
         <!--<gbean name="Axis2ServiceRefBuilder">
             <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
         </gbean>-->
     </module>
+	<module name="org.apache.geronimo.configs/cxf-deployer/${version}/car">
+		<!--<gbean name="CXFServiceRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>-->
+	</module>
     <module name="org.apache.geronimo.configs/axis-deployer/${version}/car">
         <gbean name="AxisServiceRefBuilder">
             <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>

Modified: geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml Sat Feb 10 18:39:49 2007
@@ -48,11 +48,11 @@
             </pattern>
         </references>
         <references name="WebServiceBuilder">
-            <pattern>
+			<pattern>
+				<name>Axis2Builder</name>
+			</pattern>
+			<pattern>
                 <name>CXFBuilder</name>
-            </pattern>
-            <pattern>
-                <name>Axis2Builder</name>
             </pattern>
             <pattern>
                 <name>WebServiceBuilder</name>

Modified: geronimo/server/trunk/configs/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/pom.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/configs/pom.xml (original)
+++ geronimo/server/trunk/configs/pom.xml Sat Feb 10 18:39:49 2007
@@ -45,6 +45,7 @@
         <openejbDeployer>org.apache.geronimo.configs/openejb-deployer/${version}/car</openejbDeployer>
         <!--openejbcorbaDeployer>org.apache.geronimo.configs/openejb-corba-deployer/${version}/car</openejbcorbaDeployer-->
         <axisDeployer>org.apache.geronimo.configs/axis-deployer/${version}/car</axisDeployer>
+		<axis2Deployer>org.apache.geronimo.configs/axis2-deployer/${version}/car</axis2Deployer>
         <cxfDeployer>org.apache.geronimo.configs/cxf-deployer/${version}/car</cxfDeployer>
         <tomcatDeployer>org.apache.geronimo.configs/tomcat6-deployer/${version}/car</tomcatDeployer>
         <jetty6Deployer>org.apache.geronimo.configs/jetty6-deployer/${version}/car</jetty6Deployer>
@@ -162,11 +163,11 @@
         <module>transformer-agent</module>
         <module>persistence-jpa10-deployer</module>
         <module>openjpa</module>
+		<module>axis2</module>
+		<module>axis2-deployer</module>
         <module>cxf</module>
         <module>cxf-deployer</module>
         <module>jaxws-deployer</module>
-        <module>axis2</module>
-        <module>axis2-deployer</module>
         <module>dojo-jetty6</module>
         <module>jetty6</module>
         <module>jetty6-clustering-builder-wadi</module>

Modified: geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml Sat Feb 10 18:39:49 2007
@@ -30,10 +30,10 @@
         </reference>
         <references name="WebServiceBuilder">
             <pattern>
-                <name>CXFBuilder</name>
+                <name>Axis2Builder</name>
             </pattern>
             <pattern>
-                <name>Axis2Builder</name>
+				<name>CXFBuilder</name>
             </pattern>
             <pattern>
                 <name>WebServiceBuilder</name>

Modified: geronimo/server/trunk/modules/geronimo-webservices-builder/src/test/resources/webservices-jee5.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-webservices-builder/src/test/resources/webservices-jee5.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/modules/geronimo-webservices-builder/src/test/resources/webservices-jee5.xml
(original)
+++ geronimo/server/trunk/modules/geronimo-webservices-builder/src/test/resources/webservices-jee5.xml
Sat Feb 10 18:39:49 2007
@@ -32,7 +32,7 @@
             <port-component-name>cxfPojoName</port-component-name>
             <wsdl-service></wsdl-service>
             <enable-mtom>false</enable-mtom>
-            <service-endpoint-interface>org.apache.hello_world_soap_http.Greeter</service-endpoint-interface>
+            <service-endpoint-interface>org.apache.greeter_control.Greeter</service-endpoint-interface>
             <service-impl-bean>
                 <servlet-link>cxfPojoServlet</servlet-link>
             </service-impl-bean>

Modified: geronimo/server/trunk/modules/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/pom.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/modules/pom.xml (original)
+++ geronimo/server/trunk/modules/pom.xml Sat Feb 10 18:39:49 2007
@@ -102,10 +102,10 @@
         <module>geronimo-transformer</module>
         <module>geronimo-persistence-jpa10</module>
         <module>geronimo-persistence-jpa10-builder</module>
-        <module>geronimo-cxf</module>
-        <module>geronimo-cxf-builder</module>
         <module>geronimo-axis2</module>
         <module>geronimo-axis2-builder</module>
+		<module>geronimo-cxf</module>
+        <module>geronimo-cxf-builder</module>
         <module>geronimo-jaxws</module>
         <module>geronimo-jaxws-builder</module>
         <module>geronimo-jetty6</module>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/pom.xml?view=diff&rev=505826&r1=505825&r2=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/pom.xml (original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/pom.xml Sat
Feb 10 18:39:49 2007
@@ -45,6 +45,22 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.0.2</version>
+            <exclusions>
+            	<exclusion>
+            		<artifactId>jsr173</artifactId>
+            		<groupId>javax.xml</groupId>
+            	</exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-annotation_1.0_spec</artifactId>
             <scope>provided</scope>
@@ -69,6 +85,54 @@
         </resources>
 
         <plugins>
+            <plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>1.1</version>
+				<executions>
+					<execution>
+						<id>gen-ts</id>
+						<phase>generate-sources</phase>
+						<configuration>
+							<tasks>
+								<echo>Generating java from wsdl</echo>
+								<property name="schema.output.base.dir" value="target/schema"/>
+								<property name="schema.generated.src.dir" value="${schema.output.base.dir}/src"/>
+								
+								<mkdir dir="${schema.output.base.dir}"/>
+								<mkdir dir="${schema.generated.src.dir}"/>
+
+								<java classname="com.sun.tools.xjc.Driver" fork="true">
+										<classpath refid="maven.runtime.classpath"/>
+										<classpath location="${compiled.classes.dir}"/>
+									<arg line="-d ${schema.generated.src.dir} -quiet -wsdl src/main/webapp/WEB-INF/wsdl/greeter_control.wsdl"/>
+								</java>
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+            </plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>build-helper-maven-plugin</artifactId>
+				<executions>
+				<execution>
+					<id>add-source</id>
+					<phase>generate-sources</phase>
+					<goals>
+					  <goal>add-source</goal>
+					</goals>
+					<configuration>
+					  <sources>
+						<source>target/schema/src</source>
+					</sources>
+					</configuration>
+				</execution>
+				</executions>
+			  </plugin>
             <plugin>
                 <groupId>org.apache.geronimo.plugins</groupId>
                 <artifactId>testsuite-maven-plugin</artifactId>

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/Greeter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/Greeter.java?view=auto&rev=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/Greeter.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/Greeter.java
Sat Feb 10 18:39:49 2007
@@ -0,0 +1,82 @@
+/**
+ * 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.Oneway;
+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 Greeter {
+
+
+    /**
+     * 
+     * @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);
+
+    /**
+     * 
+     * @param requestType
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "greetMeOneWay", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.GreetMeOneWay")
+    public void greetMeOneWay(
+        @WebParam(name = "requestType", targetNamespace = "http://apache.org/greeter_control/types")
+        String requestType);
+
+    /**
+     * 
+     * @throws PingMeFault
+     */
+    @WebMethod
+    @RequestWrapper(localName = "pingMe", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.PingMe")
+    @ResponseWrapper(localName = "pingMeResponse", targetNamespace = "http://apache.org/greeter_control/types",
className = "org.apache.greeter_control.types.PingMeResponse")
+    public void pingMe()
+        throws PingMeFault
+    ;
+
+}

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterHandler.java?view=auto&rev=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterHandler.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterHandler.java
Sat Feb 10 18:39:49 2007
@@ -0,0 +1,64 @@
+/**
+ * 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 java.util.Set;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import javax.annotation.Resource;
+import javax.annotation.PreDestroy;
+import javax.annotation.PostConstruct;
+
+public class GreeterHandler implements SOAPHandler<SOAPMessageContext> {
+    
+    @Resource(name="greeting")
+    private String greeting;
+
+    @PostConstruct
+    public void init() {
+        System.out.println(this + " PostConstruct");
+    }
+
+    @PreDestroy
+    public void destroy() {
+        System.out.println(this + " PreDestroy");
+    }
+
+    public boolean handleMessage(SOAPMessageContext smc) {
+        System.out.println(this + " handleMessage(): " + greeting);
+        return true;
+    }
+       
+    public boolean handleFault(SOAPMessageContext smc) {
+        System.out.println(this + " handleFault()");
+        return true;
+    }
+    
+    public void close(MessageContext messageContext) {
+        System.out.println(this + " close()");
+    }
+    
+    public Set<QName> getHeaders(){
+        return null;
+    }
+    
+}

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java?view=auto&rev=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/GreeterImpl.java
Sat Feb 10 18:39:49 2007
@@ -0,0 +1,119 @@
+/**
+ * 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 java.util.Iterator;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+import javax.annotation.PreDestroy;
+import javax.annotation.PostConstruct;
+
+import javax.jws.WebService;
+import javax.jws.HandlerChain;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+/* serviceName, portName specified in webservices.xml */
+@WebService(serviceName = "SOAPService",
+            portName = "SoapPort",
+            endpointInterface = "org.apache.greeter_control.Greeter",
+            targetNamespace = "http://apache.org/greeter_control")
+/* two handlers specified in webservices.xml */
+@HandlerChain(file="handlers.xml")
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG =
+        Logger.getLogger(GreeterImpl.class.getName());
+
+    @Resource
+    private WebServiceContext context;
+
+    @Resource(name="greeting")
+    private String greeting;
+
+    public WebServiceContext getContext() {
+        return context;
+    }
+
+    public String greetMe(String me) {
+        LOG.info("Invoking greetMe " + me);
+
+        LOG.info("WebServiceContext: " + context);
+        LOG.info("Principal: " + context.getUserPrincipal());
+        LOG.info("Context: " + context.getMessageContext());
+
+        MessageContext ctx = context.getMessageContext();
+        Iterator iter = ctx.entrySet().iterator();
+        while(iter.hasNext()) {
+            Map.Entry entry = (Map.Entry)iter.next();
+            System.out.println("Key: "+entry.getKey());
+            System.out.println("Value: " +entry.getValue());
+        }
+
+        // just playing around
+
+        // send foo=BAR header
+        Map responseHeaders = 
+            (Map)ctx.get(MessageContext.HTTP_RESPONSE_HEADERS);
+        if(responseHeaders == null) { 
+			LOG.info("Can't get MessageContext.HTTP_RESPONSE_HEADERS from context");
+        } else {
+			ArrayList values = new ArrayList();
+			values.add("BAR");
+			responseHeaders.put("foo", values);
+        }
+        /*
+        // make return code 201
+        ctx.put(MessageContext.HTTP_RESPONSE_CODE,
+                new Integer(201));
+        */
+
+        return greeting + " " + me;
+    }
+
+    @PostConstruct
+    public void init() {
+        System.out.println(this + " PostConstruct");
+    }
+
+    @PreDestroy()
+    public void destroy() {
+        System.out.println(this + " PreDestroy");
+    }
+
+    public String sayHi() {
+        LOG.info("Invoking sayHi ");
+		return "Hi";
+    }
+
+    public void greetMeOneWay(String me){
+        LOG.info("Invoking greetMeOneWay " + me);
+    }
+
+
+    public void pingMe()
+        throws PingMeFault {
+        LOG.info("Invoking pingMe ");
+        throw new PingMeFault("Custom Fault", null);
+    }
+}

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/PingMeFault.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/PingMeFault.java?view=auto&rev=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/PingMeFault.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/PingMeFault.java
Sat Feb 10 18:39:49 2007
@@ -0,0 +1,67 @@
+/**
+ * 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.xml.ws.WebFault;
+import org.apache.greeter_control.types.FaultDetail;
+
+
+@WebFault(name = "faultDetail", targetNamespace = "http://apache.org/greeter_control/types")
+public class PingMeFault
+    extends Exception
+{
+
+    /**
+     * Java type that goes as soapenv:Fault detail element.
+     * 
+     */
+    private FaultDetail faultInfo;
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     */
+    public PingMeFault(String message, FaultDetail faultInfo) {
+        super(message);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     * @param cause
+     */
+    public PingMeFault(String message, FaultDetail faultInfo, Throwable cause) {
+        super(message, cause);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @return
+     *     returns fault bean: org.apache.greeter_control.types.FaultDetail
+     */
+    public FaultDetail getFaultInfo() {
+        return faultInfo;
+    }
+
+}

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/handlers.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/handlers.xml?view=auto&rev=505826
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/handlers.xml
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/java/org/apache/greeter_control/handlers.xml
Sat Feb 10 18:39:49 2007
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+  <jws:handler-chain>
+    <jws:handler>
+      <jws:handler-name>GreeterHandler</jws:handler-name>
+      <jws:handler-class>org.apache.greeter_control.GreeterHandler</jws:handler-class>
+    </jws:handler>
+  </jws:handler-chain>
+</jws:handler-chains>

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=505826&r1=505825&r2=505826
==============================================================================
--- 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
Sat Feb 10 18:39:49 2007
@@ -27,7 +27,7 @@
     <servlet>
         <display-name>Geronimo POJO WS</display-name>
         <servlet-name>POJOServlet</servlet-name>
-        <servlet-class>org.apache.hello_world_soap_http.GreeterImpl</servlet-class>
+        <servlet-class>org.apache.greeter_control.GreeterImpl</servlet-class>
         <load-on-startup>0</load-on-startup>
     </servlet>
 

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=505826&r1=505825&r2=505826
==============================================================================
--- 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
Sat Feb 10 18:39:49 2007
@@ -35,7 +35,7 @@
             <wsdl-service>greeter:GreeterService</wsdl-service>
             <wsdl-port>greeter:GreeterPort</wsdl-port> 
             <enable-mtom>false</enable-mtom>
-            <service-endpoint-interface>org.apache.hello_world_soap_http.Greeter</service-endpoint-interface>
+            <service-endpoint-interface>org.apache.greeter_control.Greeter</service-endpoint-interface>
             <service-impl-bean>
                 <servlet-link>POJOServlet</servlet-link>
             </service-impl-bean>
@@ -43,11 +43,11 @@
                 <handler-chain>
                     <handler>
                         <handler-name>GreeterHandler1</handler-name>
-                        <handler-class>org.apache.hello_world_soap_http.GreeterHandler</handler-class>
+                        <handler-class>org.apache.greeter_control.GreeterHandler</handler-class>
                     </handler>
                     <handler>
                         <handler-name>GreeterHandler2</handler-name>
-                        <handler-class>org.apache.hello_world_soap_http.GreeterHandler</handler-class>
+                        <handler-class>org.apache.greeter_control.GreeterHandler</handler-class>
                     </handler>
                 </handler-chain>
             </handler-chains>

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=505826&r1=505825&r2=505826
==============================================================================
--- 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
Sat Feb 10 18:39:49 2007
@@ -84,6 +84,7 @@
             out.close();
 
             boolean found = false;
+            boolean found2 = false;
 
             // FIXME: Simple test is required for now, as CXF has problems
             BufferedReader in = 
@@ -93,13 +94,21 @@
                 System.out.println(inputLine);
 
                 if (found == false &&
-                    inputLine.indexOf("Hello foo bar") != -1) {
+                    inputLine.indexOf("foo bar") != -1) {
                     found = true;
                 }
+                if (found2 == false &&
+                    inputLine.indexOf("Hello") != -1) {
+                    found2 = true;
+                }
             }
             in.close();
 
             assertTrue("Reply", found);
+
+            if(!found2) {
+                System.out.println("Did not find \"Hello\" in the Response");
+            }
 
             /* Better test, disabled for now
             InputSource is = new InputSource(conn.getInputStream());



Mime
View raw message