geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r521834 - in /geronimo/server/trunk: configs/axis2/pom.xml modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
Date Fri, 23 Mar 2007 18:01:40 GMT
Author: gawor
Date: Fri Mar 23 11:01:39 2007
New Revision: 521834

URL: http://svn.apache.org/viewvc?view=rev&rev=521834
Log:
applied GERONIMO-3005 bug fix

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

Modified: geronimo/server/trunk/configs/axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/axis2/pom.xml?view=diff&rev=521834&r1=521833&r2=521834
==============================================================================
--- geronimo/server/trunk/configs/axis2/pom.xml (original)
+++ geronimo/server/trunk/configs/axis2/pom.xml Fri Mar 23 11:01:39 2007
@@ -70,6 +70,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-j2ee-schema</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-java2wsdl</artifactId>
         </dependency>
@@ -167,6 +173,7 @@
             <groupId>org.apache.woden</groupId>
             <artifactId>woden</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=521834&r1=521833&r2=521834
==============================================================================
--- 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
Fri Mar 23 11:01:39 2007
@@ -17,6 +17,19 @@
 
 package org.apache.geronimo.axis2.builder;
 
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.JarFile;
+
+import javax.xml.namespace.QName;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.axis2.client.Axis2ServiceReference;
@@ -36,27 +49,14 @@
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.javaee.HandlerChainsType;
 import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.PortComponentType;
 import org.apache.geronimo.xbeans.javaee.ServiceImplBeanType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
 import org.apache.geronimo.xbeans.javaee.WebserviceDescriptionType;
+import org.apache.geronimo.xbeans.javaee.WebservicesDocument;
 import org.apache.geronimo.xbeans.javaee.WebservicesType;
 
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.jar.JarFile;
-
 public class Axis2Builder extends JAXWSServiceBuilder {
 
 	private static final Log log = LogFactory.getLog(Axis2Builder.class);
@@ -85,7 +85,7 @@
         Map<String, PortInfo> map = null;
 
         try {
-            WebservicesType wst = WebservicesType.Factory.parse(in);
+            WebservicesType wst = WebservicesDocument.Factory.parse(in).getWebservices();
 
             for (WebserviceDescriptionType desc : wst.getWebserviceDescriptionArray()) {
                 String wsdlFile = null;
@@ -123,7 +123,14 @@
                         portInfo.setEnableMTOM(port.getEnableMtom().getBooleanValue());
                     }
 
-                    portInfo.setHandlers(HandlerChainsType.class, port.getHandlerChains());
+                    //portInfo.setHandlers(HandlerChainsTypeImpl.class, port.getHandlerChains());
+                    //TODO: There can be a better method than this :)
+                    if(port.getHandlerChains() != null){
+                        StringBuffer chains = new StringBuffer("<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
+                        chains.append(port.getHandlerChains().xmlText());
+                        chains.append("</handler-chains>");
+                        portInfo.setHandlersAsXML(chains.toString());
+                    }
 
                     if (port.getWsdlPort() != null) {
                         portInfo.setWsdlPort(port.getWsdlPort().getQNameValue());
@@ -149,8 +156,6 @@
             return Collections.EMPTY_MAP;
         } catch (IOException ex) {
             throw new DeploymentException("Unable to read " + wsDDUrl, ex);
-        } catch (JAXBException ex) {
-            throw new DeploymentException("Unable to parse " + wsDDUrl, ex);
         } catch (Exception ex) {
             throw new DeploymentException("Unknown deployment error", ex);
         } finally {



Mime
View raw message