geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r510134 - in /geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests: ./ jaxws-ejb/ jaxws-ejb/src/ jaxws-ejb/src/main/ jaxws-ejb/src/main/java/ jaxws-ejb/src/main/java/org/ jaxws-ejb/src/main/java/org/apache/ jaxws-ejb/src/main/j...
Date Wed, 21 Feb 2007 18:19:32 GMT
Author: prasad
Date: Wed Feb 21 10:19:30 2007
New Revision: 510134

URL: http://svn.apache.org/viewvc?view=rev&rev=510134
Log:
* GERONIMO-2861. Thanx Jarek.

Added:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml  
(with props)
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
  (with props)
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
  (with props)
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
  (with props)
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
  (with props)
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
  (with props)
Modified:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/pom.xml

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml (added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml Wed
Feb 21 10:19:30 2007
@@ -0,0 +1,163 @@
+<?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.
+-->
+
+<!-- $Rev$ $Date$ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.testsuite</groupId>
+        <artifactId>jaxws-tests</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jaxws-ejb</artifactId>
+    <name>Geronimo TestSuite :: WebServices TestSuite :: JAX-WS EJB</name>
+    <packaging>jar</packaging>
+
+    <description>This project executes testcases for your testsuite</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-kernel</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-security</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>tools-maven-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>testsuite-maven-plugin</artifactId>
+                <version>${version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-surefire-xml</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>generate-surefire-xml</goal>
+                        </goals>
+                        <!-- 
+                        Merging the configuration of this plugin with the one it inherits.
+                        Updating the reports in the grandparent directly as we'd have missed
the boat for the parent's install phase.
+                        This plugin executes twice in Maven 2.0.4 (http://jira.codehaus.org/browse/MNG-2221)
+                        Maven.2.0.5 will fix it soon.
+                        -->
+                        <configuration>
+                            <grandParent>true</grandParent>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemProperties>
+                        <property>
+                            <name>webAppName</name>
+                            <value>${artifactId}-${version}</value>
+                        </property>
+                    </systemProperties>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>geronimo-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>deploy-ejb</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleArchive>${project.build.directory}/${artifactId}-${version}.jar</moduleArchive>
+                        </configuration>
+                    </execution>
+                            
+                    <execution>
+                        <id>undeploy-ejb-as-moduleId</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>undeploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleId>JEE5/JAXWSEJB/1.1/car</moduleId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
Wed Feb 21 10:19:30 2007
@@ -0,0 +1,33 @@
+/**
+ *  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.geronimo.test;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+@WebService
+@Stateless(mappedName="JAXWSBean")
+public class JAXWSBean implements JAXWSGreeter { 
+
+    public String greetMe(String me) {
+        System.out.println("i'm a ejb ws!!!!");
+        return "Hello " + me;
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
Wed Feb 21 10:19:30 2007
@@ -0,0 +1,28 @@
+/**
+ *  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.geronimo.test;
+
+import javax.ejb.Remote;
+
+@Remote 
+public interface JAXWSGreeter { 
+
+    public String greetMe(String me);
+
+}

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/java/org/apache/geronimo/test/JAXWSGreeter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
Wed Feb 21 10:19:30 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.
+-->
+<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
+  xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
+  xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+ xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <environment>
+        <moduleId>
+            <groupId>JEE5</groupId>
+            <artifactId>JAXWSEJB</artifactId>
+            <version>1.1</version>
+            <type>car</type>
+        </moduleId>
+   </environment>
+
+ <enterprise-beans>
+    <session>
+      <ejb-name>JAXWSBean</ejb-name>
+      <jndi-name>JAXWSBean</jndi-name>
+    </session>
+  </enterprise-beans>
+
+
+</openejb-jar>

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/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-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
Wed Feb 21 10:19:30 2007
@@ -0,0 +1,198 @@
+/**
+ *  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.geronimo.testsuite.testset;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Properties;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.naming.InitialContext;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.PortType;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Element;
+
+import org.xml.sax.InputSource;
+
+import org.apache.geronimo.test.JAXWSGreeter;
+
+import org.apache.geronimo.testsupport.TestSupport;
+import org.testng.annotations.Test;
+
+public class JaxWSTest extends TestSupport {
+
+    private String baseURL = "http://localhost:8080/";
+
+    @Test
+    public void testInvocation() 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 + "/JAXWSBean");
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        try {
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            conn.setUseCaches(false);
+            conn.setRequestMethod("POST");
+            conn.setRequestProperty("Content-Type", "text/xml");
+
+            OutputStream out = conn.getOutputStream();
+
+            byte[] data = new byte[1024];
+            int read = 0;
+            while ((read = requestInput.read(data, 0, data.length)) != -1) {
+                out.write(data, 0, read);
+            }
+
+            requestInput.close();
+
+            out.flush();
+            out.close();
+
+            boolean found = false;
+            boolean found2 = false;
+
+            // FIXME: Simple test is required for now, as CXF has problems
+            BufferedReader in = 
+                new BufferedReader(new InputStreamReader(conn.getInputStream()));
+            String inputLine;
+            while ((inputLine = in.readLine()) != null) {
+                System.out.println(inputLine);
+
+                if (found == false &&
+                    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());
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            DocumentBuilder db = dbf.newDocumentBuilder();
+
+            Document doc = db.parse(is);
+            
+            NodeList nodes = doc.getElementsByTagNameNS("http://apache.org/hello_world_soap_http/types",
+                                                        "responseType");
+            assertEquals(1, nodes.getLength());
+
+            Element element = (Element)nodes.item(0);
+
+            assertTrue(element.getFirstChild() != null);
+
+            assertEquals("Hello foo bar", element.getFirstChild().getNodeValue());
+            */
+
+        } finally {
+            conn.disconnect();
+        }
+    }
+
+    @Test
+    public void testWSDL() throws Exception {
+        String warName = System.getProperty("webAppName");
+        assertNotNull("Web application name not specified", warName);
+        
+        URL url = new URL(baseURL + warName + "/JAXWSBean?wsdl");
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        try {
+            conn.setUseCaches(false);
+
+            WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+            Definition def = 
+                wsdlReader.readWSDL(null, new InputSource(conn.getInputStream()));
+
+            System.out.println("WSDL: " + def);
+
+            assertTrue(def.getPortTypes().size() > 0);
+
+            boolean found = false;
+
+            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;
+                }
+            }
+
+            assertTrue("Operation not found", found);
+            
+        } finally {
+            conn.disconnect();
+        }
+
+    }
+
+    @Test
+    public void testEJB() throws Exception {
+        Properties p = new Properties();
+    
+        p.put("java.naming.factory.initial", 
+              "org.apache.openejb.client.RemoteInitialContextFactory");
+        p.put("java.naming.provider.url", 
+              "127.0.0.1:4201");
+        p.put("java.naming.security.principal", 
+              "myuser");
+        p.put("java.naming.security.credentials", 
+              "mypass");    
+        
+        InitialContext ctx = new InitialContext(p);
+        
+        JAXWSGreeter greeter = (JAXWSGreeter)ctx.lookup("JAXWSBean");
+        
+        System.out.println( greeter );
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml?view=auto&rev=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
Wed Feb 21 10:19:30 2007
@@ -0,0 +1,26 @@
+<?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.
+-->
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+   <soap:Body>
+     <greetMe xmlns="http://apache.org/greeter_control/types">
+       <requestType>foo bar</requestType>
+     </greetMe>
+   </soap:Body>
+</soap:Envelope>

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb/src/test/resources/request1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/pom.xml?view=diff&rev=510134&r1=510133&r2=510134
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/pom.xml (original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/pom.xml Wed Feb 21 10:19:30
2007
@@ -36,6 +36,8 @@
             <id>child</id>
             <modules>
                 <module>jaxws-war</module>
+                <module>jaxws-client</module>
+                <module>jaxws-ejb</module>
             </modules>
         </profile>
     </profiles>



Mime
View raw message