cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r577033 [1/2] - in /incubator/cxf/tags/cxf-2.0.2-incubator: ./ api/src/main/java/org/apache/cxf/databinding/ common/common/src/main/java/org/apache/cxf/common/util/ rt/core/src/main/java/org/apache/cxf/databinding/source/ rt/core/src/main/j...
Date Tue, 18 Sep 2007 19:51:54 GMT
Author: dkulp
Date: Tue Sep 18 12:51:46 2007
New Revision: 577033

URL: http://svn.apache.org/viewvc?rev=577033&view=rev
Log:
Merged revisions 576672,576674-576710,576712-576775,576777-576788,576790-576791,576793-576831,576833-576941,576943-577003 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r576672 | mmao | 2007-09-17 23:08:17 -0400 (Mon, 17 Sep 2007) | 3 lines
  
  Fix a typo
........
  r576717 | ningjiang | 2007-09-18 02:04:49 -0400 (Tue, 18 Sep 2007) | 1 line
  
  CXF-1029 clean up the ServerFactoryBean's serverBean stuff
........
  r576983 | dkulp | 2007-09-18 13:18:16 -0400 (Tue, 18 Sep 2007) | 2 lines
  
  [CXF-984, CXF-1002, CXF-1025] Patches applied from the various JIRA issues
........
  r577003 | dkulp | 2007-09-18 14:02:45 -0400 (Tue, 18 Sep 2007) | 2 lines
  
  Remove some irrelevant lines. (duplicate if statements)
........

Added:
    incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
      - copied unchanged from r577003, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeMappingRegistry.java
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeMappingRegistry.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/ExplicitPrefixTest.java
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/ExplicitPrefixTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/data/Name.aegis.xml
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/data/Name.aegis.xml
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.aegis.xml
      - copied unchanged from r577003, incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.aegis.xml
Modified:
    incubator/cxf/tags/cxf-2.0.2-incubator/   (props changed)
    incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/DataBinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/model/JavaParameterTest.java
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
    incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl

Propchange: incubator/cxf/tags/cxf-2.0.2-incubator/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Sep 18 12:51:46 2007
@@ -1 +1 @@
-/incubator/cxf/trunk:1-573640,573667-574161,574163-574834,574836-575221,575223-575253,575255-576516,576536-576598,576942
+/incubator/cxf/trunk:1-573640,573667-574161,574163-574834,574836-575221,575223-575253,575255-576516,576536-576598,576672,576674-576710,576712-576775,576777-576788,576790-576791,576793-576831,576833-577003

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/DataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/DataBinding.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/DataBinding.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/api/src/main/java/org/apache/cxf/databinding/DataBinding.java Tue Sep 18 12:51:46 2007
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.databinding;
 
+import java.util.Map;
+
 import org.apache.cxf.service.Service;
 
 public interface DataBinding {
@@ -37,5 +39,12 @@
      * @param service
      */
     void initialize(Service service);
+    
+    /**
+     * Return a set of mappings from namespace to prefix to allow bindings to control
+     * the prefixes.
+     * @return the map, or null if there are none.
+     */
+    Map<String, String> getDeclaredNamespaceMappings();
 
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java Tue Sep 18 12:51:46 2007
@@ -132,7 +132,7 @@
         try {
             // get a parameter reader
             ParamReader pr = new ParamReader(c);
-            // get the paramter names
+            // get the parameter names
             return pr.getParameterNames(method);
         } catch (IOException e) {
             // log it and leave

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java Tue Sep 18 12:51:46 2007
@@ -24,7 +24,6 @@
 
 import org.w3c.dom.Node;
 
-import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.service.Service;
@@ -32,7 +31,7 @@
 /**
  * A simple databinding implementation which reads and writes Source objects.
  */
-public class SourceDataBinding implements DataBinding {
+public class SourceDataBinding extends org.apache.cxf.databinding.AbstractDataBinding {
 
     private XMLStreamDataReader xsrReader;
     private XMLStreamDataWriter xswWriter;

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java Tue Sep 18 12:51:46 2007
@@ -32,7 +32,7 @@
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.AbstractDataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.interceptor.Fault;
@@ -45,7 +45,7 @@
  * A simple databinding implementation which reads and writes Source objects.
  * This will not work with the standard databinding interceptors.
  */
-public class StaxDataBinding implements DataBinding {
+public class StaxDataBinding extends AbstractDataBinding {
 
     private XMLStreamDataReader xsrReader;
     private XMLStreamDataWriter xswWriter;

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java Tue Sep 18 12:51:46 2007
@@ -34,15 +34,18 @@
 import org.w3c.dom.Node;
 
 import org.apache.cxf.aegis.DatabindingException;
+import org.apache.cxf.aegis.type.AbstractTypeCreator.TypeClassInfo;
+import org.apache.cxf.aegis.type.Configuration;
 import org.apache.cxf.aegis.type.DefaultTypeMappingRegistry;
 import org.apache.cxf.aegis.type.Type;
+import org.apache.cxf.aegis.type.TypeCreator;
 import org.apache.cxf.aegis.type.TypeMapping;
 import org.apache.cxf.aegis.type.TypeMappingRegistry;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.type.basic.BeanType;
 import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
-import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.AbstractDataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.frontend.MethodDispatcher;
@@ -71,7 +74,7 @@
  * <p>
  * NOTE: There is an assumed 1:1 mapping between an AegisDatabinding and a Service!
  */
-public class AegisDatabinding implements DataBinding {
+public class AegisDatabinding extends AbstractDataBinding {
     
     public static final String CURRENT_MESSAGE_PART = "currentMessagePart";
     public static final String TYPE_MAPPING_KEY = "type.mapping";
@@ -88,7 +91,9 @@
     private Map<MessagePartInfo, Type> part2Type;
     private List overrideTypes;
     private Service service;
-
+    // allow applications to express an opinion about the namespace prefixes.
+    private Map<String, String> namespaceMap;
+    
     public AegisDatabinding() {
         super();
         this.typeMappingRegistry = new DefaultTypeMappingRegistry(true);
@@ -265,14 +270,29 @@
         }
 
         for (Map.Entry<String, Set<Type>> entry : tns2Type.entrySet()) {
-            Element e = new Element("schema", "xsd", XmlConstants.XSD);
+            String xsdPrefix = XmlConstants.XSD_PREFIX;
+            if (namespaceMap != null && namespaceMap.containsKey(XmlConstants.XSD)) {
+                xsdPrefix = namespaceMap.get(XmlConstants.XSD);
+            }
+            
+            Element e = new Element("schema", xsdPrefix, XmlConstants.XSD);
 
             e.setAttribute(new Attribute(WSDLConstants.ATTR_TNS, entry.getKey()));
-            // Schemas are more readable if there is a specific prefix for the TNS.
-            // note: if aegis ever allows users to ask for a specific prefix in the 
-            // .aegis.xml file, this will need some adjustment in case of conflicts.
-            e.addNamespaceDeclaration(Namespace.getNamespace(WSDLConstants.CONVENTIONAL_TNS_PREFIX, 
-                                                             entry.getKey()));
+            
+            if (null != namespaceMap) { // did application hand us some additional namespaces?
+                for (Map.Entry<String, String> mapping : namespaceMap.entrySet()) {
+                    // user gives us namespace->prefix mapping. 
+                    e.addNamespaceDeclaration(Namespace.getNamespace(mapping.getValue(),
+                                                                     mapping.getKey())); 
+                }
+            }
+
+            // if the user didn't pick something else, assign 'tns' as the prefix.
+            if (namespaceMap == null || !namespaceMap.containsKey(entry.getKey())) {
+                // Schemas are more readable if there is a specific prefix for the TNS.
+                e.addNamespaceDeclaration(Namespace.getNamespace(WSDLConstants.CONVENTIONAL_TNS_PREFIX, 
+                                                                 entry.getKey()));
+            }
             e.setAttribute(new Attribute("elementFormDefault", "qualified"));
             e.setAttribute(new Attribute("attributeFormDefault", "qualified"));
 
@@ -287,11 +307,17 @@
             try {
                 XmlSchemaCollection col = new XmlSchemaCollection();
                 NamespaceMap nsMap = new NamespaceMap();
-                nsMap.add("xsd", "http://www.w3.org/2001/XMLSchema");
                 
+                nsMap.add(xsdPrefix, XmlConstants.XSD);
+                
+                // We prefer explicit prefixes over those generated in the types.
+                // This loop may have intended to support prefixes from individual aegis files,
+                // but that isn't a good idea. 
                 for (Iterator itr = e.getAdditionalNamespaces().iterator(); itr.hasNext();) {
                     Namespace n = (Namespace) itr.next();
-                    nsMap.add(n.getPrefix(), n.getURI());
+                    if (!nsMap.containsValue(n.getURI())) {
+                        nsMap.add(n.getPrefix(), n.getURI());
+                    }
                 }
                 
                 col.setNamespaceContext(nsMap);
@@ -341,7 +367,7 @@
 
         return name;
     }
-
+    
     private Type getParameterType(Service s, TypeMapping tm, MessagePartInfo param, int paramtype) {
         Type type = tm.getType(param.getTypeQName());
 
@@ -354,23 +380,28 @@
         if (paramtype == OUT_PARAM) {
             offset = 1;
         }
+        
+        TypeCreator typeCreator = tm.getTypeCreator();
         if (type == null) {
             OperationInfo op = param.getMessageInfo().getOperation();
 
             Method m = getMethod(s, op);
+            TypeClassInfo info;
             if (paramtype != FAULT_PARAM && m != null) {
-
-                /*
-                 * Note: we are not registering the type here, because it is an
-                 * anonymous type. Potentially there could be many schema types
-                 * with this name. For example, there could be many ns:in0
-                 * paramters.
-                 */
-                type = tm.getTypeCreator().createType(m, param.getIndex() - offset);
+                info = typeCreator.createClassInfo(m, param.getIndex() - offset);
             } else {
-                type = tm.getTypeCreator().createType(param.getTypeClass());
+                info = typeCreator.createBasicClassInfo(param.getTypeClass());
+            }
+            
+            if (info.getMappedName() != null) {
+                param.setConcreteName(info.getMappedName());
+                param.setName(info.getMappedName());
+            }
+            type = typeCreator.createTypeForClass(info);
+            // We have to register the type if we want minOccurs and such to work.
+            if (info.nonDefaultAttributes()) {
+                tm.register(type);
             }
-
             type.setTypeMapping(tm);
 
             part2Type.put(param, type);
@@ -396,5 +427,53 @@
     public Service getService() {
         return service;
     }
-    
+
+    /**
+      * @return Returns the namespaceMap.
+     */
+    public Map<String, String> getNamespaceMap() {
+        return namespaceMap;
+    }
+
+    /**
+     * @param namespaceMap The namespaceMap to set.
+     */
+    public void setNamespaceMap(Map<String, String> namespaceMap) {
+        // make some checks. This is a map from namespace to prefix, but we want unique prefixes.
+        if (namespaceMap != null) {
+            Set<String> prefixesSoFar = new HashSet<String>();
+            for (Map.Entry<String, String> mapping : namespaceMap.entrySet()) {
+                if (prefixesSoFar.contains(mapping.getValue())) {
+                    throw new IllegalArgumentException("Duplicate prefix " + mapping.getValue());
+                }
+            }
+        }
+        this.namespaceMap = namespaceMap;
+    }
+
+    /** 
+     * Provide explicit mappings to ReflectionServiceFactory.
+     * {@inheritDoc}
+     * */
+    @Override
+    public Map<String, String> getDeclaredNamespaceMappings() {
+        return this.namespaceMap;
+    }
+
+    /** 
+     * Return the type mapping configuration associated with this databinding object.
+     * The configuration is retrieved from the type mapping registry.
+     * @return Returns the configuration.
+     */
+    public Configuration getConfiguration() {
+        return typeMappingRegistry.getConfiguration();
+    }
+
+    /**
+     * Set the configuration for this databinding object.
+     * @param configuration The configuration to set.
+     */
+    public void setConfiguration(Configuration configuration) {
+        typeMappingRegistry.setConfiguration(configuration);
+    }
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java Tue Sep 18 12:51:46 2007
@@ -96,7 +96,7 @@
         return info;
     }
 
-    protected Type createTypeForClass(TypeClassInfo info) {
+    public Type createTypeForClass(TypeClassInfo info) {
         Class javaType = info.getTypeClass();
         Type result = null;
         boolean newType = true;
@@ -306,6 +306,19 @@
         String first = type.getSchemaType().getLocalPart().substring(0, 1);
         String last = type.getSchemaType().getLocalPart().substring(1);
         String localName = "ArrayOf" + first.toUpperCase() + last;
+        if (info.nonDefaultAttributes()) {
+            localName += "-";
+            if (info.getMaxOccurs() >= 0) {
+                localName += info.maxOccurs;
+            }
+            localName += "-";
+            if (info.getMinOccurs() >= 0) {
+                localName += info.minOccurs;
+            }
+            if (info.isFlat()) {
+                localName += "Flat";
+            }
+        }
 
         return new QName(ns, localName);
     }
@@ -368,6 +381,9 @@
         this.typeConfiguration = tpConfiguration;
     }
 
+    /**
+     * Object to carry information for a type, such as that from an XML mapping file. 
+     */
     public static class TypeClassInfo {
         Class typeClass;
 
@@ -388,6 +404,10 @@
         long minOccurs = -1;
         long maxOccurs = -1;
         boolean flat;
+        
+        public boolean nonDefaultAttributes() {
+            return minOccurs != -1 || maxOccurs != -1 || flat;
+        }
 
         public String getDescription() {
             return description;
@@ -475,6 +495,11 @@
 
         public void setFlat(boolean flat) {
             this.flat = flat;
+        }
+
+        @Override
+        public String toString() {
+            return "TypeClassInfo " + getDescription();
         }
     }
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java Tue Sep 18 12:51:46 2007
@@ -37,6 +37,7 @@
     @Override
     public TypeClassInfo createClassInfo(Method m, int index) {
         TypeClassInfo info = new TypeClassInfo();
+        info.setDescription("method " + m.getName() + " parameter " + index);
 
         if (index >= 0) {
             info.setTypeClass(m.getParameterTypes()[index]);

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java Tue Sep 18 12:51:46 2007
@@ -78,7 +78,8 @@
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  * @since Feb 22, 2004
  */
-public final class DefaultTypeMappingRegistry implements TypeMappingRegistry {
+public final class DefaultTypeMappingRegistry extends AbstractTypeMappingRegistry 
+    implements TypeMappingRegistry {
     static final QName XSD_STRING = new QName(XmlConstants.XSD, "string", XmlConstants.XSD_PREFIX);
     static final QName XSD_LONG = new QName(XmlConstants.XSD, "long", XmlConstants.XSD_PREFIX);
     static final QName XSD_FLOAT = new QName(XmlConstants.XSD, "float", XmlConstants.XSD_PREFIX);
@@ -133,8 +134,6 @@
 
     private TypeCreator typeCreator;
 
-    private Configuration typeConfiguration;
-
     public DefaultTypeMappingRegistry() {
         this(false);
     }
@@ -147,7 +146,6 @@
         registry = Collections.synchronizedMap(new HashMap<String, TypeMapping>());
 
         this.typeCreator = typeCreator;
-        this.typeConfiguration = new Configuration();
 
         if (createDefault) {
             createDefaultMappings();
@@ -435,13 +433,4 @@
 
         tm.register(class1, name, type);
     }
-
-    public Configuration getConfiguration() {
-        return typeConfiguration;
-    }
-
-    public void setConfiguration(Configuration tpConfiguration) {
-        this.typeConfiguration = tpConfiguration;
-    }
-
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java Tue Sep 18 12:51:46 2007
@@ -24,6 +24,8 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.aegis.type.AbstractTypeCreator.TypeClassInfo;
+
 /**
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  */
@@ -50,4 +52,24 @@
     void setParent(TypeCreator creator);
         
     void setTypeMapping(TypeMapping typeMapping);
+    /** Retrieve the classInfo for a method. Needed to get parameters right. 
+     * 
+     * @param m Method object
+     * @param index index in the parameter list
+     * @return info
+     */
+    TypeClassInfo createClassInfo(Method m, int index); 
+    /**
+     * Retrieve the class info for a class. Needed to get parameters right.
+     * @param itemClass
+     * @return info
+     */
+    TypeClassInfo createBasicClassInfo(Class<?> itemClass);
+    
+    /**
+     * Turn a TypeClassInfo into a type.
+     * @param info
+     * @return
+     */
+    Type createTypeForClass(TypeClassInfo info);
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java Tue Sep 18 12:51:46 2007
@@ -114,4 +114,14 @@
      * TypeMappingRegistry.
      */
     void clear();
+    
+    /**
+     * Set the type configuration for this type mapping registry.
+     * @param configuration
+     */
+    void setConfiguration(Configuration configuration);
+    /**
+     * @return the configuration.
+     */
+    Configuration getConfiguration();
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java Tue Sep 18 12:51:46 2007
@@ -163,6 +163,7 @@
 
         TypeClassInfo info = new TypeClassInfo();
         info.setTypeClass(pd.getReadMethod().getReturnType());
+        info.setDescription("property " + pd);
         readMetadata(info, mapping, propertyEl);
 
         return info;
@@ -293,6 +294,7 @@
 
         // find the elements that apply to the specified method
         TypeClassInfo info = new TypeClassInfo();
+        info.setDescription("method " + m.getName() + " parameter " + index);
         if (index >= 0) {
             if (index >= m.getParameterTypes().length) {
                 throw new DatabindingException("Method " + m 
@@ -430,6 +432,7 @@
             }
 
             TypeClassInfo componentInfo = new TypeClassInfo();
+            componentInfo.setDescription("generic component " + componentInfo.getDescription());
             readMetadata(componentInfo, mapping, propertyEl);
             String className = propertyEl.getAttributeValue("class");
             if (className == null) {

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java Tue Sep 18 12:51:46 2007
@@ -185,7 +185,8 @@
                 tm.register(type);
             }
 
-            String prefix = writer.getPrefixForNamespace(type.getSchemaType().getNamespaceURI());
+            String prefix = writer.getPrefixForNamespace(type.getSchemaType().getNamespaceURI(),
+                                                         type.getSchemaType().getPrefix());
 
             if (null == prefix || prefix.length() == 0) {
                 addXsiType(writer, type.getSchemaType().getLocalPart());

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java Tue Sep 18 12:51:46 2007
@@ -44,6 +44,7 @@
                 info = nextCreator.createClassInfo(m, index);
             } else {
                 info = new TypeClassInfo();
+                info.setDescription("method " + m.getName() + " parameter " + index);
                 info.setGenericType(genericType);
             }
             info.setTypeClass(m.getParameterTypes()[index]);
@@ -66,6 +67,7 @@
                 info = nextCreator.createClassInfo(m, index);
             } else {
                 info = new TypeClassInfo();
+                info.setDescription("method " + m.getName() + " parameter " + index);
                 info.setGenericType(genericReturnType);
             }
             info.setTypeClass(m.getReturnType());

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java Tue Sep 18 12:51:46 2007
@@ -56,7 +56,11 @@
     public static String getUniquePrefix(Element element, String namespaceURI) {
         String prefix = getPrefix(element, namespaceURI);
 
+        // it is OK to have both namespace URI and prefix be empty. 
         if (prefix == null) {
+            if ("".equals(namespaceURI)) {
+                return "";
+            }
             prefix = getUniquePrefix(element);
             element.addNamespaceDeclaration(Namespace.getNamespace(prefix, namespaceURI));
         }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java Tue Sep 18 12:51:46 2007
@@ -20,6 +20,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+
 import javax.wsdl.Definition;
 import javax.wsdl.Import;
 import javax.wsdl.WSDLException;
@@ -110,27 +111,56 @@
     }
     
     public Server createService(Class serviceClass, QName name) {
-        return createService(serviceClass, serviceClass.getSimpleName(), name);
+        return createService(serviceClass, null, name);
+    }
+    
+    public Server createService(Class serviceClass, Object serviceBean, QName name) {
+        return createService(serviceClass, serviceBean, serviceClass.getSimpleName(), name);
+    }
+    
+    protected Server createService(Class serviceClass, QName name, AegisDatabinding binding) {
+        return createService(serviceClass, serviceClass.getSimpleName(), name, binding);
+    }
+
+    protected Server createService(Class serviceClass, 
+                                   String address, QName name, 
+                                    AegisDatabinding binding) {
+        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, name, binding);
+        return sf.create();
     }
     
-    public Server createService(Class serviceClass, 
-                                String address, QName name) {
-        ServerFactoryBean sf = createServiceFactory(serviceClass, address, name);
+    public Server createService(Class serviceClass,
+                                Object serviceBean, 
+                                String address,
+                                QName name) {
+        ServerFactoryBean sf = createServiceFactory(serviceClass, serviceBean, address, name, null);
         return sf.create();
     }
 
-    protected ServerFactoryBean createServiceFactory(Class serviceClass, String address, QName name) {
+    protected ServerFactoryBean createServiceFactory(Class serviceClass, 
+                                                     Object serviceBean, 
+                                                     String address, 
+                                                     QName name,
+                                                     AegisDatabinding binding) {
         ServerFactoryBean sf = new ServerFactoryBean();
         sf.setServiceClass(serviceClass);
+        if (serviceBean != null) {
+            sf.setServiceBean(serviceBean);
+        }    
         sf.getServiceFactory().setServiceName(name);
         sf.setAddress("local://" + address);
-        setupAegis(sf);
+        setupAegis(sf, binding);
         return sf;
     }
-
-    protected void setupAegis(AbstractEndpointFactory sf) {
+    protected void setupAegis(AbstractEndpointFactory sf) { 
+        setupAegis(sf, null);
+    }
+    protected void setupAegis(AbstractEndpointFactory sf, AegisDatabinding binding) {
+        if (binding == null) {
+            binding = new AegisDatabinding();
+        }
         sf.getServiceFactory().getServiceConfigurations().add(0, new AegisServiceConfiguration());
-        sf.getServiceFactory().setDataBinding(new AegisDatabinding());
+        sf.getServiceFactory().setDataBinding(binding);
     }
 
     protected Collection<Document> getWSDLDocuments(String string) throws WSDLException {

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java Tue Sep 18 12:51:46 2007
@@ -30,7 +30,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        Server s = createService(ExceptionService.class, null);
+        Server s = createService(ExceptionService.class, new ExceptionServiceImpl(), null);
         s.getEndpoint().getService().setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
     }
 

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java Tue Sep 18 12:51:46 2007
@@ -63,17 +63,26 @@
         
         client = (WS1) pf.create();
 
-        Server server = createService(WS1.class, "WS1", null);
+        Server server = createService(WS1.class, new WS1Impl(), "WS1", null);
         new LoggingFeature().initialize(server, null);
         server.getEndpoint().getService().setInvoker(new BeanInvoker(new WS1Impl()));
     }
 
     @Override
-    protected ServerFactoryBean createServiceFactory(Class serviceClass, String address, QName name) {
-        ServerFactoryBean sf = super.createServiceFactory(serviceClass, address, name);
+    protected ServerFactoryBean createServiceFactory(Class serviceClass, 
+                                                     Object serviceBean, 
+                                                     String address, 
+                                                     QName name,
+                                                     AegisDatabinding b) {
+        ServerFactoryBean sf = super.createServiceFactory(serviceClass, 
+                                                          serviceBean, 
+                                                          address, 
+                                                          name,
+                                                          b);
         sf.getServiceFactory().setProperties(props);
         return sf;
     }
+    
 
     @Test
     public void testClient() throws Exception {

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java Tue Sep 18 12:51:46 2007
@@ -44,8 +44,11 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        ServerFactoryBean sf = createServiceFactory(InheritanceService.class, "InheritanceService",
-                                                    new QName("urn:xfire:inheritance", "InheritanceService"));
+        ServerFactoryBean sf = createServiceFactory(InheritanceService.class,
+                                                    null, "InheritanceService",
+                                                    new QName("urn:xfire:inheritance",
+                                                              "InheritanceService"),
+                                                    null);
 
         Map<String, Object> props = new HashMap<String, Object>();
         props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, "true");

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java Tue Sep 18 12:51:46 2007
@@ -36,7 +36,7 @@
     @Before 
     public void setUp() throws Exception {
         super.setUp();
-        createService(BeanService.class, "BeanService", null);
+        createService(BeanService.class, null, "BeanService", null);
         createService(ArrayService.class, "Array", new QName("urn:Array", "Array"));
     }
 

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java Tue Sep 18 12:51:46 2007
@@ -18,12 +18,16 @@
  */
 package org.apache.cxf.aegis.namespaces;
 
-import javax.wsdl.WSDLException;
+import java.io.StringWriter;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.namespaces.data.Name;
@@ -33,11 +37,6 @@
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.service.Service;
 
-import org.jaxen.JaxenException;
-import org.jaxen.NamespaceContext;
-import org.jaxen.SimpleNamespaceContext;
-import org.jaxen.dom.DOMXPath;
-
 import org.junit.Before;
 import org.junit.Test;
 
@@ -52,7 +51,7 @@
     
     private TypeMapping tm;
     private Service service;
-        
+
     @Before
     public void setUp() throws Exception {
         super.setUp();
@@ -64,12 +63,9 @@
     }
     
     private String getNamespaceForPrefix(Element rootElement, 
-                                         NamespaceContext namespaceContext, 
                                          Element typeElement, 
-                                         String prefix) throws JaxenException {
-        DOMXPath findSchema = new DOMXPath("ancestor::xsd:schema");
-        findSchema.setNamespaceContext(namespaceContext);
-        Element schemaElement = (Element)findSchema.selectSingleNode(typeElement);
+                                         String prefix) throws Exception {
+        Element schemaElement = (Element)assertValid("ancestor::xsd:schema", typeElement).item(0);
 
         NamedNodeMap attributes = schemaElement.getAttributes();
         for (int x = 0; x < attributes.getLength(); x++) {
@@ -95,31 +91,30 @@
 
         return null;
     }
-    
+
     
     @Test
-    public void testNameNamespace() throws WSDLException, JaxenException {
-        org.w3c.dom.Document wsdlDoc = getWSDLDocument("NameServiceImpl");
-        Element rootElement = wsdlDoc.getDocumentElement();
-        
-        SimpleNamespaceContext namespaceContext = new SimpleNamespaceContext();
-        namespaceContext.addNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
-        DOMXPath arrayOfNameFinder = 
-            new DOMXPath("//xsd:complexType[@name='ArrayOfName']/xsd:sequence/xsd:element");
-        arrayOfNameFinder.setNamespaceContext(namespaceContext);
+    public void testNameNamespace() throws Exception {
         
-        Element arrayOfNameElement = (Element)arrayOfNameFinder.selectSingleNode(rootElement);
-        assertNotNull(arrayOfNameElement);
+        org.w3c.dom.Document doc = getWSDLDocument("NameServiceImpl");
+        Element rootElement = doc.getDocumentElement();
 
+        Definition def = getWSDLDefinition("NameServiceImpl");
+        StringWriter sink = new StringWriter();
+        WSDLFactory.newInstance().newWSDLWriter().writeWSDL(def, sink);
+        NodeList aonNodes = 
+            assertValid("//xsd:complexType[@name='ArrayOfName']/xsd:sequence/xsd:element", doc);
+        Element arrayOfNameElement = (Element)aonNodes.item(0);
+        
         String typename = arrayOfNameElement.getAttribute("type");
         String prefix = typename.split(":")[0];
 
-        String uri = getNamespaceForPrefix(rootElement, namespaceContext, 
-                                           arrayOfNameElement, prefix);
+        String uri = getNamespaceForPrefix(rootElement, arrayOfNameElement, prefix);
         assertNotNull(uri);
         Type nameType = tm.getTypeCreator().createType(Name.class);
         QName tmQname = nameType.getSchemaType();
         assertEquals(tmQname.getNamespaceURI(), uri);
+        
     }
     
     

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java Tue Sep 18 12:51:46 2007
@@ -33,7 +33,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        Server s = createService(HelloProxyService.class, null);
+        Server s = createService(HelloProxyService.class, new HelloProxyServiceImpl(), null);
         s.getEndpoint().getService().setInvoker(new BeanInvoker(new HelloProxyServiceImpl()));
     }
 

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml Tue Sep 18 12:51:46 2007
@@ -1,7 +1,26 @@
-<mappings>
-    <mapping uri="urn:AddNumbers">
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<mappings xmlns:anns="urn:AddNumbers">
+    <mapping name="anns:AddNumbers">
         <method name="add">
-            <parameter index="0" mappedName="value1"/>
+            <parameter index="0" mappedName="value1" />
             <parameter index="1" mappedName="value2"/>
             <return-type mappedName="sum"/>
         </method>

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java Tue Sep 18 12:51:46 2007
@@ -22,4 +22,7 @@
     public int add(int one, int two) {
         return one + two;
     }
+    public int unmappedAdd(int one, int two) {
+        return two + one;
+    }
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java Tue Sep 18 12:51:46 2007
@@ -27,6 +27,16 @@
     private String bleh;
 
     private String howdy;
+    
+    private int[] numbers;
+
+    public int[] getNumbers() {
+        return numbers;
+    }
+
+    public void setNumbers(int[] numbers) {
+        this.numbers = numbers;
+    }
 
     public String getBleh() {
         return bleh;

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java Tue Sep 18 12:51:46 2007
@@ -375,7 +375,7 @@
         type.setSchemaType(new QName("urn:Bean", "bean"));
 
         PropertyDescriptor[] pds = info.getPropertyDescriptors();
-        assertEquals(2, pds.length);
+        assertEquals(3, pds.length);
 
         ExtendedBean bean = new ExtendedBean();
         bean.setHowdy("howdy");

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java Tue Sep 18 12:51:46 2007
@@ -172,15 +172,16 @@
 
     @Test
     public void testCollectionServiceWSDL() throws Exception {
-        createService(CollectionService.class, null);
+        
+        createService(CollectionService.class, new CollectionService(), null);
 
         Document wsdl = getWSDLDocument("CollectionService");
         assertValid("//xsd:element[@name='return'][@type='tns:ArrayOfString']", wsdl);
     }
 
     @Test
-    public void testUnannotatedStrings() throws Exception {
-        createService(CollectionService.class, null);
+    public void testUnannotatedStrings() throws Exception {        
+        createService(CollectionService.class, new CollectionService(), null);
 
         Document doc = getWSDLDocument("CollectionService");
         // printNode(doc);
@@ -191,6 +192,7 @@
     }
 
     public class CollectionService {
+        
         public Collection<String> getStrings() {
             return null;
         }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java Tue Sep 18 12:51:46 2007
@@ -64,7 +64,7 @@
 
     @Test
     public void testMapServiceWSDL() throws Exception {
-        createService(CustomTypeService.class, null);
+        createService(CustomTypeService.class, new CustomTypeService(), null);
 
         Document wsdl = getWSDLDocument("CustomTypeService");
         assertValid("//xsd:element[@name='s'][@type='ns0:custom']", wsdl);

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java Tue Sep 18 12:51:46 2007
@@ -31,7 +31,7 @@
     
     @Test
     public void testMissingTransliteration() throws Exception {
-        Server server = createService(MissingType.class, null);
+        Server server = createService(MissingType.class, new MissingTypeImpl(), null);
         Service service = server.getEndpoint().getService();
         service.setInvoker(new BeanInvoker(new MissingTypeImpl()));
         ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java Tue Sep 18 12:51:46 2007
@@ -72,7 +72,7 @@
         return new JAXBAttachmentUnmarshaller(attachments);
     }
 
-    protected AttachmentMarshaller getAttachmentMarrshaller() {
+    protected AttachmentMarshaller getAttachmentMarshaller() {
         return new JAXBAttachmentMarshaller(attachments);
     }
     

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Tue Sep 18 12:51:46 2007
@@ -220,8 +220,7 @@
                     try {
                         DOMUtils.writeXml(r.getNode(), System.out);
                     } catch (TransformerException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
+                        throw new RuntimeException(e);
                     }
                     addSchemaDocument(serviceInfo, col, 
                                       (Document)r.getNode(), r.getSystemId());
@@ -400,8 +399,8 @@
     
     
     //Now we can not add all the classes that Jaxb needed into JaxbContext, especially when 
-    //an ObjectFactroy is pointed by an jaxb @XmlElementDecl annotation
-    //added this workaround method to load the jaxb needed OjbectFactory class
+    //an ObjectFactory is pointed to by an jaxb @XmlElementDecl annotation
+    //added this workaround method to load the jaxb needed ObjectFactory class
     public boolean addJaxbObjectFactory(JAXBException e1) {
         boolean added = false;
         java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
@@ -426,6 +425,14 @@
             
         }
         return added;
+    }
+
+    /**
+     * Jaxb has no declared namespace prefixes.
+     * {@inheritDoc}
+     */
+    public Map<String, String> getDeclaredNamespaceMappings() {
+        return null;
     }
     
     

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java Tue Sep 18 12:51:46 2007
@@ -40,7 +40,7 @@
         if (obj != null
             || !(part.getXmlSchema() instanceof XmlSchemaElement)) {
             JAXBEncoderDecoder.marshall(getJAXBContext(), getSchema(), obj, part, output, 
-                                        getAttachmentMarrshaller());
+                                        getAttachmentMarshaller());
         } else if (obj == null && needToRender(obj, part)) {
             JAXBEncoderDecoder.marshallNullElement(getJAXBContext(), getSchema(), output, part);
         }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java Tue Sep 18 12:51:46 2007
@@ -172,7 +172,7 @@
     private void buildHandlerChain() {
         AnnotationHandlerChainBuilder builder = new AnnotationHandlerChainBuilder();
 
-        List<Handler> chain = builder.buildHandlerChainFromClass(getServiceBean().getClass(),
+        List<Handler> chain = builder.buildHandlerChainFromClass(getServiceBeanClass(),
                                                                  getEndpointName());
         for (Handler h : chain) {
             injectResources(h);

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java Tue Sep 18 12:51:46 2007
@@ -198,7 +198,7 @@
         try {
             m = handler.getClass().getMethod("init", Map.class);
         } catch (NoSuchMethodException ex) {
-            // emtpy
+            // empty
         }
         return m;
     }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java Tue Sep 18 12:51:46 2007
@@ -55,6 +55,7 @@
         ServerFactoryBean svrFactory = new ServerFactoryBean();
         svrFactory.setBus(bus);
         svrFactory.setServiceFactory(bean);
+        svrFactory.setServiceBean(clazz.newInstance());
         svrFactory.setAddress(address);
         svrFactory.create();
         

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java Tue Sep 18 12:51:46 2007
@@ -45,7 +45,7 @@
         bean.setServiceClass(GreeterImpl.class);
         GreeterImpl greeter = new GreeterImpl();
         BeanInvoker invoker = new BeanInvoker(greeter);
-        bean.setInvoker(invoker);
+        
         
         Service service = bean.create();
 
@@ -55,6 +55,7 @@
         ServerFactoryBean svr = new ServerFactoryBean();
         svr.setBus(bus);
         svr.setServiceFactory(bean);
+        svr.setInvoker(invoker);
         
         svr.create();
 

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java Tue Sep 18 12:51:46 2007
@@ -27,6 +27,7 @@
 import org.w3c.dom.Document;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.calculator.CalculatorImpl;
 import org.apache.cxf.calculator.CalculatorPortType;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
@@ -129,6 +130,7 @@
     public void testJaxwsServiceClass() throws Exception {
         JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
         factory.setServiceClass(CalculatorPortType.class);
+        factory.setServiceBean(new CalculatorImpl());
         String address = "http://localhost:9001/jaxwstest";
         factory.setAddress(address);
         Server server = factory.create();

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java Tue Sep 18 12:51:46 2007
@@ -113,7 +113,7 @@
             if (invoker == null) {
                 if (serviceBean != null) {
                     ep.getService().setInvoker(createInvoker());
-                }
+                }    
             } else {
                 ep.getService().setInvoker(invoker);
             }
@@ -129,7 +129,7 @@
             throw new ServiceConstructionException(e);
         }
         
-        if (getServiceBean() != null) {
+        if (serviceBean != null) {
             initializeAnnotationInterceptors(server.getEndpoint(), this.getServiceBean().getClass());
         }
         
@@ -199,7 +199,7 @@
       
     
     protected Invoker createInvoker() {
-        return new BeanInvoker(serviceBean);
+        return new BeanInvoker(getServiceBean());
     }
 
     public Server getServer() {
@@ -222,11 +222,16 @@
         this.start = start;
     }
 
-    public Object getServiceBean() {
-        if (serviceBean == null) {
+    public Object getServiceBean() {        
+        return serviceBean;
+    }
+    
+    public Class<?> getServiceBeanClass() {
+        if (serviceBean != null) {
+            return serviceBean.getClass();
+        } else {
             return getServiceFactory().getServiceClass();
         }
-        return serviceBean;
     }
 
     /**

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Tue Sep 18 12:51:46 2007
@@ -30,6 +30,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -752,9 +753,21 @@
         serviceInfo.setXmlSchemaCollection(col);
         schemaInfo.setSchema(schema);
 
+        Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();
+        if (explicitNamespaceMappings == null) {
+            explicitNamespaceMappings = Collections.emptyMap();
+        }
         NamespaceMap nsMap = new NamespaceMap();
-        nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NU_SCHEMA_XSD);
-        nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, serviceInfo.getTargetNamespace());
+        for (Map.Entry<String, String> mapping : explicitNamespaceMappings.entrySet()) {
+            nsMap.add(mapping.getValue(), mapping.getKey());
+        }
+        
+        if (!explicitNamespaceMappings.containsKey(WSDLConstants.NU_SCHEMA_XSD)) {
+            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NU_SCHEMA_XSD);
+        }
+        if (!explicitNamespaceMappings.containsKey(serviceInfo.getTargetNamespace())) {
+            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, serviceInfo.getTargetNamespace());
+        }
         schema.setNamespaceContext(nsMap);
         serviceInfo.addSchema(schemaInfo);
         return schemaInfo;
@@ -1145,7 +1158,8 @@
                                    new QName(op.getName().getNamespaceURI(), exClass.getSimpleName()));
         fi.setProperty(Class.class.getName(), exClass);
         fi.setProperty("elementName", faultName);
-        MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(), "fault"));
+        MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(),
+                                                          exClass.getSimpleName()));
         mpi.setElementQName(faultName);
         mpi.setTypeClass(beanClass);
         return fi;

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml Tue Sep 18 12:51:46 2007
@@ -73,6 +73,7 @@
   
   <simple:server id="inlineSoapBinding" 
     serviceClass="org.apache.cxf.service.factory.HelloService"
+    serviceBean="#greeter"
     address="http://localhost:8080/test"   
     serviceName="t:HelloService"
     xmlns:t="http://apache.org/hello_world_soap_http"

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java Tue Sep 18 12:51:46 2007
@@ -138,6 +138,7 @@
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
         svrBean.setServiceFactory(serviceFactory);
+        svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(getBus());
         
         Map<String, Object> props = new HashMap<String, Object>();

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java Tue Sep 18 12:51:46 2007
@@ -46,6 +46,7 @@
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
         svrBean.setServiceClass(HelloService.class);
+        svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(getBus());
         svrBean.setDestinationFactory(new CustomDestinationFactory());
 
@@ -53,12 +54,13 @@
         assertTrue(server.getDestination() instanceof CustomDestination);
     }
     
+        
     @SuppressWarnings("unchecked")
     @Test
     public void testJaxbExtraClass() throws Exception {
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
-        svrBean.setServiceClass(HelloService.class);
+        svrBean.setServiceClass(HelloServiceImpl.class);
         svrBean.setBus(getBus());
 
         Map props = svrBean.getProperties();

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java Tue Sep 18 12:51:46 2007
@@ -45,7 +45,7 @@
         sf.setAddress(address);
         sf.setDataBinding(new StaxDataBinding());
         sf.getFeatures().add(new StaxDataBindingFeature());
-
+        sf.setBus(getBus());
         sf.create();
         
         Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID, "req.xml");

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java Tue Sep 18 12:51:46 2007
@@ -138,7 +138,7 @@
         threadingParametersMap = threadingParamsMap;
     }
     
-    public Map<String, ThreadingParameters> getThreadingParamtersMap() {
+    public Map<String, ThreadingParameters> getThreadingParametersMap() {
         return threadingParametersMap;
     }
             

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/model/JavaParameterTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/model/JavaParameterTest.java?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/model/JavaParameterTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/model/JavaParameterTest.java Tue Sep 18 12:51:46 2007
@@ -32,11 +32,12 @@
         assertEquals("\"\"", 
                      holderParameter.getDefaultTypeValue());
         
-        holderParameter = new JavaParameter("org.apache.cxf.tools.common.model.JavaParamter",
-                                            "org.apache.cxf.tools.common.model.JavaParamter", null);
+        holderParameter = new JavaParameter("org.apache.cxf.tools.common.model.JavaParameter",
+                                            "org.apache.cxf.tools.common.model.JavaParameter", null);
         holderParameter.setHolder(true);
         holderParameter.setHolderName("javax.xml.ws.Holder");
-        assertEquals("null", 
-                     holderParameter.getDefaultTypeValue());
+        String defaultTypeValue = holderParameter.getDefaultTypeValue();
+        assertEquals("new org.apache.cxf.tools.common.model.JavaParameter()", 
+                     defaultTypeValue);
     }
 }

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl Tue Sep 18 12:51:46 2007
@@ -50,7 +50,7 @@
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="AddException">
-    <wsdl:part name="fault" element="tns:AddException">
+    <wsdl:part name="AddException" element="tns:AddException">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="CalculatorPortType">

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl Tue Sep 18 12:51:46 2007
@@ -53,7 +53,7 @@
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="DBServiceFault">
-    <wsdl:part name="fault" element="tns:DBServiceFault">
+    <wsdl:part name="DBServiceFault" element="tns:DBServiceFault">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="operation0Response">

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl Tue Sep 18 12:51:46 2007
@@ -55,7 +55,7 @@
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="PingMeFault">
-    <wsdl:part name="fault" element="ns1:faultDetail">
+    <wsdl:part name="PingMeFault" element="ns1:faultDetail">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="pingMeResponse">

Modified: incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl?rev=577033&r1=577032&r2=577033&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl (original)
+++ incubator/cxf/tags/cxf-2.0.2-incubator/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl Tue Sep 18 12:51:46 2007
@@ -67,11 +67,11 @@
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="BadRecordLitFault">
-    <wsdl:part name="fault" element="ns1:BadRecordLit">
+    <wsdl:part name="BadRecordLitFault" element="ns1:BadRecordLit">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="NoSuchCodeLitFault">
-    <wsdl:part name="fault" element="ns1:NoSuchCodeLit">
+    <wsdl:part name="NoSuchCodeLitFault" element="ns1:NoSuchCodeLit">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="testDocLitFault">



Mime
View raw message