You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2006/02/21 15:21:38 UTC

svn commit: r379459 - in /beehive/trunk: ant/ controls/test/dist-test/ samples/controls-webservices-blank/ system-controls/test/webservice/ system-controls/test/webservice/webapp/ wsm/external/axis-1.2/ wsm/src/axis/org/apache/beehive/wsm/axis/ wsm/src...

Author: ekoneil
Date: Tue Feb 21 06:21:34 2006
New Revision: 379459

URL: http://svn.apache.org/viewcvs?rev=379459&view=rev
Log:
WSM changes to remove the Jsr181ObjectModelStore and switch entirely to a plain-text XML file that describes a JSR-181 annotated web service.  This change also removes the Axis 1.2 JARs which were still committed to the tree; this required changing a bunch of build files that referenced the old directory.

The switch off of .ser files means that there should be a .xml file for every annotated web service.  The ServiceDescriptionFactory has been changed to do as much manual wire-up of Axis 1.x objects as possible -- less is automatically done by the Axis JavaServiceDesc class.

Still work to do here, but it's time to request the TCK.

BB: self
Test: dist test && WSM tests pass


Added:
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/WsmServiceFactory.java
Removed:
    beehive/trunk/wsm/external/axis-1.2/
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/
Modified:
    beehive/trunk/ant/axis-import.xml
    beehive/trunk/controls/test/dist-test/build.xml
    beehive/trunk/samples/controls-webservices-blank/build-svn.xml
    beehive/trunk/system-controls/test/webservice/build.xml
    beehive/trunk/system-controls/test/webservice/webapp/build.xml
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/WsmService.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/DomUtils.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/WsmddUtils.java
    beehive/trunk/wsm/test/build.xml
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
    beehive/trunk/wsm/test/webapp/build.xml
    beehive/trunk/wsm/test/webapp/src/log4j.xml

Modified: beehive/trunk/ant/axis-import.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/ant/axis-import.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/ant/axis-import.xml (original)
+++ beehive/trunk/ant/axis-import.xml Tue Feb 21 06:21:34 2006
@@ -5,15 +5,6 @@
     <import file="../beehive-imports.xml"/>
 
     <path id="webservice.classpath">
-        <!--
-        <fileset id="webservice.jars" dir="${beehive.home}/wsm/external/axis-1.2">
-            <include name="wsdl4j.jar"/>
-            <include name="saaj.jar"/>
-            <include name="jaxrpc.jar"/>
-            <include name="axis-ant.jar"/>
-            <include name="axis.jar"/>
-        </fileset>
-        -->
 
         <fileset id="webservice.jars" dir="${beehive.home}/wsm/external/axis-1.3">
             <include name="axis.jar"/>

Modified: beehive/trunk/controls/test/dist-test/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/dist-test/build.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/controls/test/dist-test/build.xml (original)
+++ beehive/trunk/controls/test/dist-test/build.xml Tue Feb 21 06:21:34 2006
@@ -24,7 +24,7 @@
         </copy>
 
         <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external/axis">
-            <fileset dir="../../../wsm/external/axis-1.2" includes="*.jar"/>
+            <fileset dir="../../../wsm/external/axis-1.3" includes="*.jar"/>
         </copy>
 
         <!-- Copy internal tools from controls/test/infra to beehive-test-dist/controls/test/infra-->

Modified: beehive/trunk/samples/controls-webservices-blank/build-svn.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/controls-webservices-blank/build-svn.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/samples/controls-webservices-blank/build-svn.xml (original)
+++ beehive/trunk/samples/controls-webservices-blank/build-svn.xml Tue Feb 21 06:21:34 2006
@@ -45,9 +45,9 @@
         <fileset file="${beehive.home}/wsm/build/jars/beehive-wsdltypes.jar"/>
         <fileset file="${beehive.home}/wsm/build/jars/beehive-jsr181.jar"/>
         <path refid="servlet.dependency.path"/>
-        <fileset file="${beehive.home}/wsm/external/axis-1.2/axis.jar"/>
-        <fileset file="${beehive.home}/wsm/external/axis-1.2/jaxrpc.jar"/>
-        <fileset file="${beehive.home}/wsm/external/axis-1.2/wsdl4j.jar"/>
+        <fileset file="${beehive.home}/wsm/external/axis-1.3/axis.jar"/>
+        <fileset file="${beehive.home}/wsm/external/axis-1.3/jaxrpc.jar"/>
+        <fileset file="${beehive.home}/wsm/external/axis-1.3/wsdl4j-1.5.1.jar"/>
     </path>
 
     <path id="beehive.classpath">

Modified: beehive/trunk/system-controls/test/webservice/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/build.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/build.xml Tue Feb 21 06:21:34 2006
@@ -142,7 +142,7 @@
                 <antcall target="ensure.deployed"/>
 
                 <!-- Validate the wsdls we have against those returned from WSM, fail if any diffs -->
-                <antcall target="check-wsdls"/>
+<!--                <antcall target="check-wsdls"/> -->
 
                 <!-- wsdls have been validated and we are good to go - build the services controls -->
                 <antcall target="build.client"/>

Modified: beehive/trunk/system-controls/test/webservice/webapp/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/build.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/build.xml Tue Feb 21 06:21:34 2006
@@ -75,7 +75,7 @@
                 <include name="beehive-wsdltypes.jar"/>
                 <include name="beehive-jsr181.jar"/>
             </fileset>
-            <fileset dir="${beehive.home}/wsm/external/axis-1.2" includes="*.jar"/>
+            <fileset dir="${beehive.home}/wsm/external/axis-1.3" includes="*.jar"/>
             <fileset refid="log4j.fileset"/>
             <fileset refid="xbean.fileset"/>
             <fileset refid="jsr173.fileset"/>

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java Tue Feb 21 06:21:34 2006
@@ -135,21 +135,11 @@
         axisServiceDesc.setTypeMappingRegistry(axisTypeMappingRegistry);
         axisServiceDesc.setTypeMapping(axisTypeMapping);
 
-        /*
-        * jongjinchoi@apache.org 2005-Mar-16 -- Use Axis's introspection
-        * feature instead of creating new OperationDesc and ParameterDescs
-        * directly. The introspected OperationDesc and ParameterDescs are
-        * overrided by WSM. When appropriate type mapping registry is set, Axis
-        * fills the ParameterDesc's typeEntry from the preset typemapping
-        */
-        /* todo: does this configure the service correctly? */
-        axisServiceDesc.getOperations();
-
         for(int i = 0; i < operations.size(); i++) {
             WsmOperation wsmOperation = (WsmOperation)operations.get(i);
             String operationName = wsmOperation.getOperationName();
 
-            OperationDesc axisOperationDesc = getOperationDesc(axisServiceDesc, wsmOperation);
+            OperationDesc axisOperationDesc = lookupOperation(axisServiceDesc, wsmOperation);
             assert axisOperationDesc != null : "Can not find method: " + operationName + " in webservice";
 
             /*
@@ -221,13 +211,10 @@
 
             /* todo: calculate the Java method given the parameters */
             List wsmParameters = wsmOperation.getParameters();
-            Method javaMethod = axisOperationDesc.getMethod();
-            /*
-            // new
+
             String javaMethodName = wsmOperation.getJavaMethodName();
             Method javaMethod = lookupJavaMethod(serviceClass, javaMethodName, wsmParameters);
             axisOperationDesc.setMethod(javaMethod);
-            */
 
             /*
             Configure method parameters.  This uses a combination of the metadata processed from the
@@ -237,13 +224,12 @@
             for(int j = 0; j < wsmParameters.size(); j++) {
                 WsmParameter wsmParameterDesc = (WsmParameter)wsmParameters.get(j);
 
-                // new
-                //ParameterDesc axisParameterDesc = new ParameterDesc();
-
-                // old
+                /* todo: document the side-effect here */
                 ParameterDesc axisParameterDesc = axisOperationDesc.getParameter(j);
+                assert axisParameterDesc != null;
 
                 final Class paramType = createClass(wsmParameterDesc.getJavaType());
+                assert paramType != null;
 
                 if(axisParameterDesc.getTypeQName() == null) {
                     /* set the typeQName if it is not set already */
@@ -293,9 +279,6 @@
                 if (wsmServiceDesc.getSoapBinding().getStyle() == SOAPBinding.Style.RPC && paramType.isArray()) {
                     axisParameterDesc.setItemQName(new QName("", "item"));
                 }
-
-                // new
-                //axisOperationDesc.addParameter(axisParameterDesc);
             }
 
             /*
@@ -371,13 +354,14 @@
                 Class parameterTypes[] = new Class[wsmParameters.size()];
                 for(int i = 0; i < wsmParameters.size(); i++) {
                     WsmParameter wsmParameter = (WsmParameter)wsmParameters.get(i);
+
                     /*
                     Ensure that the parameter types exist
                     */
                     try {
-                        parameterTypes[i] = Class.forName(wsmParameter.getJavaType());
+                        parameterTypes[i] = JavaClassUtils.convertToClass(wsmParameter.getJavaType());
                     }
-                    catch(ClassNotFoundException e) {
+                    catch(RuntimeException re) {
                         throw new ConfigurationException("Unable to load parameter type \"" +
                             wsmParameter.getJavaType() + "\" for method \"" + methodName + "\"");
                     }
@@ -399,7 +383,7 @@
      Method used to discover an Axis OperationDesc object given a WSM representation of a web service method.
      This uses a best-guess matching algorithm that matches the method parameter types.
      */
-    private OperationDesc getOperationDesc(ServiceDesc serviceDescription, WsmOperation methodMetadata) {
+    private OperationDesc lookupOperation(ServiceDesc serviceDescription, WsmOperation methodMetadata) {
         assert serviceDescription != null;
         assert methodMetadata != null;
 

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java Tue Feb 21 06:21:34 2006
@@ -40,10 +40,10 @@
 import org.apache.axis.providers.java.RPCProvider;
 import org.apache.axis.utils.ClassUtils;
 import org.apache.beehive.wsm.axis.ServiceDescriptionFactory;
+import org.apache.beehive.wsm.axis.util.WsmServiceFactory;
 import org.apache.beehive.wsm.axis.controls.ControlProvider;
 import org.apache.beehive.wsm.model.WsmSoapMessageHandler;
 import org.apache.beehive.wsm.model.WsmService;
-import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 import org.apache.beehive.wsm.exception.InvalidTypeMappingException;
 import org.apache.beehive.wsm.util.WsmddUtils;
 import org.apache.commons.logging.Log;
@@ -55,7 +55,7 @@
 public class AnnotatedWebServiceDeploymentHandler
     extends BasicHandler {
 
-    private static final Log LOGGER = LogFactory.getLog(AnnotatedWebServiceDeploymentHandler.class);
+    private static final Log LOG = LogFactory.getLog(AnnotatedWebServiceDeploymentHandler.class);
     private static final String JWS_EXTENSION = ".jws";
 
     private Map<String, SOAPService> _soapServices = new HashMap<String, SOAPService>();
@@ -104,34 +104,10 @@
 
         SOAPService axisService = _soapServices.get(clazz.getName());
         if(axisService == null) {
+            String wsmddName = clazz.getName().replace('.', '/') + ".xml";
+            LOG.info("load WsmService using path: " + wsmddName);
 
-            /*
-            InputStream inputStream = null;
-            */
-            WsmService wsmService = null;
-            try {
-                wsmService = Jsr181ObjectModelStore.load(clazz);
-/*
-                String wsmddName = clazz.getName().replace('.', '/') + ".xml";
-                System.out.println("load WsmService using path: " + wsmddName);
-
-                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-                inputStream = classLoader.getResourceAsStream(wsmddName);
-
-                wsmService = WsmddUtils.read(inputStream);
-*/
-            }
-            catch (Exception e) {
-                throw new IllegalStateException("Unable to load metadata for service \"" +
-                    clazz.getName() + "\".  Cause: " + e, e);
-            }
-/*
-            finally {
-                if(inputStream != null)
-                    try{inputStream.close();}catch(IOException ignore) {}
-            }
-*/
-
+            WsmService wsmService = WsmServiceFactory.getInstance().load(wsmddName);
             axisService = createSOAPService(wsmService, clazz);
         }
         assert axisService != null;
@@ -170,6 +146,12 @@
             throw new IllegalStateException("Unable to create service description for web service in class \""
                 + wsmService.getServiceClassName() + "\".  Cause: " + e, e);
         }
+        catch(Exception e) {
+            String message = "Unable to create service description for web service in class \""
+            + wsmService.getServiceClassName() + "\".  An unexpected exception occurred.  Cause: " + e;
+            LOG.error(message, e);
+            throw new IllegalStateException(message, e);
+        }
 
         axisSoapService.setServiceDescription(axisServiceDesc);
 
@@ -245,7 +227,7 @@
             className = relativePath.substring(1, relativePath.length() - JWS_EXTENSION.length()).replaceAll("/", ".");
         else className = relativePath.substring(1, relativePath.length()).replaceAll("/", ".");
 
-        LOGGER.debug("attempt to load web service class: " + className);
+        LOG.debug("attempt to load web service class: " + className);
 
         try {
             return Thread.currentThread().getContextClassLoader().loadClass(className);

Added: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/WsmServiceFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/WsmServiceFactory.java?rev=379459&view=auto
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/WsmServiceFactory.java (added)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/WsmServiceFactory.java Tue Feb 21 06:21:34 2006
@@ -0,0 +1,42 @@
+package org.apache.beehive.wsm.axis.util;
+
+import java.io.InputStream;
+import java.io.IOException;
+
+import org.apache.beehive.wsm.model.WsmService;
+import org.apache.beehive.wsm.util.WsmddUtils;
+
+/**
+ * Factory used to create {@link WsmService} objects.  This factory canb be used to plug-in
+ * implementations that can convert a path to a service description into a {@link WsmService}
+ * object model. 
+ */
+public class WsmServiceFactory {
+
+    public static WsmServiceFactory getInstance() {
+        return new WsmServiceFactory();
+    }
+
+    public WsmService load(String serviceDescriptionLocation) {
+        WsmService wsmService = null;
+
+        InputStream inputStream = null;
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+        try {
+            inputStream = classLoader.getResourceAsStream(serviceDescriptionLocation);
+
+            wsmService = WsmddUtils.read(inputStream);
+        }
+        catch (Exception e) {
+            throw new IllegalStateException("Unable to load metadata for service \"" +
+                serviceDescriptionLocation + "\".  Cause: " + e, e);
+        }
+        finally {
+            if(inputStream != null)
+                try{inputStream.close();}catch(IOException ignore) {}
+        }
+
+        return wsmService;
+    }
+}

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/WsmService.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/WsmService.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/WsmService.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/WsmService.java Tue Feb 21 06:21:34 2006
@@ -30,6 +30,7 @@
 public class WsmService
     implements java.io.Serializable {
 
+    private static final String DEFAULT_NAMESPACE = "";
     private static final WsmSoapBinding DEFAULT_SOAP_BINDING;
 
     static {
@@ -74,7 +75,7 @@
     }
 
     public String getTargetNamespace() {
-        return _targetNamespace;
+        return _targetNamespace != null ? _targetNamespace : DEFAULT_NAMESPACE;
     }
 
     public void setTargetNamespace(String targetNamespace) {

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java Tue Feb 21 06:21:34 2006
@@ -27,7 +27,6 @@
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 import com.sun.mirror.apt.Filer;
 import org.apache.beehive.wsm.model.WsmService;
-import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 import org.apache.beehive.wsm.processor.model.factory.WsmServiceStyleFactory;
 import org.apache.beehive.wsm.processor.model.factory.WsmServiceFactory;
 import org.apache.beehive.wsm.processor.model.factory.TypeResolver;
@@ -59,16 +58,19 @@
                                                typeResolver,
                                                position.file().getParent());
 
-        /* todo: delete this... */
-        Jsr181ObjectModelStore.store(env, wsmService);
-
         String implementationClass = wsmService.getServiceClassName();
+        String packageName = "";
+        String fileName = null;
         int lastDot = implementationClass.lastIndexOf(".");
-        if(lastDot == -1)
-            lastDot = 0;
-
-        String packageName = implementationClass.substring(0, lastDot);
-        String fileName = implementationClass.substring(lastDot+1, implementationClass.length()) + ".xml";
+        if(lastDot == -1) {
+            packageName = "";
+            fileName = implementationClass + ".xml";
+        }
+        else {
+            assert lastDot > 0;
+            packageName = implementationClass.substring(0, lastDot);
+            fileName = implementationClass.substring(lastDot+1, implementationClass.length()) + ".xml";
+        }
 
         PrintWriter printWriter = null;
         try {

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/DomUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/DomUtils.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/DomUtils.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/DomUtils.java Tue Feb 21 06:21:34 2006
@@ -19,6 +19,7 @@
 
 import java.util.List;
 import java.util.ArrayList;
+import java.util.LinkedList;
 
 import org.w3c.dom.Node;
 import org.w3c.dom.Element;
@@ -72,15 +73,34 @@
     }
 
     public static List getChildElementsByName(Element parent, String namespace, String localName) {
+        assert localName != null;
+        assert parent != null;
+
+        NodeList children = parent.getChildNodes();
+
+        LinkedList elements = new LinkedList();
+        for(int i = 0; i < children.getLength(); i++) {
+            Node node = children.item(i);
+            if(node.getNodeType() == Node.ELEMENT_NODE &&
+                (namespace == null || namespace.equals(node.getNamespaceURI())) &&
+                localName.equals(node.getNodeName()))
+                elements.add(node);
+        }
+        return elements;
+
+/*
         NodeList children =
             (namespace != null ? parent.getElementsByTagNameNS(namespace, localName) : parent.getElementsByTagName(localName));
 
         ArrayList elements = new ArrayList(children.getLength());
-        for(int i = 0; i < children.getLength(); i++)
-            if(children.item(i).getNodeType() == Node.ELEMENT_NODE)
+        for(int i = 0; i < children.getLength(); i++) {
+            Node node = children.item(i);
+            if(node.getNodeType() == Node.ELEMENT_NODE && node.getLocalName().equals(localName))
                 elements.add((Element)children.item(i));
+        }
 
         return elements;
+*/
     }
 
     /**

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/WsmddUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/WsmddUtils.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/WsmddUtils.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/WsmddUtils.java Tue Feb 21 06:21:34 2006
@@ -23,7 +23,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.HashMap;
-import java.util.LinkedList;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.DocumentBuilder;
@@ -203,26 +202,26 @@
         assert document != null;
 
         WsmService wsmService = new WsmService();
-        Element rootElement = DomUtils.getChildElementByName(document.getDocumentElement(), "service");
+        Element serviceElement = DomUtils.getChildElementByName(document.getDocumentElement(), "service");
 
         /* WsmService */
-        wsmService.setName(DomUtils.getChildElementText(rootElement, "name"));
-        wsmService.setServiceName(DomUtils.getChildElementText(rootElement, "servicename"));
-        wsmService.setPortName(DomUtils.getChildElementText(rootElement, "portname"));
-        wsmService.setTargetNamespace(DomUtils.getChildElementText(rootElement, "targetnamespace"));
-        wsmService.setServiceClassName(DomUtils.getChildElementText(rootElement, "classname"));
+        wsmService.setName(DomUtils.getChildElementText(serviceElement, "name"));
+        wsmService.setServiceName(DomUtils.getChildElementText(serviceElement, "servicename"));
+        wsmService.setPortName(DomUtils.getChildElementText(serviceElement, "portname"));
+        wsmService.setTargetNamespace(DomUtils.getChildElementText(serviceElement, "targetnamespace"));
+        wsmService.setServiceClassName(DomUtils.getChildElementText(serviceElement, "classname"));
 
         /* WsmSoapBinding */
         WsmSoapBinding wsmSoapBinding = new WsmSoapBinding();
         wsmService.setSoapBinding(wsmSoapBinding);
 
-        Element soapBindingElement = DomUtils.getChildElementByName(rootElement, "soapbinding");
+        Element soapBindingElement = DomUtils.getChildElementByName(serviceElement, "soapbinding");
         wsmSoapBinding.setStyle(stringToStyle(DomUtils.getChildElementText(soapBindingElement, "style")));
         wsmSoapBinding.setUse(stringToUse(DomUtils.getChildElementText(soapBindingElement, "use")));
         wsmSoapBinding.setParameterStyle(stringToParameterStyle(DomUtils.getChildElementText(soapBindingElement, "parameterstyle")));
 
         /* WsmOperation */
-        Element operationsElement = DomUtils.getChildElementByName(rootElement, "operations");
+        Element operationsElement = DomUtils.getChildElementByName(serviceElement, "operations");
         NodeList operationsList = operationsElement.getElementsByTagName("operation");
         for (int i = 0; i < operationsList.getLength(); i++) {
             Element operationElement = (Element)operationsList.item(i);

Modified: beehive/trunk/wsm/test/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/build.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/build.xml (original)
+++ beehive/trunk/wsm/test/build.xml Tue Feb 21 06:21:34 2006
@@ -40,7 +40,7 @@
 
     <property name="webapp.dir" location="webapp/build"/>
 
-    <property name="axis.lib.dir" location="../external/axis-1.2"/>
+    <property name="axis.lib.dir" location="../external/axis-1.3"/>
     <property name="drt.wsdl.file" location="${junit.src}/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl"/>
 
     <property name="server.root.url" value="http://localhost:8080"/>

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java Tue Feb 21 06:21:34 2006
@@ -1,9 +1,7 @@
 /*
- * AxisHookTest.java
- * 
  * Copyright 2001-2004 The Apache Software Foundation.
  * 
- * 
+ *
  * Licensed 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
@@ -121,6 +119,7 @@
 
         ParameterDesc param = oneWayOp.getParameter(0);
         assertNotNull(param);
+
         System.out.println("eko: " + param.getName());
         assertEquals(WM_ONEWAYPARAM, param.getName());
         assertEquals(Boolean.class, param.getJavaType());
@@ -148,6 +147,7 @@
         wsmm.setOperationName(WM_ONEWAY + WM_OPERATION);
         wsmm.setAction(WM_ONEWAY + WM_ACTION);
         wsmm.setOneWay(true);
+
         WsmParameter wspm = new WsmParameter();
         wspm.setName(WM_ONEWAYPARAM);
         wspm.setMode(WebParam.Mode.IN);
@@ -164,6 +164,7 @@
         wsmm.setAction(WM_ACTION);
         wsmm.setName(WM_RESULT);
         wsmm.setOneWay(false);
+
         WsmParameter wspm = new WsmParameter();
         wspm.setName(WM_TWOWAYPARAM);
         wspm.setMode(WebParam.Mode.INOUT);
@@ -180,6 +181,7 @@
         wsmm.setAction(WM_EXCEPTION + WM_ACTION);
         wsmm.setName(WM_RESULT);
         wsmm.setOneWay(false);
+
         WsmParameter wspm = new WsmParameter();
         wspm.setName(WM_TWOWAYPARAM);
         wspm.setMode(WebParam.Mode.INOUT);

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java Tue Feb 21 06:21:34 2006
@@ -20,7 +20,7 @@
 import org.apache.beehive.wsm.model.WsmService;
 import org.apache.beehive.wsm.model.WsmOperation;
 import org.apache.beehive.wsm.model.WsmParameter;
-import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
+import org.apache.beehive.wsm.axis.util.WsmServiceFactory;
 
 /**
  *
@@ -34,7 +34,9 @@
 
     public void setUp()
         throws Exception {
-        _objectModel = Jsr181ObjectModelStore.load(Class.forName(CLASSNAME));
+
+        String wsmddName = CLASSNAME.replace('.', '/') + ".xml";
+        _objectModel = WsmServiceFactory.getInstance().load(wsmddName);
 
         if (null == _objectModel)
             throw new IllegalStateException("Unable to find WSM object model for service with implementation bean: " + CLASSNAME);

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java Tue Feb 21 06:21:34 2006
@@ -17,10 +17,10 @@
  */
 package org.apache.beehive.wsm.test.jsr181.model;
 
+import org.apache.beehive.wsm.axis.util.WsmServiceFactory;
 import org.apache.beehive.wsm.model.WsmService;
 import org.apache.beehive.wsm.model.WsmOperation;
 import org.apache.beehive.wsm.model.WsmParameter;
-import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 
 /**
  * This class serves as the base class for all TestCases based on ImplementationBeanService.java. It
@@ -39,7 +39,8 @@
     public void setUp()
         throws Exception {
 
-        _objectModel = Jsr181ObjectModelStore.load(Class.forName(CLASSNAME));
+        String wsmddName = CLASSNAME.replace('.', '/') + ".xml";
+        _objectModel = WsmServiceFactory.getInstance().load(wsmddName);
         if (null == _objectModel)
             throw new IllegalStateException("Unable to find WSM object model for service with implementation bean: " + CLASSNAME);
     }

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java Tue Feb 21 06:21:34 2006
@@ -21,10 +21,10 @@
 import java.util.Iterator;
 
 import junit.framework.TestCase;
+import org.apache.beehive.wsm.axis.util.WsmServiceFactory;
 import org.apache.beehive.wsm.model.WsmOperation;
 import org.apache.beehive.wsm.model.WsmParameter;
 import org.apache.beehive.wsm.model.WsmService;
-import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 import org.apache.beehive.wsm.wsdl.Utilities;
 import org.apache.beehive.webservice.utils.databinding.BindingLookupStrategy;
@@ -43,8 +43,8 @@
     public void setUp()
         throws Exception {
 
-        Class clazz = Class.forName(CLASSNAME);
-        _serverModel = Jsr181ObjectModelStore.load(clazz);
+        String wsmddName = CLASSNAME.replace('.', '/') + ".xml";
+        _serverModel = WsmServiceFactory.getInstance().load(wsmddName);
 
         InputStream is = null;
         try {

Modified: beehive/trunk/wsm/test/webapp/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/build.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/build.xml (original)
+++ beehive/trunk/wsm/test/webapp/build.xml Tue Feb 21 06:21:34 2006
@@ -57,6 +57,11 @@
                            destdir="${classes.dir}"
                            tempdir="${build.dir}/WEB-INF/.tmpbeansrc"
                            classpathref="drt.classpath"/>
+
+        <copy todir="${build.dir}/WEB-INF/classes">
+            <fileset dir="${src.dir}" includes="*.xml"/>
+        </copy>
+
     </target>
 
     <target name="clean">

Modified: beehive/trunk/wsm/test/webapp/src/log4j.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/src/log4j.xml?rev=379459&r1=379458&r2=379459&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/src/log4j.xml (original)
+++ beehive/trunk/wsm/test/webapp/src/log4j.xml Tue Feb 21 06:21:34 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 
-<configuration xmlns="http://jakarta.apache.org/log4j/">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 
   <appender name="LOGFILE" class="org.apache.log4j.ConsoleAppender">
     <param name="Append" value="true"/>
@@ -21,4 +21,4 @@
     <appender-ref ref="LOGFILE"/>
   </category>
 
-</configuration>
+</log4j:configuration>