cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r588283 [8/18] - in /incubator/cxf/branches/jliu: ./ api/ api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/io/ api/src/main/java/org/apache/cxf/message/ api/src/main/java/org/apache/cxf/phase/ api/src/main/java...
Date Thu, 25 Oct 2007 17:10:56 GMT
Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java Thu Oct 25 10:09:20 2007
@@ -35,9 +35,9 @@
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.util.NamespaceHelper;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Attribute;
 import org.jdom.Element;
 import org.jdom.Namespace;
@@ -265,14 +265,14 @@
                 return;
             }
             
-            Element complex = new Element("complexType", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element complex = new Element("complexType", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             complex.setAttribute(new Attribute("name", getSchemaType().getLocalPart()));
             root.addContent(complex);
 
-            Element seq = new Element("sequence", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element seq = new Element("sequence", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             complex.addContent(seq);
 
-            Element element = new Element("element", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element element = new Element("element", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             seq.addContent(element);
 
             Type componentType = getComponentType();
@@ -308,7 +308,7 @@
      * @return
      */
     private boolean hasDefinedArray(Element root) {
-        List children = root.getChildren("complexType", Namespace.getNamespace(XmlConstants.XSD));
+        List children = root.getChildren("complexType", Namespace.getNamespace(SOAPConstants.XSD));
         for (Iterator itr = children.iterator(); itr.hasNext();) {
             Element e = (Element) itr.next();
             

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java Thu Oct 25 10:09:20 2007
@@ -29,11 +29,11 @@
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.mtom.AbstractXOPType;
 import org.apache.cxf.aegis.type.mtom.ByteArrayType;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.common.util.Base64Exception;
 import org.apache.cxf.common.util.Base64Utility;
+import org.apache.cxf.common.util.SOAPConstants;
 
 /**
  * Converts back and forth to byte[] objects.
@@ -49,7 +49,7 @@
 
     @Override
     public Object readObject(MessageReader mreader, Context context) throws DatabindingException {
-        boolean mtomEnabled = Boolean.valueOf((String)context.get(XmlConstants.MTOM_ENABLED)).booleanValue();
+        boolean mtomEnabled = Boolean.valueOf((String)context.get(SOAPConstants.MTOM_ENABLED)).booleanValue();
         XMLStreamReader reader = mreader.getXMLStreamReader();
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -107,7 +107,7 @@
     public void writeObject(Object object,
                             MessageWriter writer,
                             Context context) throws DatabindingException {
-        boolean mtomEnabled = Boolean.valueOf((String)context.get(XmlConstants.MTOM_ENABLED)).booleanValue();
+        boolean mtomEnabled = Boolean.valueOf((String)context.get(SOAPConstants.MTOM_ENABLED)).booleanValue();
         if (mtomEnabled) {
             optimizedType.writeObject(object, writer, context);
             return;

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java Thu Oct 25 10:09:20 2007
@@ -36,10 +36,10 @@
 import org.apache.cxf.aegis.type.TypeMapping;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.util.NamespaceHelper;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.interceptor.Fault;
 import org.jdom.Attribute;
 import org.jdom.Element;
@@ -387,7 +387,7 @@
     @Override
     public void writeSchema(Element root) {
         BeanTypeInfo inf = getTypeInfo();
-        Element complex = new Element("complexType", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element complex = new Element("complexType", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         complex.setAttribute(new Attribute("name", getSchemaType().getLocalPart()));
         root.addContent(complex);
 
@@ -403,7 +403,9 @@
         }
 
         if (inf.isExtension() && sooperType != null) {
-            Element complexContent = new Element("complexContent", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element complexContent = new Element("complexContent", 
+                                                 SOAPConstants.XSD_PREFIX, 
+                                                 SOAPConstants.XSD);
             complex.addContent(complexContent);
             complex = complexContent;
         }
@@ -418,7 +420,7 @@
 
         if (isExtension && sooperType != null) {
 
-            Element extension = new Element("extension", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element extension = new Element("extension", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             complex.addContent(extension);
             QName baseType = sooperType.getSchemaType();
             extension.setAttribute(new Attribute("base", getNameWithPrefix2(root, baseType
@@ -444,11 +446,11 @@
             }
 
             if (seq == null) {
-                seq = new Element("sequence", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+                seq = new Element("sequence", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
                 dummy.addContent(seq);
             }
 
-            Element element = new Element("element", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element element = new Element("element", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             seq.addContent(element);
 
             Type type = getType(inf, name);
@@ -466,7 +468,7 @@
          */
         if (inf.isExtensibleElements()) {
             if (seq == null) {
-                seq = new Element("sequence", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+                seq = new Element("sequence", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
                 dummy.addContent(seq);
             }
             seq.addContent(createAnyElement());
@@ -476,7 +478,7 @@
         for (Iterator itr = inf.getAttributes(); itr.hasNext();) {
             QName name = (QName)itr.next();
 
-            Element element = new Element("attribute", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element element = new Element("attribute", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             dummy.addContent(element);
 
             Type type = getType(inf, name);
@@ -664,7 +666,7 @@
      * @return
      */
     private Element createAnyElement() {
-        Element result = new Element("any", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element result = new Element("any", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         result.setAttribute(new Attribute("minOccurs", "0"));
         result.setAttribute(new Attribute("maxOccurs", "unbounded"));
         return result;
@@ -693,7 +695,7 @@
      * @return
      */
     private Element createAnyAttribute() {
-        return new Element("anyAttribute", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        return new Element("anyAttribute", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
     }
 
 }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java Thu Oct 25 10:09:20 2007
@@ -31,10 +31,10 @@
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeMapping;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.common.util.Base64Utility;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Attribute;
 import org.jdom.Element;
 
@@ -50,8 +50,8 @@
  * @author <a href="mailto:peter.royal@pobox.com">peter royal</a>
  */
 public class ObjectType extends Type {
-    private static final QName XSI_TYPE = new QName(XmlConstants.XSI_NS, "type");
-    private static final QName XSI_NIL = new QName(XmlConstants.XSI_NS, "nil");
+    private static final QName XSI_TYPE = new QName(SOAPConstants.XSI_NS, "type");
+    private static final QName XSI_NIL = new QName(SOAPConstants.XSI_NS, "nil");
 
     private Set<Type> dependencies;
     private boolean serializedWhenUnknown;
@@ -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());
@@ -294,12 +295,12 @@
     @Override
     public void writeSchema(Element root) {
         if (serializedWhenUnknown) {
-            Element simple = new Element("simpleType", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+            Element simple = new Element("simpleType", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
             simple.setAttribute(new Attribute("name", "serializedJavaObject"));
             root.addContent(simple);
 
-            Element restriction = new Element("restriction", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
-            restriction.setAttribute(new Attribute("base", XmlConstants.XSD_PREFIX + ":base64Binary"));
+            Element restriction = new Element("restriction", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
+            restriction.setAttribute(new Attribute("base", SOAPConstants.XSD_PREFIX + ":base64Binary"));
 
             simple.addContent(restriction);
         }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java Thu Oct 25 10:09:20 2007
@@ -32,9 +32,9 @@
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.util.NamespaceHelper;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Attribute;
 import org.jdom.Element;
 
@@ -176,27 +176,27 @@
 
     @Override
     public void writeSchema(Element root) {
-        Element complex = new Element("complexType", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element complex = new Element("complexType", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         complex.setAttribute(new Attribute("name", getSchemaType().getLocalPart()));
         root.addContent(complex);
 
-        Element seq = new Element("sequence", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element seq = new Element("sequence", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         complex.addContent(seq);
 
         Type kType = getKeyType();
         Type vType = getValueType();
 
-        Element element = new Element("element", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element element = new Element("element", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         seq.addContent(element);
 
         element.setAttribute(new Attribute("name", getEntryName().getLocalPart()));
         element.setAttribute(new Attribute("minOccurs", "0"));
         element.setAttribute(new Attribute("maxOccurs", "unbounded"));
 
-        Element evComplex = new Element("complexType", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element evComplex = new Element("complexType", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         element.addContent(evComplex);
 
-        Element evseq = new Element("sequence", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element evseq = new Element("sequence", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         evComplex.addContent(evseq);
 
         createElement(root, evseq, getKeyName(), kType);
@@ -207,7 +207,7 @@
      * Creates a element in a sequence for the key type and the value type.
      */
     private void createElement(Element root, Element seq, QName name, Type type) {
-        Element element = new Element("element", XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Element element = new Element("element", SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
         seq.addContent(element);
 
         String prefix = NamespaceHelper.getUniquePrefix((Element)root, type.getSchemaType()

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/EnumType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/EnumType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/EnumType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/EnumType.java Thu Oct 25 10:09:20 2007
@@ -21,9 +21,9 @@
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.Type;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Attribute;
 import org.jdom.Element;
 import org.jdom.Namespace;
@@ -53,14 +53,14 @@
 
     @Override
     public void writeSchema(Element root) {
-        Namespace xsd = Namespace.getNamespace(XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+        Namespace xsd = Namespace.getNamespace(SOAPConstants.XSD_PREFIX, SOAPConstants.XSD);
 
         Element simple = new Element("simpleType", xsd);
         simple.setAttribute(new Attribute("name", getSchemaType().getLocalPart()));
         root.addContent(simple);
 
         Element restriction = new Element("restriction", xsd);
-        restriction.setAttribute(new Attribute("base", XmlConstants.XSD_PREFIX + ":string"));
+        restriction.setAttribute(new Attribute("base", SOAPConstants.XSD_PREFIX + ":string"));
         simple.addContent(restriction);
 
         Object[] constants = getTypeClass().getEnumConstants();

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java Thu Oct 25 10:09:20 2007
@@ -27,9 +27,9 @@
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.aegis.Context;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.attachment.AttachmentImpl;
 import org.apache.cxf.attachment.ByteDataSource;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.message.Attachment;
 
 /**
@@ -38,7 +38,7 @@
 public class ByteArrayType extends AbstractXOPType {
     public ByteArrayType() {
         setTypeClass(byte[].class);
-        setSchemaType(new QName(XmlConstants.XSD, "base64Binary"));
+        setSchemaType(new QName(SOAPConstants.XSD, "base64Binary"));
     }
 
     @Override

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageReader.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageReader.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageReader.java Thu Oct 25 10:09:20 2007
@@ -22,7 +22,7 @@
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.aegis.DatabindingException;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 
 /**
  * Basic type conversions for reading messages.
@@ -30,7 +30,7 @@
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  */
 public abstract class AbstractMessageReader implements MessageReader {
-    private static final QName XSI_NIL = new QName(XmlConstants.XSI_NS, "nil", XmlConstants.XSI_PREFIX);
+    private static final QName XSI_NIL = new QName(SOAPConstants.XSI_NS, "nil", SOAPConstants.XSI_PREFIX);
 
     public AbstractMessageReader() {
     }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageWriter.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageWriter.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageWriter.java Thu Oct 25 10:09:20 2007
@@ -20,7 +20,7 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 
 /**
  * Basic type conversion functionality for writing messages.
@@ -53,11 +53,11 @@
         } else {
             value = type.getLocalPart();
         }
-        getAttributeWriter("type", XmlConstants.XSI_NS).writeValue(value);
+        getAttributeWriter("type", SOAPConstants.XSI_NS).writeValue(value);
     }
 
     public void writeXsiNil() {
-        MessageWriter attWriter = getAttributeWriter("nil", XmlConstants.XSI_NS);
+        MessageWriter attWriter = getAttributeWriter("nil", SOAPConstants.XSI_NS);
         attWriter.writeValue("true");
         attWriter.close();
     }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java Thu Oct 25 10:09:20 2007
@@ -28,9 +28,9 @@
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.aegis.DatabindingException;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.AbstractMessageReader;
 import org.apache.cxf.aegis.xml.MessageReader;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -106,7 +106,7 @@
         /*
          * We're making a conscious choice here -- garbage in == garbate out.
          */
-        String xsiTypeQname = root.getAttributeValue(XmlConstants.XSI_NS, "type");
+        String xsiTypeQname = root.getAttributeValue(SOAPConstants.XSI_NS, "type");
         if (xsiTypeQname != null) {
             Matcher m = QNAME_PATTERN.matcher(xsiTypeQname);
             if (m.matches()) {

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java Thu Oct 25 10:09:20 2007
@@ -29,6 +29,7 @@
 import org.apache.cxf.aegis.util.NamespaceHelper;
 import org.apache.cxf.aegis.xml.AbstractMessageWriter;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.util.StringUtils;
 
 /**
  * LiteralWriter
@@ -99,10 +100,10 @@
             String decPrefix = writer.getNamespaceContext().getPrefix(namespace);
 
             // If the user didn't specify a prefix, create one
-            if (prefix == null && decPrefix == null) {
+            if (StringUtils.isEmpty(prefix) && decPrefix == null) {
                 declare = true;
                 prefix = NamespaceHelper.getUniquePrefix(writer);
-            } else if (prefix == null) {
+            } else if (StringUtils.isEmpty(prefix)) {
                 prefix = decPrefix;
             } else if (!prefix.equals(decPrefix)) {
                 declare = true;

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/schema/mapping.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/schema/mapping.xsd?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/schema/mapping.xsd (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/schema/mapping.xsd Thu Oct 25 10:09:20 2007
@@ -18,8 +18,8 @@
    under the License.
 -->
 <schema xmlns="http://www.w3.org/2001/XMLSchema"
-  targetNamespace="http://xfire.codehaus.org/aegis/1.0"
-  xmlns:tns="http://xfire.codehaus.org/aegis/1.0"
+  targetNamespace="http://cxf.apache.org/aegis/1.1"
+  xmlns:tns="http://cxf.apache.org/aegis/1.1"
   elementFormDefault="unqualified" 
   attributeFormDefault="unqualified" >
 
@@ -76,10 +76,13 @@
     <attribute name="typeName" type="string" />
     <attribute name="mappedName" type="string" />
     <attribute name="nillable" type="boolean" />
+    <attribute name="flag" type="boolean" />
     <attribute name="ignore" type="boolean" />
     <attribute name="componentType" type="string" />
     <attribute name="keyType" type="string" />
+    <attribute name="valueType" type="string" />
     <attribute name="minOccurs" type="int"/>
+    <attribute name="maxOccurs" type="string"/> <!--  takes * -->
     <attribute name="style">
       <simpleType>
         <restriction base="string">

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java Thu Oct 25 10:09:20 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;
@@ -35,11 +36,11 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.aegis.databinding.AegisServiceConfiguration;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.soap.SoapBindingFactory;
 import org.apache.cxf.binding.soap.SoapTransportFactory;
 import org.apache.cxf.bus.extension.ExtensionManagerBus;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerRegistry;
 import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
@@ -91,9 +92,9 @@
         bus.setExtension(new WSDLManagerImpl(), WSDLManager.class);
         
 
-        addNamespace("wsdl", XmlConstants.WSDL11_NS);
-        addNamespace("wsdlsoap", XmlConstants.WSDL11_SOAP_NS);
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("wsdl", SOAPConstants.WSDL11_NS);
+        addNamespace("wsdlsoap", SOAPConstants.WSDL11_SOAP_NS);
+        addNamespace("xsd", SOAPConstants.XSD);
 
 
     }
@@ -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(AbstractWSDLBasedEndpointFactory sf) {
+    protected void setupAegis(AbstractWSDLBasedEndpointFactory sf) { 
+        setupAegis(sf, null);
+    }
+    protected void setupAegis(AbstractWSDLBasedEndpointFactory 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/HeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/HeaderTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/HeaderTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/HeaderTest.java Thu Oct 25 10:09:20 2007
@@ -25,7 +25,7 @@
 import org.w3c.dom.Document;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
@@ -82,7 +82,7 @@
 
         Document wsdl = getWSDLDocument("Echo");
 
-        addNamespace("wsdlsoap", XmlConstants.WSDL11_NS);
+        addNamespace("wsdlsoap", SOAPConstants.WSDL11_NS);
         assertValid("//wsdl:input/wsdlsoap:header[@message='tns:echoRequestHeaders'][@part='in0']", wsdl);
         assertValid("//wsdl:output/wsdlsoap:header[@message='tns:echoResponseHeaders'][@part='out']", wsdl);
         assertValid("//wsdl:output/wsdlsoap:header[@message='tns:echoResponseHeaders'][@part='out0']", wsdl);

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionService.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionService.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionService.java Thu Oct 25 10:09:20 2007
@@ -18,6 +18,11 @@
  */
 package org.apache.cxf.aegis.exception;
 
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name = "ExceptionService", serviceName = "ExceptionService")
 public interface ExceptionService {
+    @WebMethod
     String sayHiWithException() throws HelloException;
 }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java Thu Oct 25 10:09:20 2007
@@ -18,11 +18,18 @@
  */
 package org.apache.cxf.aegis.exception;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.aegis.AbstractAegisTest;
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.service.Service;
 import org.apache.cxf.service.invoker.BeanInvoker;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class ExceptionTest extends AbstractAegisTest {
@@ -30,7 +37,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()));
     }
 
@@ -50,6 +57,76 @@
         } catch (HelloException e) {
             // nothing
         }
+
+        //check to make sure the fault is an element
+        Document wsdl = getWSDLDocument("ExceptionService");
+        addNamespace("tns", "http://exception.aegis.cxf.apache.org");
+        assertValid("//wsdl:message[@name='HelloException']/wsdl:part[@name='HelloException']"
+                    + "[@element='tns:String']",
+                     wsdl);
+    }
+    
+    @Test(expected = HelloException.class)
+    @Ignore("Not working yet due to namespace things")
+    public void testJaxwsServerSimpleClient() throws Exception {
+        JaxWsServerFactoryBean sfbean = new JaxWsServerFactoryBean();
+        sfbean.setServiceClass(ExceptionService.class);
+        sfbean.setDataBinding(new AegisDatabinding());
+        sfbean.setAddress("local://ExceptionServiceJaxWs1");
+        Server server = sfbean.create();
+        Service service = server.getEndpoint().getService();
+        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
+        
+        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
+        proxyFac.setAddress("local://ExceptionServiceJaxWs1");
+        proxyFac.setServiceClass(ExceptionService.class);
+        proxyFac.setBus(getBus());
+        setupAegis(proxyFac.getClientFactoryBean());
+        
+        ExceptionService clientInterface = (ExceptionService)proxyFac.create();
+        
+        clientInterface.sayHiWithException();
+    }
+    
+    @Test(expected = HelloException.class)
+    public void testJaxwsNoXfireCompat() throws Exception {
+        JaxWsServerFactoryBean sfbean = new JaxWsServerFactoryBean();
+        sfbean.setServiceClass(ExceptionService.class);
+        sfbean.setDataBinding(new AegisDatabinding());
+        sfbean.getServiceFactory().setDataBinding(sfbean.getDataBinding());
+        sfbean.setAddress("local://ExceptionServiceJaxWs");
+        Server server = sfbean.create();
+        Service service = server.getEndpoint().getService();
+        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
+        
+        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
+        proxyFac.setAddress("local://ExceptionServiceJaxWs");
+        proxyFac.setServiceClass(ExceptionService.class);
+        proxyFac.setBus(getBus());
+        proxyFac.getClientFactoryBean().getServiceFactory().setDataBinding(new AegisDatabinding());
+        ExceptionService clientInterface = (ExceptionService)proxyFac.create();
+        
+        clientInterface.sayHiWithException();
+    }
+    
+    @Test(expected = HelloException.class)
+    public void testJaxws() throws Exception {
+        JaxWsServerFactoryBean sfbean = new JaxWsServerFactoryBean();
+        sfbean.setServiceClass(ExceptionService.class);
+        setupAegis(sfbean);
+        sfbean.setAddress("local://ExceptionService4");
+        Server server = sfbean.create();
+        Service service = server.getEndpoint().getService();
+        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
+        
+        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
+        proxyFac.setAddress("local://ExceptionService4");
+        proxyFac.setServiceClass(ExceptionService.class);
+        proxyFac.setBus(getBus());
+        setupAegis(proxyFac.getClientFactoryBean());
+        ExceptionService clientInterface = (ExceptionService)proxyFac.create();
+        
+        clientInterface.sayHiWithException();
     }
     
     public static class ExceptionServiceImpl implements ExceptionService {

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java Thu Oct 25 10:09:20 2007
@@ -30,7 +30,7 @@
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.junit.Before;
 import org.junit.Test;
@@ -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");
@@ -68,7 +71,7 @@
         // check for Employee as extension
         String employeeType = types + "xsd:complexType[@name='Employee']";
         assertValid(employeeType, d);
-        String extension = "/xsd:complexContent/xsd:extension[@base='ns1:AbstractUser']";
+        String extension = "/xsd:complexContent/xsd:extension[@base='tns:AbstractUser']";
         assertValid(employeeType + extension, d);
         assertValid(employeeType + extension + "/xsd:sequence/xsd:element[@name='division']", d);
         // assertValid("count(" + employeeType + extension +
@@ -91,7 +94,7 @@
     @Test
     public void testLocalGetEmployee() throws Exception {
         Node response = invoke("InheritanceService", "GetEmployee.xml");
-        addNamespace("xsi", XmlConstants.XSI_NS);
+        addNamespace("xsi", SOAPConstants.XSI_NS);
         addNamespace("w", "urn:xfire:inheritance");
         addNamespace("p", "http://inheritance.aegis.cxf.apache.org");
         assertValid("//s:Body/w:getEmployeeResponse/w:return/p:division", response);

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java Thu Oct 25 10:09:20 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"));
     }
 
@@ -66,7 +66,7 @@
         assertValid("//xsd:complexType[@name='getSubmitBean']/xsd:sequence"
                     + "/xsd:element[@name='bleh'][@type='xsd:string'][@minOccurs='0']", doc);
         assertValid("//xsd:complexType[@name='getSubmitBean']/xsd:sequence"
-                    + "/xsd:element[@name='bean'][@type='SimpleBean'][@minOccurs='0']", doc);
+                    + "/xsd:element[@name='bean'][@type='tns:SimpleBean'][@minOccurs='0']", doc);
 
         assertValid("/wsdl:definitions/wsdl:types"
                     + "/xsd:schema[@targetNamespace='http://services.aegis.cxf.apache.org']", doc);

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java Thu Oct 25 10:09:20 2007
@@ -32,12 +32,12 @@
 import org.apache.cxf.aegis.type.DefaultTypeMappingRegistry;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeMapping;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.util.jdom.StaxBuilder;
 import org.apache.cxf.aegis.xml.jdom.JDOMReader;
 import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
 import org.apache.cxf.aegis.xml.stax.ElementReader;
 import org.apache.cxf.aegis.xml.stax.ElementWriter;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Document;
 import org.jdom.Element;
 import org.jdom.output.DOMOutputter;
@@ -52,7 +52,7 @@
 
         addNamespace("b", "urn:Bean");
         addNamespace("a", "urn:anotherns");
-        addNamespace("xsi", XmlConstants.XSI_NS);
+        addNamespace("xsi", SOAPConstants.XSI_NS);
 
         reg = new DefaultTypeMappingRegistry(true);
         mapping = reg.createTypeMapping(true);
@@ -199,8 +199,8 @@
         assertValid("/b:root[@b:bleh='bleh']", element);
         assertValid("/b:root[@b:howdy='howdy']", element);
 
-        Element types = new Element("types", "xsd", XmlConstants.XSD);
-        Element schema = new Element("schema", "xsd", XmlConstants.XSD);
+        Element types = new Element("types", "xsd", SOAPConstants.XSD);
+        Element schema = new Element("schema", "xsd", SOAPConstants.XSD);
         types.addContent(schema);
 
         new Document(types);
@@ -272,8 +272,8 @@
         assertInvalid("/b:root[@b:howdy]", element);
         assertValid("/b:root/b:bleh[@xsi:nil='true']", element);
 
-        Element types = new Element("types", "xsd", XmlConstants.XSD);
-        Element schema = new Element("schema", "xsd", XmlConstants.XSD);
+        Element types = new Element("types", "xsd", SOAPConstants.XSD);
+        Element schema = new Element("schema", "xsd", SOAPConstants.XSD);
         types.addContent(schema);
 
         new Document(types);
@@ -294,8 +294,8 @@
         type.setTypeMapping(mapping);
         type.setSchemaType(new QName("urn:Bean", "bean"));
 
-        Element types = new Element("types", "xsd", XmlConstants.XSD);
-        Element schema = new Element("schema", "xsd", XmlConstants.XSD);
+        Element types = new Element("types", "xsd", SOAPConstants.XSD);
+        Element schema = new Element("schema", "xsd", SOAPConstants.XSD);
         types.addContent(schema);
 
         new Document(types);
@@ -326,8 +326,8 @@
         type.setTypeClass(IntBean.class);
         type.setTypeMapping(mapping);
 
-        Element types = new Element("types", "xsd", XmlConstants.XSD);
-        Element schema = new Element("schema", "xsd", XmlConstants.XSD);
+        Element types = new Element("types", "xsd", SOAPConstants.XSD);
+        Element schema = new Element("schema", "xsd", SOAPConstants.XSD);
         types.addContent(schema);
 
         new Document(types);
@@ -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");
@@ -413,7 +413,7 @@
         // just
         // shouldn't be there.
 
-        addNamespace("xsi", XmlConstants.XSI_NS);
+        addNamespace("xsi", SOAPConstants.XSI_NS);
         assertValid("/b:root/b:data[@xsi:nil='true']", element);
 
         bean = (ByteBean)type.readObject(new JDOMReader(element), new Context());

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/ByteDataTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/ByteDataTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/ByteDataTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/ByteDataTest.java Thu Oct 25 10:09:20 2007
@@ -23,7 +23,7 @@
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.services.DataService;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.junit.Test;
 
 /**
@@ -51,9 +51,9 @@
 
     public void testBeanServiceWSDL() throws Exception {
         Document doc = getWSDLDocument("DataService");
-        addNamespace("wsdl", XmlConstants.WSDL11_NS);
-        addNamespace("wsdlsoap", XmlConstants.WSDL11_SOAP_NS);
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("wsdl", SOAPConstants.WSDL11_NS);
+        addNamespace("wsdlsoap", SOAPConstants.WSDL11_SOAP_NS);
+        addNamespace("xsd", SOAPConstants.XSD);
 
         assertValid("//xsd:element[@name='data'][@type='xsd:base64Binary']", doc);
     }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java Thu Oct 25 10:09:20 2007
@@ -30,7 +30,7 @@
 import org.apache.cxf.aegis.type.XMLTypeCreator;
 import org.apache.cxf.aegis.type.basic.BeanType;
 import org.apache.cxf.aegis.type.basic.StringType;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.service.Service;
 import org.junit.Before;
@@ -143,7 +143,7 @@
     public void testWSDL() throws Exception {
         Document wsdl = getWSDLDocument("AnnotatedService");
 
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("xsd", SOAPConstants.XSD);
         assertValid(
                     "//xsd:complexType[@name='AnnotatedBean1']/xsd:sequence/xsd:"
                     + "element[@name='elementProperty']",

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java Thu Oct 25 10:09:20 2007
@@ -172,25 +172,27 @@
 
     @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='ns1:ArrayOfString']", wsdl);
+        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);
         assertValid(
                     "//xsd:complexType[@name='getUnannotatedStringsResponse']"
-                    + "/xsd:sequence/xsd:element[@type='ns1:ArrayOfString']",
+                    + "/xsd:sequence/xsd:element[@type='tns:ArrayOfString']",
                     doc);
     }
 
     public class CollectionService {
+        
         public Collection<String> getStrings() {
             return null;
         }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java Thu Oct 25 10:09:20 2007
@@ -23,7 +23,7 @@
 import org.w3c.dom.Document;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.junit.Test;
 
@@ -40,7 +40,7 @@
         Document wsdl = getWSDLDocument("DualOutService");
         assertNotNull(wsdl);
  
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("xsd", SOAPConstants.XSD);
  
         assertValid(
                     "//xsd:complexType[@name='getValuesResponse']//xsd:element"

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java Thu Oct 25 10:09:20 2007
@@ -28,9 +28,9 @@
 import org.apache.cxf.aegis.type.CustomTypeMapping;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.java5.CurrencyService.Currency;
-import org.apache.cxf.aegis.util.XmlConstants;
 import org.apache.cxf.aegis.xml.jdom.JDOMReader;
 import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.jdom.Element;
 import org.jdom.output.DOMOutputter;
 import org.junit.Before;
@@ -101,7 +101,7 @@
         type.writeSchema(root);
 
         Document doc = new DOMOutputter().output(wsdl);
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("xsd", SOAPConstants.XSD);
         assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']", doc);
         assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']", doc);
         assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE2']", doc);

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/OperationNSTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/OperationNSTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/OperationNSTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/OperationNSTest.java Thu Oct 25 10:09:20 2007
@@ -32,7 +32,7 @@
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.junit.Before;
@@ -57,7 +57,7 @@
     public void testWSDL() throws Exception {
         Collection<Document> wsdls = getWSDLDocuments("NotificationService");
 
-        addNamespace("xsd", XmlConstants.XSD);
+        addNamespace("xsd", SOAPConstants.XSD);
         //assertValid("//xsd:element[@name='Notify']", wsdl);
         assertTrue(isExist(wsdls, "//xsd:element[@name='Notify']", getNamespaces()));
     }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java Thu Oct 25 10:09:20 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/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/Student.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/Student.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/Student.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/Student.java Thu Oct 25 10:09:20 2007
@@ -18,6 +18,38 @@
  */
 package org.apache.cxf.aegis.type.java5.map;
 
+/**
+ * Data object used to test Aegis mapping of maps.
+ */
 public class Student {
+    private String name;
+    private long id;
+    
+    public Student() {
+        name = "";
+        id = Long.valueOf(0);
+    }
+    
+    public Student(String name, long id) {
+        this.name = name;
+        this.id = id;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
 
 }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java Thu Oct 25 10:09:20 2007
@@ -18,29 +18,49 @@
  */
 package org.apache.cxf.aegis.type.java5.map;
 
+import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
 public class StudentServiceImpl implements StudentService {
-
+    
+    private Map<Long, Student> studentMap;
+    
+    public StudentServiceImpl() {
+        studentMap = new HashMap<Long, Student>();
+        studentMap.put(Long.valueOf(1), new Student("Student1", 1));
+        studentMap.put(Long.valueOf(100), new Student("Student100", 100));
+        studentMap.put(Long.valueOf(-1), new Student("StudentNegative", -1));
+    }
+    
     public Student findStudent(Long id) {
-        // TODO Auto-generated method stub
-        return null;
+        return studentMap.get(id);
     }
 
     public List<Student> getStudents(Map<String, String> filters) {
-        // TODO Auto-generated method stub
-        return null;
+        List<Student> returnValue = new LinkedList<Student>();
+        for (Map.Entry<Long, Student> e : studentMap.entrySet()) {
+            if (filters.containsKey(e.getValue())) {
+                returnValue.add(e.getValue());
+            }
+            
+        }
+        return returnValue;
     }
 
     public List<Student> getStudentsByIds(List<String> ids) {
-        // TODO Auto-generated method stub
-        return null;
+        List<Student> returnValue = new LinkedList<Student>();
+        for (String id : ids) {
+            Long longId = Long.decode(id);
+            Student s = studentMap.get(longId);
+            returnValue.add(s);
+        }
+        return returnValue;
     }
 
     public Map<Long, Student> getStudentsMap() {
-        // TODO Auto-generated method stub
-        return null;
+        return studentMap;
     }
 
 }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java Thu Oct 25 10:09:20 2007
@@ -18,14 +18,20 @@
  */
 package org.apache.cxf.aegis.type.java5.map;
 
+import java.util.Map;
+
 import org.w3c.dom.Document;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.junit.Test;
 
 public class StudentTest extends AbstractAegisTest {
+    
     @Test
     public void testWSDL() throws Exception {
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
@@ -34,9 +40,65 @@
         sf.setAddress("local://StudentService");
         setupAegis(sf);
         Server server = sf.create();
-        
         Document wsdl = getWSDLDocument(server);
         
         assertValid("//*[@name='string2stringMap']", wsdl);
+    }
+    
+    @Test 
+    public void testReturnMap() throws Exception {
+
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
+        sf.setServiceClass(StudentService.class);
+        sf.setServiceBean(new StudentServiceImpl());
+        sf.setAddress("local://StudentService");
+        setupAegis(sf);
+        Server server = sf.create();
+        server.start();
+        
+        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
+        proxyFac.setAddress("local://StudentService");
+        proxyFac.setServiceClass(StudentService.class);
+        proxyFac.setBus(getBus());
+        setupAegis(proxyFac.getClientFactoryBean());
+
+        StudentService clientInterface = (StudentService)proxyFac.create();
+        Map<Long, Student> fullMap = clientInterface.getStudentsMap();
+        assertNotNull(fullMap);
+        Student one = fullMap.get(Long.valueOf(1));
+        assertNotNull(one);
+        assertEquals("Student1", one.getName());
+        
+    }
+
+    @Test 
+    public void testReturnMapDocLiteral() throws Exception {
+
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
+        sf.setServiceClass(StudentServiceDocLiteral.class);
+        sf.setServiceBean(new StudentServiceDocLiteralImpl());
+        sf.setAddress("local://StudentServiceDocLiteral");
+        setupAegis(sf);
+        Server server = sf.create();
+        server.getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
+        server.getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
+        server.start();
+        
+        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
+        proxyFac.setAddress("local://StudentServiceDocLiteral");
+        proxyFac.setServiceClass(StudentServiceDocLiteral.class);
+        proxyFac.setBus(getBus());
+        setupAegis(proxyFac.getClientFactoryBean());
+        
+        proxyFac.getInInterceptors().add(new LoggingInInterceptor());
+        proxyFac.getOutInterceptors().add(new LoggingOutInterceptor());
+
+        StudentServiceDocLiteral clientInterface = (StudentServiceDocLiteral)proxyFac.create();
+        Map<Long, Student> fullMap = clientInterface.getStudentsMap();
+        assertNotNull(fullMap);
+        Student one = fullMap.get(Long.valueOf(1));
+        assertNotNull(one);
+        assertEquals("Student1", one.getName());
+        
     }
 }

Modified: incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java (original)
+++ incubator/cxf/branches/jliu/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java Thu Oct 25 10:09:20 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();



Mime
View raw message