cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r620079 - in /incubator/cxf/trunk: parent/ rt/databinding/aegis/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ ...
Date Sat, 09 Feb 2008 04:03:03 GMT
Author: dkulp
Date: Fri Feb  8 20:03:02 2008
New Revision: 620079

URL: http://svn.apache.org/viewvc?rev=620079&view=rev
Log:
Always use ASM to generate missing wrapper beans for JAXWS+JAXB
* This SHOULD fix most validation issues with wrapped/doc lit
* Should be faster for complex things (like arrays and such)

Removed:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
Modified:
    incubator/cxf/trunk/parent/pom.xml
    incubator/cxf/trunk/rt/databinding/aegis/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ASMHelper.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/javascript/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/Tag.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/StAXUtil.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl

Modified: incubator/cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Fri Feb  8 20:03:02 2008
@@ -132,13 +132,13 @@
                     <dependencies>
                         <dependency>
                             <groupId>org.apache.cxf</groupId>
-                             <artifactId>cxf-xjc-dv</artifactId>
-                             <version>${project.version}</version>
+                            <artifactId>cxf-xjc-dv</artifactId>
+                            <version>${project.version}</version>
                         </dependency>
                         <dependency>
-                             <groupId>org.apache.cxf</groupId>
-                             <artifactId>cxf-xjc-ts</artifactId>
-                             <version>${project.version}</version>
+                            <groupId>org.apache.cxf</groupId>
+                            <artifactId>cxf-xjc-ts</artifactId>
+                            <version>${project.version}</version>
                         </dependency>
                     </dependencies>
                 </plugin>
@@ -429,7 +429,37 @@
                     </exclusion>
                 </exclusions>
             </dependency>
-
+            <dependency>
+                <groupId>jaxen</groupId>
+                <artifactId>jaxen</artifactId>
+                <version>1.1</version>
+                <exclusions>
+                    <exclusion>
+                        <artifactId>dom4j</artifactId>
+                        <groupId>dom4j</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>xmlParserAPIs</artifactId>
+                        <groupId>xerces</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>xercesImpl</artifactId>
+                        <groupId>xerces</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>xom</artifactId>
+                        <groupId>xom</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>xalan</artifactId>
+                        <groupId>xalan</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>xml-apis</artifactId>
+                        <groupId>xml-apis</groupId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
             <dependency>
                 <groupId>org.codehaus.woodstox</groupId>
                 <artifactId>wstx-asl</artifactId>
@@ -869,8 +899,8 @@
         <profile>
             <id>set.eclipse.output</id>
             <properties>
-                 <eclipse.outputDirectory>${basedir}/eclipse-classes</eclipse.outputDirectory>
-            </properties> 
+                <eclipse.outputDirectory>${basedir}/eclipse-classes</eclipse.outputDirectory>
+            </properties>
         </profile>
 
         <profile>
@@ -1006,7 +1036,7 @@
                                      some timeout occurs.   That may cause some tests to timeout/hang. -->
                                     <name>org.apache.cxf.transports.http_jetty.DontClosePort</name>
                                     <value>false</value>
-                                </property>                                
+                                </property>
                             </systemProperties>
                         </configuration>
                     </plugin>
@@ -1016,8 +1046,8 @@
         <profile>
             <id>spring2.5</id>
             <properties>
-               <spring.version>2.5</spring.version>
-               <spring.mock>spring-test</spring.mock> 
+                <spring.version>2.5</spring.version>
+                <spring.mock>spring-test</spring.mock>
             </properties>
         </profile>
     </profiles>

Modified: incubator/cxf/trunk/rt/databinding/aegis/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/pom.xml?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/pom.xml (original)
+++ incubator/cxf/trunk/rt/databinding/aegis/pom.xml Fri Feb  8 20:03:02 2008
@@ -97,31 +97,6 @@
         <dependency>
             <groupId>jaxen</groupId>
             <artifactId>jaxen</artifactId>
-            <version>1.1</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>dom4j</artifactId>
-                    <groupId>dom4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xmlParserAPIs</artifactId>
-                    <groupId>xerces</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xercesImpl</artifactId>
-                    <groupId>xerces</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xom</artifactId>
-                    <groupId>xom</groupId>
-                </exclusion>
-                 <exclusion>
-                    <artifactId>xalan</artifactId>
-                    <groupId>xalan</groupId>
-                </exclusion>               
-                
-                
-            </exclusions>
         </dependency>
 
         <dependency>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java Fri Feb  8 20:03:02 2008
@@ -24,16 +24,20 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import javax.xml.bind.annotation.XmlAttachmentRef;
 import javax.xml.bind.annotation.XmlList;
 import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.JavaUtils;
 import org.apache.cxf.jaxws.util.ASMHelper;
@@ -51,12 +55,14 @@
 import org.objectweb.asm.Opcodes;
 
 public final class WrapperClassGenerator extends ASMHelper {
+    private static final Logger LOG = LogUtils.getL7dLogger(WrapperClassGenerator.class);
     private Set<Class<?>> wrapperBeans = new HashSet<Class<?>>();
     private InterfaceInfo interfaceInfo;
-
-    public WrapperClassGenerator(InterfaceInfo inf) {
+    private boolean qualified;
+    
+    public WrapperClassGenerator(InterfaceInfo inf, boolean q) {
         interfaceInfo = inf;
-
+        qualified = q;
     }
 
     private String getPackageName(Method method) {
@@ -65,10 +71,14 @@
             return ToolConstants.DEFAULT_PACKAGE_NAME;
         }
         return pkg.getName();
-
     }
 
     private Annotation[] getMethodParameterAnnotations(final MessagePartInfo mpi) {
+        Annotation[] a = (Annotation[])mpi.getProperty(ReflectionServiceFactoryBean.PARAM_ANNOTATION);
+        if (a != null) {
+            return a;
+        }
+        
         Annotation[][] paramAnno = (Annotation[][])mpi
             .getProperty(ReflectionServiceFactoryBean.METHOD_PARAM_ANNOTATIONS);
         int index = mpi.getIndex();
@@ -83,8 +93,10 @@
         Annotation[] anns = getMethodParameterAnnotations(mpi);
         if (anns != null) {
             for (Annotation anno : anns) {
-                if (anno.annotationType() == XmlList.class || anno.annotationType() == XmlAttachmentRef.class
-                    || anno.annotationType() == XmlJavaTypeAdapter.class) {
+                if (anno.annotationType() == XmlList.class 
+                    || anno.annotationType() == XmlAttachmentRef.class
+                    || anno.annotationType() == XmlJavaTypeAdapter.class
+                    || anno.annotationType() == XmlMimeType.class) {
                     list.add(anno);
                 }
             }
@@ -93,27 +105,52 @@
     }
 
     public Set<Class<?>> generate() {
+        try {
+            createClassWriter();
+        } catch (Throwable t) {
+            for (OperationInfo opInfo : interfaceInfo.getOperations()) {
+                if (opInfo.isUnwrappedCapable()
+                    && (opInfo.getUnwrappedOperation()
+                        .getProperty(ReflectionServiceFactoryBean.WRAPPERGEN_NEEDED) != null)) {
+                    LOG.warning(opInfo.getName() + "requires a wrapper bean but problems with"
+                                + " ASM has prevented creating one.  Operation may not work correctly.");
+                }
+            }
+            return wrapperBeans;
+        }
         for (OperationInfo opInfo : interfaceInfo.getOperations()) {
-            if (opInfo.isUnwrappedCapable()
-                && (opInfo.getUnwrappedOperation()
-                    .getProperty(ReflectionServiceFactoryBean.WRAPPERGEN_NEEDED) != null)) {
+            if (opInfo.isUnwrappedCapable()) {
                 Method method = (Method)opInfo.getProperty(ReflectionServiceFactoryBean.METHOD);
-                MessageInfo messageInfo = opInfo.getUnwrappedOperation().getInput();
-                Class requestWrapperClass = createWrapperClass(messageInfo, method, true);
-                opInfo.getInput().getMessageParts().get(0).setTypeClass(requestWrapperClass);
-                messageInfo = opInfo.getUnwrappedOperation().getOutput();
+                if (method == null) {
+                    continue;
+                }
+                MessagePartInfo inf = opInfo.getInput().getMessageParts().get(0);
+                if (inf.getTypeClass() == null) {
+                    MessageInfo messageInfo = opInfo.getUnwrappedOperation().getInput();
+                    createWrapperClass(inf,
+                                       messageInfo, 
+                                       method, 
+                                       true);
+                }
+                MessageInfo messageInfo = opInfo.getUnwrappedOperation().getOutput();
                 if (messageInfo != null) {
-                    Class responseWrapperClass = createWrapperClass(messageInfo, method, false);
-                    opInfo.getOutput().getMessageParts().get(0).setTypeClass(responseWrapperClass);
+                    inf = opInfo.getOutput().getMessageParts().get(0);
+                    if (inf.getTypeClass() == null) {
+                        createWrapperClass(inf,
+                                           messageInfo, 
+                                           method, 
+                                           false);
+                    }
                 }
-
-
             }
         }
         return wrapperBeans;
     }
 
-    private Class<?> createWrapperClass(MessageInfo messageInfo, Method method, boolean isRequest) {
+    private void createWrapperClass(MessagePartInfo wrapperPart,
+                                        MessageInfo messageInfo,
+                                        Method method, 
+                                        boolean isRequest) {
 
         QName wrapperElement = messageInfo.getName();
 
@@ -122,6 +159,19 @@
         if (!isRequest) {
             className = className + "Response";
         }
+        String pname = getPackageName(method) + ".jaxws.package-info";
+        Class<?> def = findClass(pname, method.getDeclaringClass());
+        if (def == null) {
+            generatePackageInfo(pname, wrapperElement.getNamespaceURI(),
+                                method.getDeclaringClass());
+        }
+        
+        def = findClass(className, method.getDeclaringClass());
+        if (def != null) {
+            wrapperPart.setTypeClass(def);
+            wrapperBeans.add(def);
+            return;
+        }
         String classFileName = periodToSlashes(className);
         cw.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, classFileName, null,
                  "java/lang/Object", null);
@@ -161,13 +211,32 @@
         cw.visitEnd();
 
         Class<?> clz = loadClass(className, method.getDeclaringClass(), cw.toByteArray());
-        messageInfo.getMessagePart(0).setTypeClass(clz);
+        wrapperPart.setTypeClass(clz);
         wrapperBeans.add(clz);
-        return clz;
+    }
+
+    private void generatePackageInfo(String className, String ns, Class clz) {
+        ClassWriter cw = createClassWriter();
+        String classFileName = periodToSlashes(className);
+        cw.visit(Opcodes.V1_5, Opcodes.ACC_ABSTRACT + Opcodes.ACC_INTERFACE, classFileName, null,
+                 "java/lang/Object", null);
+        
+        
+        AnnotationVisitor av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;", true);
+        av0.visit("namespace", ns);
+        av0.visitEnum("elementFormDefault",
+                      getClassCode(XmlNsForm.class),
+                      qualified ? "QUALIFIED" : "UNQUALIFIED");
+        av0.visitEnd();
+        cw.visitEnd();
 
+        loadClass(className, clz, cw.toByteArray());
     }
 
     private void generateMessagePart(ClassWriter cw, MessagePartInfo mpi, Method method, String className) {
+        if (Boolean.TRUE.equals(mpi.getProperty(ReflectionServiceFactoryBean.HEADER))) {
+            return;
+        }
         String classFileName = periodToSlashes(className);
         String name = mpi.getName().getLocalPart();
         Class clz = mpi.getTypeClass();
@@ -177,7 +246,8 @@
         }
         Class genericTypeClass = null;
         Type genericType = (Type)mpi.getProperty(ReflectionServiceFactoryBean.GENERIC_TYPE);
-        if (genericType instanceof ParameterizedType) {
+        if (genericType instanceof ParameterizedType
+            && Collection.class.isAssignableFrom(clz)) {
             ParameterizedType ptype = (ParameterizedType)genericType;
 
             Type[] types = ptype.getActualTypeArguments();
@@ -189,7 +259,8 @@
         String classCode = getClassCode(clz);
 
         String filedDescriptor = null;
-        if (genericTypeClass != null) {
+        if (genericTypeClass != null
+            && Collection.class.isAssignableFrom(clz)) {
             filedDescriptor = classCode.substring(0, classCode.lastIndexOf(";")) + "<"
                               + getClassCode(genericTypeClass) + ">;";
         }
@@ -199,7 +270,6 @@
                                         classCode, filedDescriptor, null);
         AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true);
         av0.visit("name", name);
-        av0.visit("namespace", "");
         av0.visitEnd();
 
         List<Annotation> jaxbAnnos = getJaxbAnnos(mpi);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Fri Feb  8 20:03:02 2008
@@ -24,6 +24,7 @@
 import java.lang.reflect.Type;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -52,6 +53,7 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JAXWSMethodDispatcher;
 import org.apache.cxf.jaxws.WrapperClassGenerator;
 import org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor;
@@ -467,9 +469,13 @@
     }
     
     private Set<Class<?>> generatedWrapperBeanClass() {
-        ServiceInfo serviceInfo = getService().getServiceInfos().get(0);
-        WrapperClassGenerator wrapperGen = new WrapperClassGenerator(serviceInfo.getInterface());
-        return wrapperGen.generate();
+        if (getDataBinding() instanceof JAXBDataBinding) {
+            ServiceInfo serviceInfo = getService().getServiceInfos().get(0);
+            WrapperClassGenerator wrapperGen = new WrapperClassGenerator(serviceInfo.getInterface(),
+                                                                         getQualifyWrapperSchema());
+            return wrapperGen.generate();            
+        }
+        return Collections.emptySet();
     }
 
     @Override

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ASMHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ASMHelper.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ASMHelper.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/util/ASMHelper.java Fri Feb  8 20:03:02 2008
@@ -23,13 +23,18 @@
 import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.cxf.common.util.WeakIdentityHashMap;
 import org.objectweb.asm.ClassWriter;
 
 public class ASMHelper {
     protected static final Map<Class<?>, String> PRIMITIVE_MAP = new HashMap<Class<?>, String>();
     protected static final Map<Class<?>, String> NONPRIMITIVE_MAP = new HashMap<Class<?>, String>();
     
+    protected static final Map<Class<?>, TypeHelperClassLoader> LOADER_MAP 
+        = new WeakIdentityHashMap<Class<?>, TypeHelperClassLoader>();
+    
     protected static boolean oldASM;
     
     static {
@@ -127,16 +132,51 @@
     
     
     public Class<?> loadClass(String className, Class clz , byte[] bytes) { 
-        TypeHelperClassLoader loader = new TypeHelperClassLoader(clz.getClassLoader());
+        TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);
         return loader.defineClass(className, bytes);
     }
+    public Class<?> findClass(String className, Class clz) { 
+        TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);
+        return loader.lookupDefinedClass(className);
+    }
+    
+    private static synchronized TypeHelperClassLoader getTypeHelperClassLoader(Class<?> l) {
+        TypeHelperClassLoader ret = LOADER_MAP.get(l);
+        if (ret == null) {
+            ret = new TypeHelperClassLoader(l.getClassLoader());
+            LOADER_MAP.put(l, ret);
+        }
+        return ret;
+    }
     
     public static class TypeHelperClassLoader extends ClassLoader {
+        Map<String, Class<?>> defined = new ConcurrentHashMap<String, Class<?>>();
+        
         TypeHelperClassLoader(ClassLoader parent) {
             super(parent);
         }
+        public Class<?> lookupDefinedClass(String name) {
+            return defined.get(name);
+        }
+        
         public Class<?> defineClass(String name, byte bytes[]) {
-            return super.defineClass(name, bytes, 0, bytes.length);
+            if (name.endsWith("package-info")) {
+                Package p = super.getPackage(name.substring(0, name.length() - 13));
+                if (p == null) {
+                    definePackage(name.substring(0, name.length() - 13),
+                                    null,
+                                    null,
+                                    null, 
+                                    null,
+                                    null,
+                                    null,
+                                    null);
+                }
+            }
+            
+            Class<?> ret = super.defineClass(name, bytes, 0, bytes.length);
+            defined.put(name, ret);
+            return ret;
         }
     }
     

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java Fri Feb  8 20:03:02 2008
@@ -22,7 +22,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Set;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -34,6 +33,7 @@
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.junit.After;
 import org.junit.Assert;
@@ -57,18 +57,9 @@
         ServiceInfo serviceInfo =  service.getServiceInfos().get(0);
         
         InterfaceInfo interfaceInfo = serviceInfo.getInterface();
-        WrapperClassGenerator wrapperClassGenerator = new WrapperClassGenerator(interfaceInfo);
-        Set<Class<?>> wrapperClassSet = wrapperClassGenerator.generate();
-        assertEquals(2, wrapperClassSet.size());
-
-        Class[] wrapperClasses = wrapperClassSet.toArray(new Class[]{});
-        Class requestClass = wrapperClasses[0];
-        Class responseClass = wrapperClasses[1];
-        if (!requestClass.getSimpleName().equals("AddNumbers")) {
-            Class tmp = requestClass;
-            requestClass = responseClass;
-            responseClass = tmp;
-        }
+        OperationInfo inf = interfaceInfo.getOperations().iterator().next();
+        Class requestClass = inf.getInput().getMessagePart(0).getTypeClass();
+        Class responseClass = inf.getOutput().getMessagePart(0).getTypeClass();
                         
         // Create request wrapper Object
         List<String> partNames = Arrays.asList(new String[] {"arg0"});
@@ -107,7 +98,7 @@
         resPara.add(intValueList);
         Object responseObj = wh.createWrapperObject(resPara);
               
-        JAXBContext jaxbContext = JAXBContext.newInstance(wrapperClasses);
+        JAXBContext jaxbContext = JAXBContext.newInstance(requestClass, responseClass);
         java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
         Marshaller marshaller = jaxbContext.createMarshaller();
         

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java Fri Feb  8 20:03:02 2008
@@ -35,7 +35,7 @@
 import org.junit.Test;
 
 public class HolderTest extends AbstractJaxWsTest {
-    private final String address = "http://localhost:9000/HolderService";
+    private final String address = "local://localhost:9000/HolderService";
 
     @Override
     protected Bus createBus() throws BusException {

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Fri Feb  8 20:03:02 2008
@@ -735,9 +735,12 @@
         op.setProperty(m.getClass().getName(), m);
         op.setProperty("action", getAction(op, m));
         op.setProperty(METHOD_ANNOTATIONS, m.getAnnotations());
+        op.setProperty(METHOD_PARAM_ANNOTATIONS, m.getParameterAnnotations());
 
         if (isWrapped(m)) {
             UnwrappedOperationInfo uOp = new UnwrappedOperationInfo(op);
+            uOp.setProperty(METHOD_ANNOTATIONS, m.getAnnotations());
+            uOp.setProperty(METHOD_PARAM_ANNOTATIONS, m.getParameterAnnotations());
             op.setUnwrappedOperation(uOp);
 
             createMessageParts(intf, uOp, m);
@@ -1283,6 +1286,7 @@
                     part.setProperty(ELEMENT_NAME, q2);
                 }
                 part.setProperty(METHOD_ANNOTATIONS, method.getAnnotations());
+                part.setProperty(PARAM_ANNOTATION, method.getAnnotations());
                 if (isHeader(method, -1)) {
                     part.setProperty(HEADER, Boolean.TRUE);
                     if (isRPC(method) || !isWrapped(method)) {
@@ -1316,6 +1320,8 @@
                     }
 
                     MessagePartInfo part = outMsg.addMessagePart(q);
+                    part.setProperty(METHOD_PARAM_ANNOTATIONS, method.getParameterAnnotations());
+                    part.setProperty(PARAM_ANNOTATION, method.getParameterAnnotations()[j]);
                     initializeParameter(part, paramClasses[j], method.getGenericParameterTypes()[j]);
                     part.setIndex(j + 1);
 
@@ -1344,7 +1350,6 @@
 
     protected void createInputWrappedMessageParts(OperationInfo op, Method method, MessageInfo inMsg) {
         MessagePartInfo part = inMsg.addMessagePart("parameters");
-        part.setIndex(0);
         part.setElement(true);
         for (Iterator itr = serviceConfigurations.iterator(); itr.hasNext();) {
             AbstractServiceConfiguration c = (AbstractServiceConfiguration)itr.next();
@@ -1364,13 +1369,28 @@
             part.setProperty("REQUEST.WRAPPER.CLASSNAME", getRequestWrapperClassName(method));
         }
 
+        int partIdx = 0;
+        int maxIdx = 0;
         for (MessagePartInfo mpart : op.getInput().getMessageParts()) {
             if (Boolean.TRUE.equals(mpart.getProperty(HEADER))) {
                 int idx = mpart.getIndex();
                 inMsg.addMessagePart(mpart);
                 mpart.setIndex(idx);
+                
+                //make sure the header part and the wrapper part don't share the 
+                //same index.   We can move the wrapper part around a bit 
+                //if need be
+                if (maxIdx < idx) {
+                    maxIdx = idx;
+                }
+                if (idx == partIdx) {
+                    maxIdx++;
+                    partIdx = maxIdx;
+                }
             }
         }
+        part.setIndex(partIdx);
+
     }
 
     protected void createOutputWrappedMessageParts(OperationInfo op, Method method, MessageInfo outMsg) {

Modified: incubator/cxf/trunk/rt/javascript/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/pom.xml?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/pom.xml (original)
+++ incubator/cxf/trunk/rt/javascript/pom.xml Fri Feb  8 20:03:02 2008
@@ -104,29 +104,6 @@
         <dependency>
             <groupId>jaxen</groupId>
             <artifactId>jaxen</artifactId>
-            <version>1.1</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>dom4j</artifactId>
-                    <groupId>dom4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xmlParserAPIs</artifactId>
-                    <groupId>xerces</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xercesImpl</artifactId>
-                    <groupId>xerces</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>xom</artifactId>
-                    <groupId>xom</groupId>
-                </exclusion>
-                 <exclusion>
-                    <artifactId>xalan</artifactId>
-                    <groupId>xalan</groupId>
-                </exclusion>                 
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java Fri Feb  8 20:03:02 2008
@@ -22,8 +22,14 @@
 import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.logging.Logger;
 
+import javax.xml.xpath.XPathConstants;
+
+import org.w3c.dom.Document;
+
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.methods.FileRequestEntity;
 import org.apache.commons.httpclient.methods.PostMethod;
@@ -36,6 +42,8 @@
 import org.apache.cxf.customer.book.GetAnotherBook;
 import org.apache.cxf.customer.book.GetBook;
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
@@ -111,12 +119,20 @@
         InputStream in = url.openStream();
         assertNotNull(in);           
 
-        InputStream expected = getClass()
-            .getResourceAsStream("resources/expected_get_book123_xmlwrapped.txt");
-
-        String expectedString = getStringFromInputStream(expected).trim();
-        //System.out.println("---" + getStringFromInputStream(in));
-        assertEquals(expectedString, expectedString, getStringFromInputStream(in)); 
+        Map<String, String> ns = new HashMap<String, String>();
+        ns.put("a1", "http://book.acme.com");
+        ns.put("a2", "http://book.customer.cxf.apache.org/");
+        Document doc = XMLUtils.parse(in);
+        XPathUtils xp = new XPathUtils(ns);
+        assertTrue(xp.isExist("/a2:getBookResponse", doc.getDocumentElement(), XPathConstants.NODE));
+        assertTrue(xp.isExist("/a2:getBookResponse/a2:Book", doc.getDocumentElement(), XPathConstants.NODE));
+        assertTrue(xp.isExist("/a2:getBookResponse/a2:Book/a1:id",
+                              doc.getDocumentElement(), XPathConstants.NODE));
+        assertEquals("123", xp.getValue("/a2:getBookResponse/a2:Book/a1:id",
+                                       doc.getDocumentElement(), XPathConstants.STRING));
+        assertEquals("CXF in Action", xp.getValue("/a2:getBookResponse/a2:Book/a1:name",
+                                        doc.getDocumentElement(), XPathConstants.STRING));
+        
     }
     
     @Test

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java Fri Feb  8 20:03:02 2008
@@ -33,6 +33,7 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
@@ -206,24 +207,19 @@
                                             expectedTag.getName().toString(), 
                                             sourceTag.getName().toString());
             }
-            for (QName attr : expectedTag.getAttributes()) {
-                if (ignoreAttr.contains(attr.getNamespaceURI())) {
+            for (Map.Entry<QName, String> attr : expectedTag.getAttributes().entrySet()) {
+                if (ignoreAttr.contains(attr.getKey().getLocalPart())) {
                     continue;
                 }
 
-                boolean found = false;
-                for (QName attr2 : sourceTag.getAttributes()) {
-                    if (attr2.getNamespaceURI().equals(attr.getNamespaceURI())) {
-                        if (attr2.getLocalPart().equals(attr.getLocalPart())) {
-                            found = true;
-                        } else {
-                            throw new ComparisonFailure("Attributes not equal: ", 
-                                                        attr.toString(), 
-                                                        attr2.toString());
-                        }
+                if (sourceTag.getAttributes().containsKey(attr.getKey())) {
+                    if (!sourceTag.getAttributes().get(attr.getKey()).equals(attr.getValue())) {
+                        throw new ComparisonFailure("Attributes not equal: ", 
+                                                attr.getKey() + ":" + attr.getValue(), 
+                                                attr.getKey() + ":" 
+                                                + sourceTag.getAttributes().get(attr.getKey()).toString());
                     }
-                }
-                if (!found) {
+                } else {
                     throw new AssertionError("Attribute: " + attr + " is missing in the source file.");
                 }
             }
@@ -242,27 +238,22 @@
         assertTagEquals(expected, source, DEFAULT_IGNORE_ATTR, DEFAULT_IGNORE_TAG);
     }
 
-    protected void assertAttributesEquals(Collection<QName> q1, Collection<QName> q2, 
+    protected void assertAttributesEquals(Map<QName, String> q1,
+                                          Map<QName, String> q2, 
                                           Collection<String> ignoreAttr) {
-        for (QName attr : q1) {
-            if (ignoreAttr.contains(attr.getNamespaceURI())) {
+        for (Map.Entry<QName, String>  attr : q1.entrySet()) {
+            if (ignoreAttr.contains(attr.getKey().getLocalPart())) {
                 continue;
             }
-            boolean found = false;
-
-            for (QName attr2 : q2) {
-                if (attr2.getNamespaceURI().equals(attr.getNamespaceURI())) {
-                    if (attr2.getLocalPart().equals(attr.getLocalPart())) {
-                        found = true;
-                    } else {
-                        throw new ComparisonFailure("Attribute not equal: ", 
-                                                    attr.toString(), 
-                                                    attr2.toString());
-                    }
-                }
-            }
-            if (!found) {
-                throw new AssertionError("Attribute: " + attr + " is missing.");
+            
+            String found = q2.get(attr.getKey());
+            if (found == null) {
+                throw new AssertionError("Attribute: " + attr.getKey() + " is missing.");                
+            }
+            if (!found.equals(attr.getValue())) {
+                throw new ComparisonFailure("Attribute not equal: ", 
+                                            attr.getKey() + ":" + attr.getValue(), 
+                                            attr.getKey() + ":" + found); 
             }
         }
     }

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/Tag.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/Tag.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/Tag.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/Tag.java Fri Feb  8 20:03:02 2008
@@ -20,14 +20,14 @@
 package org.apache.cxf.tools.common;
 
 import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.HashMap;
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 import javax.xml.namespace.QName;
 
 public class Tag {
     QName name;
-    Set<QName> attributes;
+    Map<QName, String> attributes;
     String text;
 
     List<Tag> tags;
@@ -74,9 +74,9 @@
         this.name = nName;
     }
 
-    public Set<QName> getAttributes() {
+    public Map<QName, String> getAttributes() {
         if (attributes == null) {
-            attributes = new HashSet<QName>();
+            attributes = new HashMap<QName, String>();
         }
         return attributes;
     }
@@ -94,10 +94,10 @@
         StringBuffer sb = new StringBuffer();
         sb.append(tag.getName().getLocalPart());
         sb.append(" ");
-        for (QName attr : tag.getAttributes()) {
-            sb.append(attr.getNamespaceURI());
+        for (Map.Entry<QName, String> attr : tag.getAttributes().entrySet()) {
+            sb.append(attr.getKey());
             sb.append("=\"");
-            sb.append(attr.getLocalPart());
+            sb.append(attr.getValue());
             sb.append("\" ");
         }
         return sb.toString().trim();
@@ -152,11 +152,14 @@
         if (!getName().equals(tag.getName())) {
             return false;
         }
-        for (QName attr : getAttributes()) {
-            if (getIgnoreAttr().contains(attr.getNamespaceURI())) {
+        for (QName attr : getAttributes().keySet()) {
+            if (getIgnoreAttr().contains(attr.getLocalPart())) {
                 continue;
             }
-            if (!tag.getAttributes().contains(attr)) {
+            if (!tag.getAttributes().containsKey(attr)) {
+                return false;
+            }
+            if (!tag.getAttributes().get(attr).equals(getAttributes().get(attr))) {
                 return false;
             }
         }

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/StAXUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/StAXUtil.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/StAXUtil.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/StAXUtil.java Fri Feb  8 20:03:02 2008
@@ -105,8 +105,8 @@
                 }
 
                 for (int i = 0; i < reader.getAttributeCount(); i++) {
-                    newTag.getAttributes().add(new QName(reader.getAttributeLocalName(i), 
-                                                         reader.getAttributeValue(i)));
+                    newTag.getAttributes().put(reader.getAttributeName(i), 
+                                               reader.getAttributeValue(i));
                 }
                 stack.push(newTag);
             }
@@ -162,8 +162,25 @@
                 }
 
                 for (int i = 0; i < reader.getAttributeCount(); i++) {
-                    newTag.getAttributes().add(new QName(reader.getAttributeLocalName(i), 
-                                                         reader.getAttributeValue(i)));
+                    if ("type".equals(reader.getAttributeLocalName(i))
+                        && "element".equals(reader.getLocalName())) {
+                        //probably a qname to a type, pull namespace in differently
+                        String tp = reader.getAttributeValue(i);
+                        if (tp.contains(":")) {
+                            String ns = tp.substring(0, tp.indexOf(":"));
+                            if ("tns".equals(ns)) {
+                                tp = tp.substring(tp.indexOf(":") + 1);
+                            } else {
+                                ns = reader.getNamespaceURI(ns);
+                                tp = "{" + ns + "}" + tp.substring(tp.indexOf(":") + 1);
+                            }
+                        }
+                        newTag.getAttributes().put(reader.getAttributeName(i), 
+                                                   tp);
+                    } else {
+                        newTag.getAttributes().put(reader.getAttributeName(i), 
+                                                   reader.getAttributeValue(i));
+                    }
                 }
 
                 newTag.setParent(currentTag);

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java Fri Feb  8 20:03:02 2008
@@ -72,7 +72,7 @@
     
     @Test
     public void testAegisBasic() throws Exception {
-        final String sei = "org.apache.cxf.tools.fortest.aegis2ws.TestAegisSEI";
+        final String sei = org.apache.cxf.tools.fortest.aegis2ws.TestAegisSEI.class.getName();
         String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/aegis.wsdl", "-verbose", "-d",
                                       output.getPath(), "-s", output.getPath(),
                                       "-frontend", "jaxws", "-databinding", "aegis",

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Fri Feb  8 20:03:02 2008
@@ -421,7 +421,7 @@
     //  TODO: should suppor the XmlMimeType annotation in the SEI
     public void testMimeTypeInSEI() throws Exception {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/send_image.wsdl");
-        env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.ImageSender");
+        env.put(ToolConstants.CFG_CLASSNAME, org.apache.cxf.tools.fortest.ImageSender.class.getName());
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         try {
             processor.setEnvironment(env);
@@ -572,10 +572,8 @@
 
         File wsdlFile = new File(output, "epr_schema1.xsd");
         assertTrue(wsdlFile.exists());
-        String expectedString = "schemaLocation=\"http://www.w3.org/2006/03/addressing/ws-addr.xsd\"";
         String xsd = getStringFromFile(wsdlFile);
-        assertTrue(xsd.indexOf(expectedString) != -1);
-        assertTrue(xsd.indexOf("ref=") == -1);
+        assertTrue(xsd, xsd.indexOf("ref=") == -1);
         
     }
 }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java Fri Feb  8 20:03:02 2008
@@ -53,7 +53,7 @@
         assertTrue(output.exists());
 
         String expectedFile = getClass().getResource("expected/stock_noanno_bare.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
 
 
@@ -68,7 +68,7 @@
         assertTrue(output.exists());
 
         String expectedFile = getClass().getResource("expected/stock_noanno_wrapped.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
 
 
@@ -87,7 +87,7 @@
         assertTrue(output.exists());
 
         String expectedFile = getClass().getResource("expected/stock_noanno_rpc.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
 
     private File getOutputFile(String fileName) {

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Fri Feb  8 20:03:02 2008
@@ -161,7 +161,7 @@
         assertTrue(output.exists());
 
         String expectedFile = this.getClass().getResource("expected/expected_holder.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
     
     @Test

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl?rev=620079&r1=620078&r2=620079&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl Fri Feb  8 20:03:02 2008
@@ -22,7 +22,7 @@
 <xsd:element minOccurs="0" name="arg1" type="xsd:string"/>
 </xsd:sequence>
 </xsd:complexType>
-<xsd:element name="header" type="xsd:string"/>
+<xsd:element name="header" nillable="true" type="xsd:string"/>
 <xsd:element name="echo3Response" type="tns:echo3Response"/>
 <xsd:complexType name="echo3Response">
 <xsd:sequence>



Mime
View raw message