geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r501827 - in /geronimo/server/trunk: ./ configs/axis2/ modules/geronimo-axis2-builder/ modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/ modules/geronimo-axis2/ modules/geronimo-axis2/src/main/java/org/apache/g...
Date Wed, 31 Jan 2007 12:34:59 GMT
Author: dims
Date: Wed Jan 31 04:34:58 2007
New Revision: 501827

URL: http://svn.apache.org/viewvc?view=rev&rev=501827
Log:
Fix for   GERONIMO-2776 - Axis2 Integration - Replace RPCMessageReciever with JAXWSMessageReciever

Modified:
    geronimo/server/trunk/configs/axis2/pom.xml
    geronimo/server/trunk/modules/geronimo-axis2-builder/pom.xml
    geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
    geronimo/server/trunk/modules/geronimo-axis2/pom.xml
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainerFactoryGBean.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/configs/axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/axis2/pom.xml?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/configs/axis2/pom.xml (original)
+++ geronimo/server/trunk/configs/axis2/pom.xml Wed Jan 31 04:34:58 2007
@@ -1,193 +1,197 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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: 486801 $ $Date: 2006-12-13 14:06:08 -0500 (Wed, 13 Dec 2006) $ -->
-
-<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.configs</groupId>
-        <artifactId>configs</artifactId>
-        <version>2.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>axis2</artifactId>
-    <name>Geronimo Configs :: Axis2</name>
-    <packaging>car</packaging>
-    
-    <dependencies>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-server</artifactId>
-            <type>car</type>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>webservices-common</artifactId>
-            <type>car</type>
-            <version>${version}</version>
-        </dependency>
-
-       <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-axis2</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-java2wsdl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-jaxws-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-jaxws</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons</groupId>
-            <artifactId>XmlSchema</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.neethi</groupId>
-            <artifactId>neethi</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>logkit</groupId>
-                    <artifactId>logkit</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>avalon-framework</groupId>
-                    <artifactId>avalon-framework</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>stax</groupId>
-            <artifactId>stax-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.mail</groupId>
-            <artifactId>mail</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.activation</groupId>
-            <artifactId>activation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xmlbeans</groupId>
-            <artifactId>xbean</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jaxen</groupId>
-            <artifactId>jaxen</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>backport-util-concurrent</groupId>
-            <artifactId>backport-util-concurrent</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>annogen</groupId>
-            <artifactId>annogen</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>incubator-woden</groupId>
-            <artifactId>woden</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
-    </dependencies>
-
-    <repositories>
-        <repository>
-            <id>maven-repo1</id>
-            <name>maven official repo</name>
-            <url>http://repo1.maven.org/maven/</url>
-            <layout>legacy</layout>
-        </repository>
-        <repository>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-            <id>ws-zones</id>
-            <name>ws.zones maven repository</name>
-            <url>http://ws.zones.apache.org/repository/</url>
-            <layout>legacy</layout>
-        </repository>
-    </repositories>
-    
-</project>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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: 486801 $ $Date: 2006-12-13 14:06:08 -0500 (Wed, 13 Dec 2006) $ -->
+
+<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.configs</groupId>
+        <artifactId>configs</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>axis2</artifactId>
+    <name>Geronimo Configs :: Axis2</name>
+    <packaging>car</packaging>
+    
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-server</artifactId>
+            <type>car</type>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>webservices-common</artifactId>
+            <type>car</type>
+            <version>${version}</version>
+        </dependency>
+
+       <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-axis2</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-java2wsdl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws</artifactId>
+        </dependency>
+        <dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-metadata</artifactId>
+		</dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons</groupId>
+            <artifactId>XmlSchema</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.neethi</groupId>
+            <artifactId>neethi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>logkit</groupId>
+                    <artifactId>logkit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>avalon-framework</groupId>
+                    <artifactId>avalon-framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jaxen</groupId>
+            <artifactId>jaxen</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>annogen</groupId>
+            <artifactId>annogen</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>incubator-woden</groupId>
+            <artifactId>woden</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>maven-repo1</id>
+            <name>maven official repo</name>
+            <url>http://repo1.maven.org/maven/</url>
+            <layout>legacy</layout>
+        </repository>
+        <repository>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>ws-zones</id>
+            <name>ws.zones maven repository</name>
+            <url>http://ws.zones.apache.org/repository/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+    
+</project>

Modified: geronimo/server/trunk/modules/geronimo-axis2-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2-builder/pom.xml?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2-builder/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-axis2-builder/pom.xml Wed Jan 31 04:34:58 2007
@@ -1,63 +1,83 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    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: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
-
-<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.modules</groupId>
-        <artifactId>modules</artifactId>
-        <version>2.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>geronimo-axis2-builder</artifactId>
-    <name>Geronimo :: Axis2 :: Builder</name>
-    
-    <dependencies>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee-builder</artifactId>
-            <version>${version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-service-builder</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee</artifactId>
-            <version>${version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-axis2</artifactId>
-            <version>${version}</version>                                                                                                           
-        </dependency>
-
-    </dependencies>
-    
-</project>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    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: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<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.modules</groupId>
+        <artifactId>modules</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-axis2-builder</artifactId>
+    <name>Geronimo :: Axis2 :: Builder</name>
+    
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-j2ee-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-service-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-j2ee</artifactId>
+            <version>${version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-axis2</artifactId>
+            <version>${version}</version>                                                                                                           
+        </dependency>
+        
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        
+       <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws-api</artifactId>
+        </dependency>
+
+    </dependencies>
+    
+</project>
+

Modified: geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java (original)
+++ geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java Wed Jan 31 04:34:58 2007
@@ -1,208 +1,245 @@
-/**
- *  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.axis2.builder;
-
-import org.apache.axis2.jaxws.javaee.PortComponentType;
-import org.apache.axis2.jaxws.javaee.WebserviceDescriptionType;
-import org.apache.axis2.jaxws.javaee.WebservicesType;
-import org.apache.geronimo.axis2.Axis2WebServiceContainerFactoryGBean;
-import org.apache.geronimo.axis2.PortInfo;
-import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.WebModule;
-import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
-import org.apache.geronimo.kernel.repository.Environment;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.ws.handler.Handler;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.logging.Logger;
-
-public class Axis2Builder implements WebServiceBuilder {
-
-    private static final Logger LOG = Logger.getLogger(Axis2Builder.class.getName());
-    private final Environment defaultEnvironment;
-    private static final String KEY = Axis2Builder.class.getName();
-    private JAXBContext ctx;
-
-    public Axis2Builder(Environment defaultEnviroment) throws JAXBException {
-        this.defaultEnvironment = defaultEnviroment;
-        ctx = JAXBContext.newInstance(WebservicesType.class);
-    }
-
-    public void findWebServices(JarFile moduleFile, boolean isEJB, Map servletLocations, Environment environment, Map sharedContext)
-            throws DeploymentException {
-        final String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
-        try {
-            URL wsDDUrl = DeploymentUtil.createJarURL(moduleFile, path);
-            Map portMap = parseWebServiceDescriptor(wsDDUrl, moduleFile, isEJB, servletLocations);
-            if (portMap != null) {
-                EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
-                sharedContext.put(KEY, portMap);
-            }
-        } catch (MalformedURLException e) {
-            // The webservices.xml file doesn't exist.
-        }
-
-    }
-
-    private Map<String, PortInfo> parseWebServiceDescriptor(URL wsDDUrl, JarFile moduleFile, boolean isEJB, Map correctedPortLocations)
-            throws DeploymentException {
-
-        LOG.fine("parsing descriptor " + wsDDUrl);
-
-        Map<String, PortInfo> map = new HashMap<String, PortInfo>();
-
-        try {
-            InputStream in = wsDDUrl.openStream();
-            if (in == null) {
-                throw new DeploymentException("unable to read descriptor " + wsDDUrl);
-            }
-
-            Unmarshaller unmarshaller = ctx.createUnmarshaller();
-            Object obj = unmarshaller.unmarshal(new javax.xml.transform.stream.StreamSource(in), WebservicesType.class);
-
-            if (obj instanceof JAXBElement) {
-                obj = ((JAXBElement) obj).getValue();
-            }
-
-            if (!(obj instanceof WebservicesType)) {
-                return map;
-            }
-            WebservicesType wst = (WebservicesType) obj;
-
-            for (WebserviceDescriptionType desc : wst.getWebserviceDescription()) {
-                final String wsdlFile = desc.getWsdlFile().getValue();
-                final String serviceName = desc.getWebserviceDescriptionName().getValue();
-
-                for (PortComponentType port : desc.getPortComponent()) {
-                    String servlet = port.getServiceImplBean().getServletLink().getValue();
-                    String sei = port.getServiceEndpointInterface().getValue();
-                    String portName = port.getPortComponentName().getValue();
-
-                    PortInfo portInfo = new PortInfo();
-
-                    portInfo.setServiceName(serviceName);
-                    portInfo.setServletLink(servlet);
-                    portInfo.setServiceEndpointInterfaceName(sei);
-                    portInfo.setPortName(portName);
-                    portInfo.setWsdlFile(wsdlFile);
-                    portInfo.setHandlers(port.getHandler());
-
-                    map.put(servlet, portInfo);
-                }
-            }
-
-            return map;
-        } catch (FileNotFoundException e) {
-            return Collections.EMPTY_MAP;
-        } catch (IOException ex) {
-            ex.printStackTrace();
-            throw new DeploymentException("unable to read " + wsDDUrl, ex);
-        } catch (JAXBException ex) {
-            throw new DeploymentException("unable to parse webservices.xml", ex);
-        }
-    }
-
-    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context)
-            throws DeploymentException {
-        // assert pi instanceof PortInfo : "received incorrect portInfo object";
-
-        Map sharedContext = ((WebModule) module).getSharedContext();
-        Map portInfoMap = (Map) sharedContext.get(KEY);
-        PortInfo portInfo = (PortInfo) portInfoMap.get(servletName);
-        if (portInfo == null) {
-            // not ours
-            return false;
-        }
-
-        LOG.info("configuring POJO webservice: " + servletName + " sei: " + seiClassName);
-
-        // verify that the class is loadable
-        ClassLoader classLoader = context.getClassLoader();
-        loadSEI(seiClassName, classLoader);
-
-        /* List<Handler> handlers = */
-        buildHandlerChain(portInfo);
-        AbstractName containerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(), "Axis2WebServiceContainerFactory", NameFactory.GERONIMO_SERVICE);
-        GBeanData containerFactoryData = new GBeanData(containerFactoryName, Axis2WebServiceContainerFactoryGBean.GBEAN_INFO);
-        containerFactoryData.setAttribute("portInfo", portInfo);
-        containerFactoryData.setAttribute("endpointClassName", seiClassName);
-        try {
-            context.addGBean(containerFactoryData);
-        } catch (GBeanAlreadyExistsException e) {
-            throw new DeploymentException("Could not add web service container factory gbean", e);
-        }
-
-        targetGBean.setReferencePattern("WebServiceContainerFactory", containerFactoryName);
-        targetGBean.setAttribute("pojoClassName", seiClassName);
-        return true;
-    }
-
-    public boolean configureEJB(GBeanData targetGBean, String ejbName, JarFile moduleFile, Map sharedContext, ClassLoader classLoader)
-            throws DeploymentException {
-        throw new DeploymentException("configureEJB NYI");
-    }
-
-    Class<?> loadSEI(String className, ClassLoader loader) throws DeploymentException {
-        try {
-            return loader.loadClass(className);
-        } catch (ClassNotFoundException ex) {
-            throw new DeploymentException("Unable to load Service Endpoint Interface: " + className, ex);
-        }
-    }
-
-    private List<Handler> buildHandlerChain(PortInfo portInfo) {
-        return new ArrayList<Handler>();
-    }
-
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Axis2Builder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addInterface(WebServiceBuilder.class);
-        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
-
-        infoBuilder.setConstructor(new String[]{"defaultEnvironment"});
-
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
-}
+/**
+ *  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.axis2.builder;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.JarFile;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.ws.handler.Handler;
+
+import org.apache.axis2.jaxws.javaee.PortComponentType;
+import org.apache.axis2.jaxws.javaee.WebserviceDescriptionType;
+import org.apache.axis2.jaxws.javaee.WebservicesType;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.axis2.Axis2WebServiceContainerFactoryGBean;
+import org.apache.geronimo.axis2.PortInfo;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.WebModule;
+import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.repository.Environment;
+
+public class Axis2Builder implements WebServiceBuilder {
+
+	private static final Log log = LogFactory.getLog(Axis2Builder.class);
+	
+    private final Environment defaultEnvironment;
+    private static final String KEY = Axis2Builder.class.getName();
+    private JAXBContext ctx;
+    private Definition wsdlDefinition = null;
+
+    public Axis2Builder(Environment defaultEnviroment) throws JAXBException {
+        this.defaultEnvironment = defaultEnviroment;
+        ctx = JAXBContext.newInstance(WebservicesType.class);
+    }
+
+    public void findWebServices(JarFile moduleFile, boolean isEJB, Map servletLocations, Environment environment, Map sharedContext)
+            throws DeploymentException {
+        final String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
+        try {
+            URL wsDDUrl = DeploymentUtil.createJarURL(moduleFile, path);
+            Map portMap = parseWebServiceDescriptor(wsDDUrl, moduleFile, isEJB, servletLocations);
+            if (portMap != null) {
+                EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
+                sharedContext.put(KEY, portMap);
+            }
+        } catch (MalformedURLException e) {
+            // The webservices.xml file doesn't exist.
+        }
+
+    }
+
+    private Map<String, PortInfo> parseWebServiceDescriptor(URL wsDDUrl, JarFile moduleFile, boolean isEJB, Map correctedPortLocations)
+            throws DeploymentException {
+
+        log.debug("parsing descriptor " + wsDDUrl);
+
+        Map<String, PortInfo> map = new HashMap<String, PortInfo>();
+
+        try {
+            InputStream in = wsDDUrl.openStream();
+            if (in == null) {
+                throw new DeploymentException("unable to read descriptor " + wsDDUrl);
+            }
+
+            Unmarshaller unmarshaller = ctx.createUnmarshaller();
+            Object obj = unmarshaller.unmarshal(new javax.xml.transform.stream.StreamSource(in), WebservicesType.class);
+
+            if (obj instanceof JAXBElement) {
+                obj = ((JAXBElement) obj).getValue();
+            }
+
+            if (!(obj instanceof WebservicesType)) {
+                return map;
+            }
+            WebservicesType wst = (WebservicesType) obj;
+
+            for (WebserviceDescriptionType desc : wst.getWebserviceDescription()) {
+                final String wsdlFile = desc.getWsdlFile().getValue();
+                final String serviceName = desc.getWebserviceDescriptionName().getValue();
+                
+                URL wsdlURL = null;
+                try {
+                	if(wsdlFile != null){
+                		wsdlURL = DeploymentUtil.createJarURL(moduleFile, wsdlFile);
+    					InputStream wsdlStream = wsdlURL.openStream();
+    					if(wsdlStream == null){
+    						throw new DeploymentException("unable to read descriptor "+wsdlURL);
+    					}else {
+    						wsdlStream.close();
+    					}
+    					try {
+							WSDLFactory factory = WSDLFactory.newInstance();
+							WSDLReader reader = factory.newWSDLReader();
+							reader.setFeature("javax.wsdl.importDocuments", true);
+							reader.setFeature("javax.wsdl.verbose", false);
+							wsdlDefinition = reader.readWSDL(wsdlURL.toString());
+						} catch (WSDLException e) {
+							throw new DeploymentException("Invalid WSDL provided "+e);
+						}
+                	}
+				} catch (RuntimeException e) {
+					throw new DeploymentException("Invalid url "+wsdlURL);
+				}
+
+                for (PortComponentType port : desc.getPortComponent()) {
+                    String servlet = port.getServiceImplBean().getServletLink().getValue();
+                    String sei = port.getServiceEndpointInterface().getValue();
+                    String portName = port.getPortComponentName().getValue();
+
+                    PortInfo portInfo = new PortInfo();
+
+                    portInfo.setServiceName(serviceName);
+                    portInfo.setServletLink(servlet);
+                    portInfo.setServiceEndpointInterfaceName(sei);
+                    portInfo.setPortName(portName);
+                    portInfo.setWsdlFile(wsdlFile);
+                    portInfo.setHandlers(port.getHandler());
+                    
+                    map.put(servlet, portInfo);
+                }
+            }
+
+            return map;
+        } catch (FileNotFoundException e) {
+            return Collections.EMPTY_MAP;
+        } catch (IOException ex) {
+            ex.printStackTrace();
+            throw new DeploymentException("unable to read " + wsDDUrl, ex);
+        } catch (JAXBException ex) {
+            throw new DeploymentException("unable to parse webservices.xml", ex);
+        }
+    }
+
+    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context)
+            throws DeploymentException {
+        // assert pi instanceof PortInfo : "received incorrect portInfo object";
+
+        Map sharedContext = ((WebModule) module).getSharedContext();
+        Map portInfoMap = (Map) sharedContext.get(KEY);
+        PortInfo portInfo = (PortInfo) portInfoMap.get(servletName);
+        if (portInfo == null) {
+            // not ours
+            return false;
+        }
+
+        log.debug("configuring POJO webservice: " + servletName + " sei: " + seiClassName);
+        
+        // verify that the class is loadable
+        ClassLoader classLoader = context.getClassLoader();
+        loadSEI(seiClassName, classLoader);
+
+        /* List<Handler> handlers = */
+        buildHandlerChain(portInfo);
+        AbstractName containerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(), "Axis2WebServiceContainerFactory", NameFactory.GERONIMO_SERVICE);
+        GBeanData containerFactoryData = new GBeanData(containerFactoryName, Axis2WebServiceContainerFactoryGBean.GBEAN_INFO);
+        containerFactoryData.setAttribute("portInfo", portInfo);
+        containerFactoryData.setAttribute("endpointClassName", seiClassName);
+        containerFactoryData.setAttribute("wsdlDefinition", wsdlDefinition);
+        try {
+            context.addGBean(containerFactoryData);
+        } catch (GBeanAlreadyExistsException e) {
+            throw new DeploymentException("Could not add web service container factory gbean", e);
+        }
+
+        targetGBean.setReferencePattern("WebServiceContainerFactory", containerFactoryName);
+        targetGBean.setAttribute("pojoClassName", seiClassName);
+        return true;
+    }
+
+    public boolean configureEJB(GBeanData targetGBean, String ejbName, JarFile moduleFile, Map sharedContext, ClassLoader classLoader)
+            throws DeploymentException {
+        throw new DeploymentException("configureEJB NYI");
+    }
+
+    Class<?> loadSEI(String className, ClassLoader loader) throws DeploymentException {
+        try {
+            return loader.loadClass(className);
+        } catch (ClassNotFoundException ex) {
+            throw new DeploymentException("Unable to load Service Endpoint Interface: " + className, ex);
+        }
+    }
+
+    private List<Handler> buildHandlerChain(PortInfo portInfo) {
+        return new ArrayList<Handler>();
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Axis2Builder.class, NameFactory.MODULE_BUILDER);
+        infoBuilder.addInterface(WebServiceBuilder.class);
+        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
+
+        infoBuilder.setConstructor(new String[]{"defaultEnvironment"});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Modified: geronimo/server/trunk/modules/geronimo-axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/pom.xml?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-axis2/pom.xml Wed Jan 31 04:34:58 2007
@@ -1,199 +1,203 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    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: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
-
-<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.modules</groupId>
-        <artifactId>modules</artifactId>
-        <version>2.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>geronimo-axis2</artifactId>
-    <name>Geronimo :: AXIS2</name>
-
-    <repositories>
-        <repository>
-            <id>maven-repo1</id>
-            <name>maven official repo</name>
-            <url>http://repo1.maven.org/maven/</url>
-            <layout>legacy</layout>
-        </repository>
-        <repository>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-            <id>ws-zones</id>
-            <name>ws.zones maven repository</name>
-            <url>http://ws.zones.apache.org/repository/</url>
-            <layout>legacy</layout>
-        </repository>
-    </repositories>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-webservices</artifactId>
-            <version>${version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-java2wsdl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-jaxws-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-jaxws</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons</groupId>
-            <artifactId>XmlSchema</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.neethi</groupId>
-            <artifactId>neethi</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>logkit</groupId>
-                    <artifactId>logkit</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>avalon-framework</groupId>
-                    <artifactId>avalon-framework</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>woodstox</groupId>
-            <artifactId>wstx-asl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>stax</groupId>
-            <artifactId>stax-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.mail</groupId>
-            <artifactId>mail</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.activation</groupId>
-            <artifactId>activation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xmlbeans</groupId>
-            <artifactId>xbean</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jaxen</groupId>
-            <artifactId>jaxen</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>backport-util-concurrent</groupId>
-            <artifactId>backport-util-concurrent</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>annogen</groupId>
-            <artifactId>annogen</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>incubator-woden</groupId>
-            <artifactId>woden</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <version>1.0</version>
-                <executions>
-                    <execution>
-                        <id>add-source</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                        </goals>
-                        <configuration>
-                            <sources>
-                                <source>${basedir}/src/main/generated</source>
-                            </sources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    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: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<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.modules</groupId>
+        <artifactId>modules</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-axis2</artifactId>
+    <name>Geronimo :: AXIS2</name>
+
+    <repositories>
+        <repository>
+            <id>maven-repo1</id>
+            <name>maven official repo</name>
+            <url>http://repo1.maven.org/maven/</url>
+            <layout>legacy</layout>
+        </repository>
+        <repository>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>ws-zones</id>
+            <name>ws.zones maven repository</name>
+            <url>http://ws.zones.apache.org/repository/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-webservices</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-java2wsdl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-metadata</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons</groupId>
+            <artifactId>XmlSchema</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.neethi</groupId>
+            <artifactId>neethi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>logkit</groupId>
+                    <artifactId>logkit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>avalon-framework</groupId>
+                    <artifactId>avalon-framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>woodstox</groupId>
+            <artifactId>wstx-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jaxen</groupId>
+            <artifactId>jaxen</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>annogen</groupId>
+            <artifactId>annogen</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>incubator-woden</groupId>
+            <artifactId>woden</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${basedir}/src/main/generated</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
+

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java (original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java Wed Jan 31 04:34:58 2007
@@ -17,13 +17,33 @@
 
 package org.apache.geronimo.axis2;
 
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
+import java.io.StringBufferInputStream;
+import java.io.StringReader;
+import java.io.Writer;
+import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.wsdl.xml.WSDLWriter;
 import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.ws.WebServiceException;
 
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.util.UUIDGenerator;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
@@ -32,21 +52,46 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.description.AxisMessage;
+import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
+import org.apache.axis2.description.WSDL20ToAxisServiceBuilder;
+import org.apache.axis2.description.WSDLToAxisServiceBuilder;
 import org.apache.axis2.engine.AxisEngine;
-import org.apache.axis2.rpc.receivers.RPCMessageReceiver;
+import org.apache.axis2.jaxws.description.DescriptionFactory;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
+import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.ParameterDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.RequestWrapperAnnot;
+import org.apache.axis2.jaxws.description.builder.ResponseWrapperAnnot;
+import org.apache.axis2.jaxws.description.builder.WebMethodAnnot;
+import org.apache.axis2.jaxws.description.builder.WebParamAnnot;
+import org.apache.axis2.jaxws.description.builder.WebServiceAnnot;
+import org.apache.axis2.jaxws.description.builder.WsdlComposite;
+import org.apache.axis2.jaxws.description.builder.WsdlGenerator;
+import org.apache.axis2.jaxws.server.JAXWSMessageReceiver;
 import org.apache.axis2.transport.OutTransportInfo;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.transport.http.HTTPTransportReceiver;
 import org.apache.axis2.transport.http.HTTPTransportUtils;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.MessageContextBuilder;
+import org.apache.axis2.util.XMLUtils;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.axis2.wsdl.WSDLUtil;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.apache.ws.commons.schema.XmlSchema;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
 
 
 public class Axis2WebServiceContainer implements WebServiceContainer {
@@ -62,16 +107,157 @@
     private ConfigurationContext configurationContext;
     private String contextRoot = null;
     private Map servicesMap;
+    private Definition wsdlDefinition;
     
-
-    public Axis2WebServiceContainer(PortInfo portInfo, String endpointClassName, ClassLoader classLoader) {
+    
+    public Axis2WebServiceContainer(PortInfo portInfo, String endpointClassName, Definition wsdlDefinition, ClassLoader classLoader) {
         this.classLoader = classLoader;
         this.endpointClassName = endpointClassName;
         this.portInfo = portInfo;
+        this.wsdlDefinition = wsdlDefinition;
         try {
+            AxisService service = null;
+            
             configurationContext = ConfigurationContextFactory.createDefaultConfigurationContext();
-            AxisService service = AxisService.createService(endpointClassName, configurationContext.getAxisConfiguration(), RPCMessageReceiver.class);
+          
+            if(wsdlDefinition != null){ //WSDL Has been provided
+           		WSDLToAxisServiceBuilder wsdlBuilder = null;
+           		
+		        WSDLFactory factory = WSDLFactory.newInstance();
+		        WSDLWriter writer = factory.newWSDLWriter();
+		        
+		        ByteArrayOutputStream out = new ByteArrayOutputStream();
+		        writer.writeWSDL(wsdlDefinition, out);
+		        String wsdlContent = out.toString("UTF-8"); //TODO Pass correct encoding from WSDL
+		        
+           		OMNamespace documentElementNS = ((OMElement)XMLUtils.toOM(new StringReader(wsdlContent))).getNamespace();
+           		
+           		Map<QName, Service> serviceMap = wsdlDefinition.getServices();
+            	Service wsdlService = serviceMap.values().iterator().next();
+            	
+            	Map<String, Port> portMap = wsdlService.getPorts();
+            	Port port = portMap.values().iterator().next();
+            	String portName = port.getName();
+           		QName serviceQName = wsdlService.getQName();
+
+           		//Decide on WSDL Version : 
+            	if(WSDLConstants.WSDL20_2006Constants.DEFAULT_NAMESPACE_URI.equals(documentElementNS.getNamespaceURI())){
+            		wsdlBuilder = new WSDL20ToAxisServiceBuilder(new StringBufferInputStream(wsdlContent), serviceQName, null);
+            	}
+            	else if(Constants.NS_URI_WSDL11.equals(documentElementNS.getNamespaceURI())){
+            		wsdlBuilder = new WSDL11ToAxisServiceBuilder(wsdlDefinition, serviceQName , portName);
+            	}
+            	//populate with axis2 objects
+            	service = wsdlBuilder.populateService();
+            	service.addParameter(new Parameter("ServiceClass", endpointClassName));
+            	
+            	//Goind to create annotations by hand
+            	DescriptionBuilderComposite dbc = new DescriptionBuilderComposite();
+            	dbc.setClassLoader(classLoader);
+            	HashMap<String, DescriptionBuilderComposite> dbcMap = new HashMap<String, DescriptionBuilderComposite>();
+            	
+            	//Service related annotations
+           		WebServiceAnnot serviceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
+           		serviceAnnot.setPortName(portName);
+            	serviceAnnot.setServiceName(service.getName());
+           	 	serviceAnnot.setName(service.getName());
+           	 	serviceAnnot.setTargetNamespace(service.getTargetNamespace());
+           	 	serviceAnnot.setEndpointInterface(endpointClassName);
+          	
+           	 	Class endPointClass = classLoader.loadClass(endpointClassName);
+    	 		Method[] classMethods = endPointClass.getMethods();
+    	 		
+           	 	for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext() ;){
+           	 		AxisOperation operation = opIterator.next();
+           	 		operation.setMessageReceiver(JAXWSMessageReceiver.class.newInstance());
+           	 		
+           	 		for(Method method : classMethods){
+           	 			// TODO Is this correct method?
+           	 			String axisOpName = operation.getName().getLocalPart();
+           	 			
+           	 			if(method.getName().equals(axisOpName)){
+           	 				//Method level annotations
+           	 				MethodDescriptionComposite mdc = new MethodDescriptionComposite();
+           	 				WebMethodAnnot webMethodAnnot = WebMethodAnnot.createWebMethodAnnotImpl();
+           	 				webMethodAnnot.setOperationName(method.getName());
+//           	 				methodAnnot.setAction(operation.get);
+//           	 				methodAnnot.setExclude(false);
+           	 				
+           	 				mdc.setWebMethodAnnot(webMethodAnnot);
+
+           	 				mdc.setMethodName(method.getName());
+           	 				mdc.setDescriptionBuilderCompositeRef(dbc);
+
+	               	 		String MEP = operation.getMessageExchangePattern();
+	               	 		
+	               	 		if (WSDLUtil.isInputPresentForMEP(MEP)) {
+	               	 			AxisMessage inAxisMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+	               	 			if(inAxisMessage != null){
+		               	 			//TODO: Has to explore more
+		               	 			Class[] paramTypes = method.getParameterTypes();
+		               	 			int i = 0;
+		               	 			for(Class paramType : paramTypes){
+		               	 				//Parameter level annotations
+		               	 				ParameterDescriptionComposite pdc = new ParameterDescriptionComposite();
+		               	 				WebParamAnnot webParamAnnot = WebParamAnnot.createWebParamAnnotImpl();
+
+		               	 				webParamAnnot.setName("arg"+i);
+		               	 				webParamAnnot.setName(inAxisMessage.getElementQName().getLocalPart());
+		               	 				webParamAnnot.setTargetNamespace(inAxisMessage.getElementQName().getNamespaceURI());
+		               	 				
+		               	 				pdc.setWebParamAnnot(webParamAnnot);
+		               	 				String strParamType = paramType.toString();
+		               	 				
+		               	 				pdc.setMethodDescriptionCompositeRef(mdc);
+		               	 				pdc.setParameterType(strParamType.split(" ")[1]);
+		               	 				mdc.addParameterDescriptionComposite(pdc, i);
+		               	 				//TODO: Do we need to set these things?
+		               	 				RequestWrapperAnnot requestWrapAnnot = RequestWrapperAnnot.createRequestWrapperAnnotImpl();
+		               	 				requestWrapAnnot.setLocalName(inAxisMessage.getElementQName().getLocalPart());
+		               	 				requestWrapAnnot.setTargetNamespace(inAxisMessage.getElementQName().getNamespaceURI());
+		               	 				
+		               	 				mdc.setRequestWrapperAnnot(requestWrapAnnot);
+		               	 				i++;
+		               	 			}
+	               	 			}
+	               	 		}
+	               	 		
+	               	 		if (WSDLUtil.isOutputPresentForMEP(MEP)) {
+	               	 			AxisMessage outAxisMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+	               	 			
+	               	 			if(outAxisMessage != null){
+	               	 				mdc.setReturnType(method.getReturnType().toString().split(" ")[1]);
+	               	 				//TODO:
+	               	 				ResponseWrapperAnnot responseWrapAnnot = ResponseWrapperAnnot.createResponseWrapperAnnotImpl();
+	               	 				responseWrapAnnot.setLocalName(outAxisMessage.getElementQName().getLocalPart());
+	               	 				responseWrapAnnot.setTargetNamespace(outAxisMessage.getElementQName().getNamespaceURI());
+	               	 				mdc.setResponseWrapperAnnot(responseWrapAnnot);
+	               	 			}
+	               	 		}
+	               	 		mdc.setWebMethodAnnot(webMethodAnnot);
+	               	 		dbc.addMethodDescriptionComposite(mdc);
+	               	 		
+           	 				break;
+           	 			}
+           	 		}
+           	 	}
+            	
+            	dbc.setWebServiceAnnot(serviceAnnot);
+           	 	dbc.setWsdlDefinition(wsdlDefinition);
+           	 	dbc.setClassName(endpointClassName);
+           	 	dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
+           	 	dbcMap.put(endpointClassName, dbc);
+                List<ServiceDescription> serviceDescList = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);
+                ServiceDescription sd = serviceDescList.get(0);
+                Parameter serviceDescription = new Parameter(EndpointDescription.AXIS_SERVICE_PARAMETER, sd.getEndpointDescriptions()[0]);
+                service.addParameter(serviceDescription);
+            	        	            	
+            }else { //No WSDL, Axis2 will handle it. Is it ?
+            	service = AxisService.createService(endpointClassName, configurationContext.getAxisConfiguration(), JAXWSMessageReceiver.class);
+            }
+
             configurationContext.getAxisConfiguration().addService(service);
+            
         } catch (AxisFault af) {
             throw new RuntimeException(af);
         } catch (Exception e) {
@@ -79,6 +265,7 @@
         }
     }
 
+    
     public void getWsdl(Request request, Response response) throws Exception {
         doService(request, response);
     }
@@ -98,12 +285,15 @@
         MessageContext msgContext = new MessageContext();
         msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP);
         msgContext.setProperty(MessageContext.REMOTE_ADDR, request.getRemoteAddr());
+        
 
         try {
             TransportOutDescription transportOut = this.configurationContext.getAxisConfiguration()
                     .getTransportOut(new QName(Constants.TRANSPORT_HTTP));
             TransportInDescription transportIn = this.configurationContext.getAxisConfiguration()
                     .getTransportIn(new QName(Constants.TRANSPORT_HTTP));
+            
+            
 
             msgContext.setConfigurationContext(this.configurationContext);
 
@@ -117,6 +307,7 @@
             msgContext.setTransportOut(transportOut);
             msgContext.setServiceGroupContextId(UUIDGenerator.getUUID());
             msgContext.setServerSide(true);
+            
 
 //            // set the transport Headers
 //            HashMap headerMap = new HashMap();
@@ -174,6 +365,9 @@
                 contextRoot = "/";
             }
             configurationContext.setContextRoot(contextRoot);
+            
+//            Parameter servicePath = new Parameter(Constants.PARAM_SERVICE_PATH, new String(""));
+            
         }
     }
 
@@ -243,27 +437,26 @@
                 }
             }
             
+            //TODO: Has to implement 
             if (uri.getQuery().startsWith("wsdl2")) {
                 if (service != null) {
-                    service.printWSDL2(response.getOutputStream(), uri.getHost(), servicePath);
+                    service.printWSDL2(response.getOutputStream());
                     return;
                 }
             }
             if (uri.getQuery().startsWith("wsdl")) {
-            	if(service != null){
-            		service.printWSDL(response.getOutputStream(), uri.getHost(), servicePath);
+            	if(wsdlDefinition != null){
+            		WSDLFactory factory = WSDLFactory.newInstance();
+            		WSDLWriter writer = factory.newWSDLWriter();            		
+            		writer.writeWSDL(wsdlDefinition, response.getOutputStream());
             		return;
+            	}else {
+            		//TODO: How do we give WSDL info now ?
             	}
             }
+            //TODO: Not working properly and do we need to have these requests ?
             if (uri.getQuery().startsWith("xsd=")) {
-                if (service != null) {
-                    service.printSchema(response.getOutputStream());
-                    return;
-                }
-            }
-            //cater for named xsds - check for the xsd name
-            if (uri.getQuery().startsWith("xsd")) {
-                String schemaName = uri.getQuery().substring(uri.getQuery().lastIndexOf("=") + 1);
+            	String schemaName = uri.getQuery().substring(uri.getQuery().lastIndexOf("=") + 1);
 
                 if (service != null) {
                     //run the population logic just to be sure
@@ -280,6 +473,16 @@
                         response.setStatusCode(404);
                         return;
                     }
+                }                
+            }
+            //cater for named xsds - check for the xsd name
+            if (uri.getQuery().startsWith("xsd")) {
+            	if (service != null) {
+            		response.setContentType("text/xml");
+            		response.setHeader("Transfer-Encoding", "chunked");
+                    service.printSchema(response.getOutputStream());
+                    response.getOutputStream().close();
+                    return;
                 }
             }
 
@@ -344,8 +547,8 @@
     }
     
     public void destroy() {
-    }
-
+	}
+    
     public class Axis2TransportInfo implements OutTransportInfo {
         private Response response;
 
@@ -356,6 +559,25 @@
         public void setContentType(String contentType) {
             response.setHeader(HTTPConstants.HEADER_CONTENT_TYPE, contentType);
         }
+    }
+    
+    class WSDLGeneratorImpl implements WsdlGenerator {
+
+    	private Definition def;
+    	
+    	public WSDLGeneratorImpl(Definition def) {
+    		this.def = def;
+    	}
+    	
+    	public WsdlComposite generateWsdl(String implClass, String bindingType) throws WebServiceException {
+    		// Need WSDL generation code
+    		WsdlComposite composite = new WsdlComposite();
+    		composite.setWsdlFileName(implClass);
+    		HashMap<String, Definition> testMap = new HashMap<String, Definition>();
+    		testMap.put(composite.getWsdlFileName(), def);
+    		composite.setWsdlDefinition(testMap);
+    		return composite;
+    	}
     }
 
 }

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainerFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainerFactoryGBean.java?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainerFactoryGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainerFactoryGBean.java Wed Jan 31 04:34:58 2007
@@ -1,56 +1,61 @@
-/**
- *  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.axis2;
-
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.webservices.WebServiceContainer;
-import org.apache.geronimo.webservices.WebServiceContainerFactory;
-
-public class Axis2WebServiceContainerFactoryGBean implements WebServiceContainerFactory {
-
-    private final PortInfo portInfo;
-    private final String endpointClassName;
-    private final ClassLoader classLoader;
-
-    public Axis2WebServiceContainerFactoryGBean(PortInfo portInfo, String endpointClassName, ClassLoader classLoader) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
-        this.portInfo = portInfo;
-        this.classLoader = classLoader;
-        this.endpointClassName = endpointClassName;
-    }
-
-    public WebServiceContainer getWebServiceContainer() {
-        return new Axis2WebServiceContainer(portInfo, endpointClassName, classLoader);
-    }
-
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Axis2WebServiceContainerFactoryGBean.class, NameFactory.GERONIMO_SERVICE);
-        infoBuilder.addAttribute("portInfo", PortInfo.class, true, true);
-        infoBuilder.addAttribute("endpointClassName", String.class, true, true);
-        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
-        infoBuilder.setConstructor(new String[]{"portInfo", "endpointClassName", "classLoader"});
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-}
+/**
+ *  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.axis2;
+
+import javax.wsdl.Definition;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.webservices.WebServiceContainer;
+import org.apache.geronimo.webservices.WebServiceContainerFactory;
+
+public class Axis2WebServiceContainerFactoryGBean implements WebServiceContainerFactory {
+
+    private final PortInfo portInfo;
+    private final String endpointClassName;
+    private final ClassLoader classLoader;
+    private final Definition wsdlDefinition;
+
+    public Axis2WebServiceContainerFactoryGBean(PortInfo portInfo, String endpointClassName, Definition wsdlDefinition, ClassLoader classLoader) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+        this.portInfo = portInfo;
+        this.classLoader = classLoader;
+        this.endpointClassName = endpointClassName;
+        this.wsdlDefinition = wsdlDefinition;
+    }
+
+    public WebServiceContainer getWebServiceContainer() {
+        return new Axis2WebServiceContainer(portInfo, endpointClassName, wsdlDefinition, classLoader);
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Axis2WebServiceContainerFactoryGBean.class, NameFactory.GERONIMO_SERVICE);
+        infoBuilder.addAttribute("portInfo", PortInfo.class, true, true);
+        infoBuilder.addAttribute("endpointClassName", String.class, true, true);
+        infoBuilder.addAttribute("wsdlDefinition", Definition.class, true, true);
+        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
+        infoBuilder.setConstructor(new String[]{"portInfo", "endpointClassName", "wsdlDefinition", "classLoader"});
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?view=diff&rev=501827&r1=501826&r2=501827
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Wed Jan 31 04:34:58 2007
@@ -1217,6 +1217,11 @@
                 <artifactId>axis2-jaxws</artifactId>
                 <version>SNAPSHOT</version>
             </dependency>
+	    <dependency>
+		    <groupId>org.apache.axis2</groupId>
+		    <artifactId>axis2-metadata</artifactId>
+		    <version>SNAPSHOT</version>
+	    </dependency>
             <dependency>
                 <groupId>org.apache.ws.commons.axiom</groupId>
                 <artifactId>axiom-api</artifactId>



Mime
View raw message