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 2005/12/20 18:30:34 UTC

svn commit: r358046 - in /beehive/trunk: system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/ wsm/ wsm/src/axis/MET...

Author: ekoneil
Date: Tue Dec 20 09:30:10 2005
New Revision: 358046

URL: http://svn.apache.org/viewcvs?rev=358046&view=rev
Log:
Type mapping work -- this is now completely decoupled from Axis, which allows for adding additional JAX-RPC implementations.

- add a BindingLookupFactory that uses commons-discovery to find implementations.  
- add a BindingLookupChain that allows chaining together strategies for looking up QName <> Class mappings

BB: self
DRT: WSM && WSC pass


Added:
    beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupFactory
      - copied, changed from r358023, beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupStrategy
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java   (contents, props changed)
      - copied, changed from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupChain.java
      - copied, changed from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java   (contents, props changed)
      - copied, changed from r358023, beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupServiceFactory.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java   (with props)
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Wsdl2AJava.java
      - copied, changed from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/Wsdl2AJava.java
Removed:
    beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupStrategy
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/Wsdl2AJava.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupServiceFactory.java
Modified:
    beehive/trunk/system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ServiceControlGenerator.java
    beehive/trunk/system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/AxisCall.java
    beehive/trunk/wsm/build.xml
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ServiceDescriptionFactory.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Model2AJava.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java

Modified: beehive/trunk/system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ServiceControlGenerator.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ServiceControlGenerator.java?rev=358046&r1=358045&r2=358046&view=diff
==============================================================================
--- beehive/trunk/system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ServiceControlGenerator.java (original)
+++ beehive/trunk/system-controls/src/webservice/control/org/apache/beehive/controls/system/webservice/generator/ServiceControlGenerator.java Tue Dec 20 09:30:10 2005
@@ -30,7 +30,7 @@
 import org.apache.beehive.controls.system.webservice.wsdl.WsdlOpParameter;
 import org.apache.beehive.controls.system.webservice.wsdl.WsdlOpReturnType;
 import org.apache.beehive.controls.system.webservice.wsdl.WsdlOperation;
-import org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy;
+import org.apache.beehive.wsm.axis.databinding.AxisBindingLookupFactory;
 import org.apache.beehive.wsm.util.JavaClassUtils;
 import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
 import org.apache.velocity.Template;
@@ -46,6 +46,11 @@
  */
 public final class ServiceControlGenerator {
 
+    /*
+    todo: it seems bad that the service control needs explicit knowledge of
+          the type system used to implement the web service.  Probably need to
+          fix this.
+    */
     private static final FileFilter FILE_FILTER_WSDL = new WSDLFilter();
     private static final String WSDL_FILE_EXTENSION = "wsdl";
     private static final String SERVICE_CONTROL_FILE_EXTENSION = ".java";
@@ -248,7 +253,7 @@
             return void.class;
         }
 
-        BindingLookupStrategy bindingLookupStrategy = TypeSystemLookupStrategy.getInstance();
+        BindingLookupStrategy bindingLookupStrategy = (new AxisBindingLookupFactory()).getInstance();
         if (!isArray) {
             return bindingLookupStrategy.qname2class(xmlType);
         }

Modified: beehive/trunk/system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/AxisCall.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/AxisCall.java?rev=358046&r1=358045&r2=358046&view=diff
==============================================================================
--- beehive/trunk/system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/AxisCall.java (original)
+++ beehive/trunk/system-controls/src/webservice/jaxrpc-clients/axis/org/apache/beehive/controls/system/jaxrpc/AxisCall.java Tue Dec 20 09:30:10 2005
@@ -29,7 +29,7 @@
 import org.apache.beehive.controls.system.webservice.wsdl.WsdlOpParameter;
 import org.apache.beehive.controls.system.webservice.wsdl.WsdlOperation;
 import org.apache.beehive.controls.system.webservice.jaxrpc.GenericCall;
-import org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy;
+import org.apache.beehive.wsm.axis.databinding.AxisBindingLookupFactory;
 import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
 
 /**
@@ -49,7 +49,7 @@
     public AxisCall(Service service)
         throws ServiceException {
         TypeMapping typeMapping = service.getTypeMappingRegistry().getDefaultTypeMapping();
-        BindingLookupStrategy bindingLookupStrategy = TypeSystemLookupStrategy.getInstance();
+        BindingLookupStrategy bindingLookupStrategy = createAxisBindingLookupStrategy();
 
         _call = service.createCall();
         _typeRegistrar = new AxisTypeRegistrar(typeMapping, bindingLookupStrategy);
@@ -72,7 +72,7 @@
                             WsdlOperation.SOAPBindingStyle style,
                             WsdlOperation.SOAPBindingUse use) {
 
-        BindingLookupStrategy bindingLookupStrategy = TypeSystemLookupStrategy.getInstance();
+        BindingLookupStrategy bindingLookupStrategy = createAxisBindingLookupStrategy();
         Class javaType = bindingLookupStrategy.qname2class(xmlType);
 
         QName registeredTypeQName = registerType(javaType, xmlType, style, use);
@@ -161,5 +161,9 @@
      */
     protected void setServicePortName(QName portQName) {
         _call.setProperty(org.apache.axis.client.Call.WSDL_PORT_NAME, portQName);
+    }
+
+    private BindingLookupStrategy createAxisBindingLookupStrategy() {
+        return (new AxisBindingLookupFactory()).getInstance();
     }
 }

Modified: beehive/trunk/wsm/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/build.xml?rev=358046&r1=358045&r2=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/build.xml (original)
+++ beehive/trunk/wsm/build.xml Tue Dec 20 09:30:10 2005
@@ -48,11 +48,11 @@
         <path refid="velocity.dependency.path"/>
         <path refid="commons-logging.dependency.path"/>
         <path refid="xbean.dependency.path"/>
-        <path refid="junit.dependency.path"/>
         <path refid="tools.dependency.path"/>
         <path refid="ant-jar.dependency.path"/>
         <path refid="servlet.dependency.path"/>
         <path refid="commons-codec.dependency.path"/>
+        <path refid="commons-discovery.dependency.path"/>
         <pathelement location="${api.classes}"/>
         <pathelement location="${jars.dir}/beehive-wsdltypes.jar"/>
         <pathelement location="${jsr181.jar}"/>
@@ -181,6 +181,10 @@
         <javac destdir="${axis.classes}" classpathref="axis.classpath" debug="on">
             <src path="${axis.dir}"/>
         </javac>
+
+        <copy todir="${axis.classes}" overwrite="true">
+            <fileset dir="${axis.dir}" includes="META-INF/**"/>
+        </copy>
 
         <jar jarfile="${wsm-axis.jar}">
             <fileset dir="${axis.classes}"/>

Copied: beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupFactory (from r358023, beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupStrategy)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupFactory?p2=beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupFactory&p1=beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupStrategy&r1=358023&r2=358046&rev=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupStrategy (original)
+++ beehive/trunk/wsm/src/axis/META-INF/services/org.apache.beehive.wsm.databinding.BindingLookupFactory Tue Dec 20 09:30:10 2005
@@ -1 +1 @@
-org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy
\ No newline at end of file
+org.apache.beehive.wsm.axis.databinding.AxisBindingLookupFactory
\ No newline at end of file

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=358046&r1=358045&r2=358046&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 Dec 20 09:30:10 2005
@@ -52,7 +52,7 @@
 import org.apache.axis.utils.BeanPropertyDescriptor;
 import org.apache.axis.utils.BeanUtils;
 import org.apache.axis.Constants;
-import org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy;
+import org.apache.beehive.wsm.axis.databinding.AxisBindingLookupFactory;
 import org.apache.beehive.wsm.axis.registration.AxisTypeMappingMetaData;
 import org.apache.beehive.wsm.axis.util.encoding.XmlBeanDeserializerFactory;
 import org.apache.beehive.wsm.axis.util.encoding.XmlBeanSerializerFactory;
@@ -387,7 +387,7 @@
         /* the type needs to be registered */
         TypeMapping tm = desc.getTypeMapping();
 
-        BindingLookupStrategy lookupStrategy = TypeSystemLookupStrategy.getInstance();
+        BindingLookupStrategy lookupStrategy = new AxisBindingLookupFactory().getInstance();
         QName qname = lookupStrategy.class2qname(type, defaultNamespace);
 
         if(type.isArray()) {

Copied: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java (from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java?p2=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java&p1=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java&r1=358023&r2=358046&rev=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java Tue Dec 20 09:30:10 2005
@@ -19,59 +19,18 @@
  */
 package org.apache.beehive.wsm.axis.databinding;
 
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-
 import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
+import org.apache.beehive.wsm.databinding.BindingLookupChain;
+import org.apache.beehive.wsm.databinding.BindingLookupFactory;
 import org.apache.beehive.wsm.databinding.xmlbeans.XmlBeanLookupStrategy;
 
-public class TypeSystemLookupStrategy
-    implements BindingLookupStrategy {
-
-    private ArrayList<BindingLookupStrategy> _lookupServiceList = new ArrayList<BindingLookupStrategy>();
-
-    public static BindingLookupStrategy getInstance() {
-        TypeSystemLookupStrategy ts = new TypeSystemLookupStrategy();
-        ts.addBindingLookupService(new XmlBeanLookupStrategy());
-        ts.addBindingLookupService(new AxisLookupStrategy());
-        return ts;
-    }
-
-    private TypeSystemLookupStrategy() {
-    }
-
-    public void addBindingLookupService(BindingLookupStrategy bindingLookupStrategy) {
-        _lookupServiceList.add(bindingLookupStrategy);
-    }
-
-    public void removeBindingLookupService(BindingLookupStrategy bindingLookupStrategy) {
-        _lookupServiceList.remove(bindingLookupStrategy);
-    }
-
-    public QName class2qname(Class clazz) {
-        for(BindingLookupStrategy lookUpStrategy : _lookupServiceList) {
-            QName qname = lookUpStrategy.class2qname(clazz);
-            if(qname != null)
-                return qname;
-        }
-        return null;
-    }
-
-    public QName class2qname(Class clazz, String namespace) {
-        for(BindingLookupStrategy lookUpStrategy : _lookupServiceList) {
-            QName qname = lookUpStrategy.class2qname(clazz, namespace);
-            if(qname != null)
-                return qname;
-        }
-        return null;
-    }
+public class AxisBindingLookupFactory
+    extends BindingLookupFactory {
 
-    public Class qname2class(QName qname) {
-        for(BindingLookupStrategy lookUpStrategy : _lookupServiceList) {
-            Class clazz = lookUpStrategy.qname2class(qname);
-            if(clazz != null)
-                return clazz;
-        }
-        return Object.class;
+    public BindingLookupStrategy getInstance() {
+        BindingLookupChain chain = new BindingLookupChain();
+        chain.addBindingLookupService(new XmlBeanLookupStrategy());
+        chain.addBindingLookupService(new AxisLookupStrategy());
+        return chain;
     }
-}
+}
\ No newline at end of file

Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisBindingLookupFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupChain.java (from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupChain.java?p2=beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupChain.java&p1=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java&r1=358023&r2=358046&rev=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/TypeSystemLookupStrategy.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupChain.java Tue Dec 20 09:30:10 2005
@@ -17,34 +17,44 @@
  * 
  * 
  */
-package org.apache.beehive.wsm.axis.databinding;
+package org.apache.beehive.wsm.databinding;
 
 import java.util.ArrayList;
 import javax.xml.namespace.QName;
 
 import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
 import org.apache.beehive.wsm.databinding.xmlbeans.XmlBeanLookupStrategy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
-public class TypeSystemLookupStrategy
+/**
+ * Implementation of the {@link BindingLookupStrategy} class that chains together some number of
+ * {@link BindingLookupStrategy} implementations.  This list should be managed using the add / remove methods.
+ */
+public final class BindingLookupChain
     implements BindingLookupStrategy {
 
-    private ArrayList<BindingLookupStrategy> _lookupServiceList = new ArrayList<BindingLookupStrategy>();
+    private static final Log LOG = LogFactory.getLog(BindingLookupChain.class);
 
-    public static BindingLookupStrategy getInstance() {
-        TypeSystemLookupStrategy ts = new TypeSystemLookupStrategy();
-        ts.addBindingLookupService(new XmlBeanLookupStrategy());
-        ts.addBindingLookupService(new AxisLookupStrategy());
-        return ts;
-    }
+    private ArrayList<BindingLookupStrategy> _lookupServiceList = new ArrayList<BindingLookupStrategy>();
 
-    private TypeSystemLookupStrategy() {
+    public BindingLookupChain() {
     }
 
     public void addBindingLookupService(BindingLookupStrategy bindingLookupStrategy) {
+        if(bindingLookupStrategy == null)
+            return;
+
+        LOG.debug("Add binding lookup strategy: " + bindingLookupStrategy.getClass());
         _lookupServiceList.add(bindingLookupStrategy);
     }
 
     public void removeBindingLookupService(BindingLookupStrategy bindingLookupStrategy) {
+        if(bindingLookupStrategy == null)
+            return;
+
+        LOG.debug("Remove binding lookup strategy: " + bindingLookupStrategy.getClass());
+
         _lookupServiceList.remove(bindingLookupStrategy);
     }
 

Copied: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java (from r358023, beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupServiceFactory.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java?p2=beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java&p1=beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupServiceFactory.java&r1=358023&r2=358046&rev=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupServiceFactory.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java Tue Dec 20 09:30:10 2005
@@ -18,12 +18,53 @@
 package org.apache.beehive.wsm.databinding;
 
 import org.apache.beehive.wsm.util.SchemaTypesLookupStrategy;
+import org.apache.beehive.wsm.exception.BindingConfigurationException;
+import org.apache.commons.discovery.tools.DiscoverClass;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  *
  */
-public class BindingLookupServiceFactory {
-    public static BindingLookupStrategy builtInTypes() {
-        return new SchemaTypesLookupStrategy();
+public class BindingLookupFactory {
+
+    private static final Log LOG = LogFactory.getLog(BindingLookupFactory.class);
+    private static final BindingLookupStrategy DEFAULT_STRATEGY = new SchemaTypesLookupStrategy();
+
+    public BindingLookupStrategy builtInTypes() {
+        return DEFAULT_STRATEGY;
+    }
+
+    public BindingLookupStrategy getInstance() {
+
+        DiscoverClass discoverClass = new DiscoverClass();
+        Class factoryClass = discoverClass.find(BindingLookupFactory.class);
+        BindingLookupStrategy strategy = null;
+
+        if(factoryClass != null)
+            strategy = createStrategy(factoryClass);
+        else strategy = DEFAULT_STRATEGY;
+
+        assert strategy != null;
+        LOG.debug("Using binding lookup strategy: " + strategy.getClass().getName());
+
+        return strategy;
+    }
+
+    private BindingLookupStrategy createStrategy(Class bindingLokupFactory) {
+        assert bindingLokupFactory != null;
+
+        BindingLookupStrategy strategy = null;
+        try {
+            BindingLookupFactory factory = (BindingLookupFactory)bindingLokupFactory.newInstance();
+            strategy = factory.getInstance();
+        }
+        catch (IllegalAccessException e) {
+            throw new BindingConfigurationException("Unable to create binding lookup from factory \"" + bindingLokupFactory + "\".  Cause: " + e, e);
+        }
+        catch (InstantiationException e) {
+            throw new BindingConfigurationException("Unable to create binding lookup from factory \"" + bindingLokupFactory + "\".  Cause: " + e, e);
+        }
+        return strategy;
     }
 }

Propchange: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/databinding/BindingLookupFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java?rev=358046&view=auto
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java (added)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java Tue Dec 20 09:30:10 2005
@@ -0,0 +1,39 @@
+/**
+ Copyright 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
+
+ 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.
+
+ $Header:$
+ */
+package org.apache.beehive.wsm.exception;
+
+/**
+ * Exception thrown when errors occur creating a {@link org.apache.beehive.wsm.databinding.BindingLookupFactory}.
+ */
+public class BindingConfigurationException
+    extends RuntimeException {
+
+    public BindingConfigurationException() {}
+
+    public BindingConfigurationException(String message) {
+        super(message);
+    }
+
+    public BindingConfigurationException(Throwable cause) {
+        super(cause);
+    }
+
+    public BindingConfigurationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Propchange: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/exception/BindingConfigurationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Model2AJava.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Model2AJava.java?rev=358046&r1=358045&r2=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Model2AJava.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Model2AJava.java Tue Dec 20 09:30:10 2005
@@ -63,11 +63,11 @@
         String className = om.getName();
         assert className != null : "Found null class name";
 
-        /* todo: need to pick a better default package name than 'web' -- should this be derived from
-                the targetNamespace by default?  Should the caller be able to provide one?
+        /*
+        todo: need to pick a better default package name than 'web' -- should this be derived from
+              the targetNamespace by default?  Should the caller be able to provide one?
         */
         String packageName = DEFAULT_PACKAGE_NAME;
-        assert packageName != null : "Found null package name";
 
         // doesn't do any thing right now, useful if the target package name had dots
         String packageDirName = packageName.replaceAll("\\.", "/");

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java?rev=358046&r1=358045&r2=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java Tue Dec 20 09:30:10 2005
@@ -23,7 +23,7 @@
 public class WSDL2AJavaTask
     extends Java {
 
-    private static final String WSDL2JAVA_CLASS = "org.apache.beehive.wsm.axis.tools.Wsdl2AJava";
+    private static final String WSDL2JAVA_CLASS = "org.apache.beehive.wsm.tools.wsdl2ajava.Wsdl2AJava";
 
     private File _wsdlFile;
     private File _outputDir;
@@ -48,4 +48,4 @@
             throw new BuildException("Exception occurred generating annotated web service.  Cause: " + e, e);
         }
     }
-}
+}
\ No newline at end of file

Copied: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Wsdl2AJava.java (from r358023, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/Wsdl2AJava.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Wsdl2AJava.java?p2=beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Wsdl2AJava.java&p1=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/Wsdl2AJava.java&r1=358023&r2=358046&rev=358046&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/tools/Wsdl2AJava.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/Wsdl2AJava.java Tue Dec 20 09:30:10 2005
@@ -14,18 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.beehive.wsm.axis.tools;
+package org.apache.beehive.wsm.tools.wsdl2ajava;
 
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 
-import org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy;
+import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
+import org.apache.beehive.wsm.databinding.BindingLookupFactory;
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 import org.apache.beehive.wsm.tools.wsdl2ajava.Model2AJava;
 import org.apache.beehive.wsm.wsdl.Utilities;
-import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
 import org.apache.xmlbeans.XmlException;
 
 public final class Wsdl2AJava {
@@ -44,7 +44,7 @@
         System.out.println("Base source directory: " + args[1]);
         System.out.println("Processing WSDL: " + args[0]);
 
-        BindingLookupStrategy bindingLookupStrategy = TypeSystemLookupStrategy.getInstance();
+        BindingLookupStrategy bindingLookupStrategy = new BindingLookupFactory().getInstance();
         XmlBeanWSDLProcessor processor;
         try {
             processor = new XmlBeanWSDLProcessor(Utilities.parseWSDL(args[0]), bindingLookupStrategy);

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=358046&r1=358045&r2=358046&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 Dec 20 09:30:10 2005
@@ -21,7 +21,6 @@
 import java.util.Iterator;
 
 import junit.framework.TestCase;
-import org.apache.beehive.wsm.axis.databinding.TypeSystemLookupStrategy;
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
@@ -29,6 +28,7 @@
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 import org.apache.beehive.wsm.wsdl.Utilities;
 import org.apache.beehive.wsm.databinding.BindingLookupStrategy;
+import org.apache.beehive.wsm.databinding.BindingLookupFactory;
 
 /**
  */
@@ -48,7 +48,7 @@
         InputStream is = null;
         try {
             is = Thread.currentThread().getContextClassLoader().getResourceAsStream("schemas/starwars.wsdl");
-            BindingLookupStrategy bindingLookupStrategy = TypeSystemLookupStrategy.getInstance();
+            BindingLookupStrategy bindingLookupStrategy = (new BindingLookupFactory()).getInstance();
             XmlBeanWSDLProcessor xbwp = new XmlBeanWSDLProcessor(Utilities.parseWSDL(is), bindingLookupStrategy);
             clientModel = xbwp.getObjectModel();
         }