geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r161537 - in geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder: AxisServiceBuilder.java WSDescriptorParser.java
Date Sat, 16 Apr 2005 02:57:08 GMT
Author: dblevins
Date: Fri Apr 15 19:57:07 2005
New Revision: 161537

URL: http://svn.apache.org/viewcvs?view=rev&rev=161537
Log:
Slightly rearranging method signatures

Modified:
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java?view=diff&r1=161536&r2=161537
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
Fri Apr 15 19:57:07 2005
@@ -121,49 +121,9 @@
         return createServiceDesc(portInfo, classLoader);
     }
 
-    private static List createHandlerInfos(PortInfo portInfo, ClassLoader classLoader) throws
DeploymentException {
-        List list = new ArrayList();
-
-        PortComponentHandlerType[] handlers = portInfo.getHandlers();
-
-        for (int i = 0; i < handlers.length; i++) {
-            PortComponentHandlerType handler = handlers[i];
-
-            // Get handler class
-            Class handlerClass = null;
-            String className = handler.getHandlerClass().getStringValue().trim();
-            try {
-                handlerClass = classLoader.loadClass(className);
-            } catch (ClassNotFoundException e) {
-                throw new DeploymentException("Unable to load handler class: " + className,
e);
-            }
-
-            // config data for the handler
-            Map config = new HashMap();
-            ParamValueType[] paramValues = handler.getInitParamArray();
-            for (int j = 0; j < paramValues.length; j++) {
-                ParamValueType paramValue = paramValues[j];
-                String paramName = paramValue.getParamName().getStringValue().trim();
-                String paramStringValue = paramValue.getParamValue().getStringValue().trim();
-                config.put(paramName, paramStringValue);
-            }
-
-            // QName array of headers it processes
-            XsdQNameType[] soapHeaderQNames = handler.getSoapHeaderArray();
-            QName[] headers = new QName[soapHeaderQNames.length];
-            for (int j = 0; j < soapHeaderQNames.length; j++) {
-                XsdQNameType soapHeaderQName = soapHeaderQNames[j];
-                headers[j] = soapHeaderQName.getQNameValue();
-            }
-
-            list.add(new HandlerInfo(handlerClass, config, headers));
-        }
-        return list;
-    }
-
     public static ServiceInfo createServiceInfo(PortInfo portInfo, ClassLoader classLoader)
throws DeploymentException {
         JavaServiceDesc serviceDesc = createServiceDesc(portInfo, classLoader);
-        List handlerInfos = createHandlerInfos(portInfo, classLoader);
+        List handlerInfos = WSDescriptorParser.createHandlerInfoList(portInfo.getHandlers(),
classLoader);
         SchemaInfoBuilder schemaInfoBuilder = portInfo.getSchemaInfoBuilder();
         Map rawWsdlMap = schemaInfoBuilder.getWsdlMap();
         Map wsdlMap = rewriteWsdlMap(portInfo, rawWsdlMap);

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java?view=diff&r1=161536&r2=161537
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java
Fri Apr 15 19:57:07 2005
@@ -28,6 +28,8 @@
 import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
 import java.util.jar.JarFile;
 import javax.wsdl.Definition;
 import javax.wsdl.Operation;
@@ -55,6 +57,7 @@
 import javax.xml.rpc.holders.ShortHolder;
 import javax.xml.rpc.holders.ShortWrapperHolder;
 import javax.xml.rpc.holders.StringHolder;
+import javax.xml.rpc.handler.HandlerInfo;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.kernel.ClassLoading;
@@ -71,6 +74,8 @@
 import org.apache.geronimo.xbeans.j2ee.WebserviceDescriptionType;
 import org.apache.geronimo.xbeans.j2ee.WebservicesDocument;
 import org.apache.geronimo.xbeans.j2ee.WebservicesType;
+import org.apache.geronimo.xbeans.j2ee.ParamValueType;
+import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
 import org.apache.xmlbeans.XmlException;
 
 /**
@@ -371,5 +376,42 @@
             return null;
         }
 
+    }
+
+    public static List createHandlerInfoList(PortComponentHandlerType[] handlers, ClassLoader
classLoader) throws DeploymentException {
+        List list = new ArrayList();
+        for (int i = 0; i < handlers.length; i++) {
+            PortComponentHandlerType handler = handlers[i];
+
+            // Get handler class
+            Class handlerClass = null;
+            String className = handler.getHandlerClass().getStringValue().trim();
+            try {
+                handlerClass = classLoader.loadClass(className);
+            } catch (ClassNotFoundException e) {
+                throw new DeploymentException("Unable to load handler class: " + className,
e);
+            }
+
+            // config data for the handler
+            Map config = new HashMap();
+            ParamValueType[] paramValues = handler.getInitParamArray();
+            for (int j = 0; j < paramValues.length; j++) {
+                ParamValueType paramValue = paramValues[j];
+                String paramName = paramValue.getParamName().getStringValue().trim();
+                String paramStringValue = paramValue.getParamValue().getStringValue().trim();
+                config.put(paramName, paramStringValue);
+            }
+
+            // QName array of headers it processes
+            XsdQNameType[] soapHeaderQNames = handler.getSoapHeaderArray();
+            QName[] headers = new QName[soapHeaderQNames.length];
+            for (int j = 0; j < soapHeaderQNames.length; j++) {
+                XsdQNameType soapHeaderQName = soapHeaderQNames[j];
+                headers[j] = soapHeaderQName.getQNameValue();
+            }
+
+            list.add(new HandlerInfo(handlerClass, config, headers));
+        }
+        return list;
     }
 }



Mime
View raw message