cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r627095 [1/3] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/ rt/bindings/corba...
Date Tue, 12 Feb 2008 20:51:09 GMT
Author: dkulp
Date: Tue Feb 12 12:50:56 2008
New Revision: 627095

URL: http://svn.apache.org/viewvc?rev=627095&view=rev
Log:
Updates to get the entire build working (and tests passing) with Java 6 update 4

Added:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java   (with props)
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
    incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultInInterceptor.java
    incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/frontend/MethodDispatcher.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/GreeterClientTest.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitBare.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/WSDLToIDLTest.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.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/internal/jaxws/JaxwsServiceBuilderRPCTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java
    incubator/cxf/trunk/tools/wsdlto/frontend/javascript/src/main/java/org/apache/cxf/tools/wsdlto/javascript/JavaScriptContainer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305728/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305728/hello_world2.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305728/hello_world_types2.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305729/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305772/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305773/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug305924/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug321/hello_world_different_ns_service.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug321/hello_world_porttype.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug627/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug765/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug765/hello_world_ports.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-1344/handlerbinding.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1094/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1095/hello_world_bindings.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1095/hello_world_messages.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1095/hello_world_services.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1095/hello_world_wsdl_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1209/hello_world_fault.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf778/hello_world_recursive.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf778/hello_world_recursive_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf804/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf804/hello_world_contains_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf805/hello_world_with_typo.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf994/hello_world_async.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/doc_lit_bare.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello-mime-binding.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello-mime.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_addr.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_async.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_collision.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_doc_lit.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_doc_lit_router.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_doc_wrapped_bare.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_exclude.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_holder.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_jaxws_base.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_messages.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_rpc_lit.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_schema_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_enum_type.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_invalid_schema.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_wsdl_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/helloworld_noservice_import.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/helloworld_noservice_imported1.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/helloworld_noservice_imported2.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/helloworld_withnoservice.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/jms_test_rpc_fault.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/router.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/schema1.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/schema2.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/schema3.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/schema4.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/test_catalog_messages.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/test_catalog_replaceme.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/test_catalog_service.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/wrong_tns.wsdl

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java Tue Feb 12 12:50:56 2008
@@ -25,6 +25,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import javax.xml.namespace.QName;
 
@@ -34,8 +35,8 @@
     QName name;
     String targetNamespace;
     InterfaceInfo intf;
-    Map<QName, BindingInfo> bindings = new ConcurrentHashMap<QName, BindingInfo>(2);
-    Map<QName, EndpointInfo> endpoints = new ConcurrentHashMap<QName, EndpointInfo>(2);
+    List<BindingInfo> bindings = new CopyOnWriteArrayList<BindingInfo>();
+    List<EndpointInfo> endpoints = new CopyOnWriteArrayList<EndpointInfo>();
     Map<QName, MessageInfo> messages;
     List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(4);
     private SchemaCollection xmlSchemaCollection;
@@ -70,24 +71,42 @@
     }
 
     public BindingInfo getBinding(QName qn) {
-        return bindings.get(qn);
+        for (BindingInfo bi : bindings) {
+            if (qn.equals(bi.getName())) {
+                return bi;
+            }
+        }
+        return null;
     }
     public void addBinding(BindingInfo binding) {
-        bindings.put(binding.getName(), binding);
+        BindingInfo bi = getBinding(binding.getName());
+        if (bi != null) {
+            bindings.remove(bi);
+        }
+        bindings.add(binding);
     }
     public EndpointInfo getEndpoint(QName qn) {
-        return endpoints.get(qn);
+        for (EndpointInfo ei : endpoints) {
+            if (qn.equals(ei.getName())) {
+                return ei;
+            }
+        }
+        return null;
     }
     public void addEndpoint(EndpointInfo ep) {
-        endpoints.put(ep.getName(), ep);
+        EndpointInfo ei = getEndpoint(ep.getName());
+        if (ei != null) {
+            endpoints.remove(ei);
+        }
+        endpoints.add(ep);
     }
 
     public Collection<EndpointInfo> getEndpoints() {
-        return Collections.unmodifiableCollection(endpoints.values());
+        return Collections.unmodifiableCollection(endpoints);
     }
 
     public Collection<BindingInfo> getBindings() {
-        return Collections.unmodifiableCollection(bindings.values());
+        return Collections.unmodifiableCollection(bindings);
     }
 
     public Map<QName, MessageInfo> getMessages() {

Modified: incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original)
+++ incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Tue Feb 12 12:50:56 2008
@@ -156,7 +156,7 @@
         StringBuffer buf = new StringBuffer();
 
         try {
-            urlList.add(classesDir.toURL());
+            urlList.add(classesDir.toURI().toURL());
         } catch (MalformedURLException e) {
             //ignore
         }
@@ -170,7 +170,7 @@
             try {
                 if (a.getFile() != null
                     && a.getFile().exists()) {
-                    urlList.add(a.getFile().toURL());
+                    urlList.add(a.getFile().toURI().toURL());
                     buf.append(a.getFile().getAbsolutePath());
                     buf.append(File.pathSeparatorChar);
                     //System.out.println("     " + a.getFile().getAbsolutePath());

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java Tue Feb 12 12:50:56 2008
@@ -273,8 +273,8 @@
         int keyIndex = location.indexOf('/');
         String key = location.substring(keyIndex + 1);
         try {
-            Class bootMgrHelperClass = Class.forName("org.apache.yoko.orb.OB.BootManagerHelper");
-            Class bootMgrClass = Class.forName("org.apache.yoko.orb.OB.BootManager");
+            Class<?> bootMgrHelperClass = Class.forName("org.apache.yoko.orb.OB.BootManagerHelper");
+            Class<?> bootMgrClass = Class.forName("org.apache.yoko.orb.OB.BootManager");
             Method narrowMethod =
                 bootMgrHelperClass.getMethod("narrow", org.omg.CORBA.Object.class);
             Object bootMgr = narrowMethod.invoke(null, orb.resolve_initial_references("BootManager"));

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultInInterceptor.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultInInterceptor.java Tue Feb 12 12:50:56 2008
@@ -104,9 +104,9 @@
 
                 Object e = reader.read(fault.getMessageParts().get(0), streamReader);
                 if (!(e instanceof Exception)) {
-                    Class exClass = fault.getProperty(Class.class.getName(), Class.class);
+                    Class<?> exClass = fault.getProperty(Class.class.getName(), Class.class);
                     if (exClass != null) {
-                        Class beanClass = e.getClass();
+                        Class<?> beanClass = e.getClass();
                         Constructor constructor =
                             exClass.getConstructor(new Class[]{String.class, beanClass});
                         e = constructor.newInstance(new Object[]{"", e});

Modified: incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java Tue Feb 12 12:50:56 2008
@@ -98,7 +98,7 @@
             Method m = md.getMethod(bop);
             
             try {
-                Class c = (Class) service.get(ReflectionServiceFactoryBean.ENDPOINT_CLASS);
+                Class<?> c = (Class) service.get(ReflectionServiceFactoryBean.ENDPOINT_CLASS);
                 if (c != null) {
                     m = c.getMethod(m.getName(), m.getParameterTypes());
                 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/frontend/MethodDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/frontend/MethodDispatcher.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/frontend/MethodDispatcher.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/frontend/MethodDispatcher.java Tue Feb 12 12:50:56 2008
@@ -22,6 +22,7 @@
 
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.OperationInfo;
 
 /**
  * Provides functionality to map BindingOperations to Methods and
@@ -31,4 +32,7 @@
     Method getMethod(BindingOperationInfo op);
     
     BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint);
+    
+    void bind(OperationInfo o, Method... methods);
+
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java (original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java Tue Feb 12 12:50:56 2008
@@ -191,7 +191,7 @@
     protected Object createFromFault(Context context)
         throws SecurityException, InstantiationException,
         IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-        Class clazz = getTypeClass();
+        Class<?> clazz = getTypeClass();
         Constructor ctr;
         Object o;
 

Modified: incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml Tue Feb 12 12:50:56 2008
@@ -68,7 +68,11 @@
              <version>0.4</version>
          </dependency>
          <dependency>
-         <groupId>org.apache.abdera</groupId>
+             <groupId>jaxen</groupId>
+             <artifactId>jaxen</artifactId>
+         </dependency>
+         <dependency>
+           <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-core</artifactId>
             <version>0.3.0-incubating</version>
          </dependency>

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java?rev=627095&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java Tue Feb 12 12:50:56 2008
@@ -0,0 +1,62 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.jaxws;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.frontend.MethodDispatcher;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
+import org.apache.cxf.service.factory.ServiceConstructionException;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.OperationInfo;
+
+public class JAXWSProviderMethodDispatcher implements MethodDispatcher {
+
+    Method invoke;
+    
+    public JAXWSProviderMethodDispatcher(JaxWsImplementorInfo implInfo) {
+        Type[] genericInterfaces = implInfo.getImplementorClass().getGenericInterfaces();
+        ParameterizedType pt = (ParameterizedType)genericInterfaces[0];
+        Class c = (Class)pt.getActualTypeArguments()[0];
+        try {
+            invoke = implInfo.getImplementorClass().getMethod("invoke", c);
+        } catch (Exception e) {
+            throw new ServiceConstructionException(e);
+        }
+    }
+
+    public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Method getMethod(BindingOperationInfo op) {
+        return invoke;
+    }
+
+    public void bind(OperationInfo o, Method... methods) {
+        // TODO Auto-generated method stub
+    }
+
+    
+}

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSProviderMethodDispatcher.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java Tue Feb 12 12:50:56 2008
@@ -55,7 +55,7 @@
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.source.NodeDataReader;
 import org.apache.cxf.databinding.source.XMLStreamDataReader;
-import org.apache.cxf.endpoint.Endpoint;
+//import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XMLUtils;
@@ -72,9 +72,9 @@
 import org.apache.cxf.message.MessageContentsList;
 import org.apache.cxf.message.XMLMessage;
 import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.MessageInfo;
-import org.apache.cxf.service.model.MessagePartInfo;
+//import org.apache.cxf.service.model.BindingOperationInfo;
+//import org.apache.cxf.service.model.MessageInfo;
+//import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.staxutils.StaxUtils;
 
 public class DispatchInDatabindingInterceptor extends AbstractInDatabindingInterceptor {
@@ -92,16 +92,19 @@
 
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();     
+        /*
         Endpoint ep = ex.get(Endpoint.class);
         MessageInfo info = message.get(MessageInfo.class);
         if (ep.getEndpointInfo().getBinding().getOperations().iterator().hasNext()) {
             BindingOperationInfo bop = ep.getEndpointInfo().getBinding().getOperations().iterator().next();
             ex.put(BindingOperationInfo.class, bop);
             info = getMessageInfo(message, bop);
-        }      
+        } 
+        */     
         
         if (isGET(message)) {
-            MessageContentsList params = new MessageContentsList();          
+            MessageContentsList params = new MessageContentsList();
+            /*
             if (info != null) {
                 for (MessagePartInfo i : info.getMessageParts()) {
                     params.put(i, null);
@@ -109,6 +112,8 @@
             } else {
                 params.add(null);
             }
+            */
+            params.add(null);
             message.setContent(List.class, params);
             LOG.info("DispatchInInterceptor skipped in HTTP GET method");
             return;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java Tue Feb 12 12:50:56 2008
@@ -332,7 +332,6 @@
                         }
                         SOAPMessage msg = msgFactory.createMessage();
                         msg.getSOAPPart().setContent(source);
-                        msg.saveChanges();
                         if (message.getAttachments() != null) {
                             for (Attachment att : message.getAttachments()) {
                                 AttachmentPart part = msg.createAttachmentPart(att.getDataHandler());
@@ -346,6 +345,7 @@
                                 msg.addAttachmentPart(part);
                             }
                         }
+                        msg.saveChanges();
                         obj = msg;                    
                     } catch (Exception e) {
                         e.printStackTrace();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java Tue Feb 12 12:50:56 2008
@@ -130,8 +130,8 @@
     private Object createFaultInfoBean(WebFault fault, Throwable cause) {
         if (!StringUtils.isEmpty(fault.faultBean())) {
             try {
-                Class cls = ClassLoaderUtils.loadClass(fault.faultBean(),
-                                                       cause.getClass());
+                Class<?> cls = ClassLoaderUtils.loadClass(fault.faultBean(),
+                                                          cause.getClass());
                 if (cls != null) {
                     Object ret = cls.newInstance();
                     //copy props

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=627095&r1=627094&r2=627095&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 Tue Feb 12 12:50:56 2008
@@ -55,6 +55,7 @@
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JAXWSMethodDispatcher;
+import org.apache.cxf.jaxws.JAXWSProviderMethodDispatcher;
 import org.apache.cxf.jaxws.WrapperClassGenerator;
 import org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor;
 import org.apache.cxf.jaxws.interceptors.DispatchOutDatabindingInterceptor;
@@ -367,6 +368,7 @@
             getServiceConfigurations().add(0, jaxWsConfiguration);
             setWrapped(false);
             setDataBinding(new SourceDataBinding());
+            setMethodDispatcher(new JAXWSProviderMethodDispatcher(implInfo));
         } else {
             jaxWsConfiguration = new JaxWsServiceConfiguration();
             jaxWsConfiguration.setServiceFactory(this);
@@ -379,10 +381,9 @@
                     setQualifyWrapperSchema(true);
                 }
             }
+            setMethodDispatcher(new JAXWSMethodDispatcher(implInfo));
         }
-        loadWSFeatureAnnotation(ii.getSEIClass(), ii.getImplementorClass());
-        setMethodDispatcher(new JAXWSMethodDispatcher(implInfo));
-        
+        loadWSFeatureAnnotation(ii.getSEIClass(), ii.getImplementorClass());        
     }
 
     public List<WebServiceFeature> getWsFeatures() {

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=627095&r1=627094&r2=627095&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 Tue Feb 12 12:50:56 2008
@@ -144,7 +144,7 @@
     private Executor executor;
     private List<String> ignoredClasses = new ArrayList<String>();
     private List<Method> ignoredMethods = new ArrayList<Method>();
-    private SimpleMethodDispatcher methodDispatcher = new SimpleMethodDispatcher();
+    private MethodDispatcher methodDispatcher = new SimpleMethodDispatcher();
     private Boolean wrappedStyle;
     private Map<String, Object> properties;
     private QName endpointName;
@@ -1870,10 +1870,10 @@
         return null;
     }
 
-    protected SimpleMethodDispatcher getMethodDispatcher() {
+    protected MethodDispatcher getMethodDispatcher() {
         return methodDispatcher;
     }
-    protected void setMethodDispatcher(SimpleMethodDispatcher m) {
+    protected void setMethodDispatcher(MethodDispatcher m) {
         methodDispatcher = m;
     }
 

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java Tue Feb 12 12:50:56 2008
@@ -47,7 +47,7 @@
         File staticFile = new File(this.getClass().getResource("test.html").toURI());
         staticFile = staticFile.getParentFile();
         staticFile = staticFile.getAbsoluteFile();
-        URL furl = staticFile.toURL();
+        URL furl = staticFile.toURI().toURL();
         return furl.toString();
     }
 

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/GreeterClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/GreeterClientTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/GreeterClientTest.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/GreeterClientTest.java Tue Feb 12 12:50:56 2008
@@ -84,7 +84,7 @@
         File staticFile = new File(this.getClass().getResource("test.html").toURI());
         staticFile = staticFile.getParentFile();
         staticFile = staticFile.getAbsoluteFile();
-        URL furl = staticFile.toURL();
+        URL furl = staticFile.toURI().toURL();
         return furl.toString();
     }
 

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java Tue Feb 12 12:50:56 2008
@@ -133,7 +133,7 @@
         File staticFile = new File(this.getClass().getResource("test.html").toURI());
         staticFile = staticFile.getParentFile();
         staticFile = staticFile.getAbsoluteFile();
-        URL furl = staticFile.toURL();
+        URL furl = staticFile.toURI().toURL();
         return furl.toString();
     }
 }

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitBare.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitBare.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitBare.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitBare.java Tue Feb 12 12:50:56 2008
@@ -34,10 +34,10 @@
     String basicTypeFunctionReturnString(@WebParam(name = "s") String s, 
                                          @WebParam(name = "i") int i, 
                                          @WebParam(name = "d") double d);
-    
+    /*
     @WebMethod
     TestBean1 functionReturnTestBean1();
-    
+    */
     @WebMethod
     int basicTypeFunctionReturnInt(@WebParam(name = "s") String s, 
                                    @WebParam(name = "d") double d);
@@ -52,7 +52,7 @@
     @WebMethod(action = "lightsCamera") 
     String actionMethod(@WebParam(name = "stringParam") String param);
     
-    @WebMethod
+    @WebMethod(action = "compliantNoArgs")
     TestBean2 compliantNoArgs();
     
     @Oneway

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Tue Feb 12 12:50:56 2008
@@ -150,7 +150,7 @@
         File staticFile = new File(this.getClass().getResource("test.html").toURI());
         staticFile = staticFile.getParentFile();
         staticFile = staticFile.getAbsoluteFile();
-        URL furl = staticFile.toURL();
+        URL furl = staticFile.toURI().toURL();
         return furl.toString();
     }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java Tue Feb 12 12:50:56 2008
@@ -58,6 +58,7 @@
         AttachmentPart ap2 = msg.createAttachmentPart();
         ap2.setContent("Attachment content - Part 2", "text/plain");
         msg.addAttachmentPart(ap2);
+        msg.saveChanges();
         
         SOAPConnection con = conFac.createConnection();
         URL endpoint = new URL("http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Tue Feb 12 12:50:56 2008
@@ -19,6 +19,9 @@
 package org.apache.cxf.systest.servlet;
 
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.w3c.dom.Document;
 
 import com.meterware.httpunit.GetMethodWebRequest;
@@ -89,17 +92,28 @@
         
         WebLink[] links = res.getLinks();
         assertEquals("There should get two links for the service", 2, links.length);
-        assertEquals(CONTEXT_URL + "/services/greeter?wsdl", links[0].getURLString());       
-        assertEquals(CONTEXT_URL + "/services/greeter2?wsdl", links[1].getURLString()); 
+        
+        Set<String> links2 = new HashSet<String>();
+        for (WebLink l : links) {
+            links2.add(l.getURLString());
+        }
+        
+        assertTrue(links2.contains(CONTEXT_URL + "/services/greeter?wsdl"));       
+        assertTrue(links2.contains(CONTEXT_URL + "/services/greeter2?wsdl")); 
         assertEquals("text/html", res.getContentType());
         
         res = client.getResponse(CONTEXT_URL + "/services/");
        
         
         links = res.getLinks();
+        links2.clear();
+        for (WebLink l : links) {
+            links2.add(l.getURLString());
+        }
+        
         assertEquals("There should get two links for the service", 2, links.length);
-        assertEquals(CONTEXT_URL + "/services/greeter?wsdl", links[0].getURLString());
-        assertEquals(CONTEXT_URL + "/services/greeter2?wsdl", links[1].getURLString()); 
+        assertTrue(links2.contains(CONTEXT_URL + "/services/greeter?wsdl"));       
+        assertTrue(links2.contains(CONTEXT_URL + "/services/greeter2?wsdl")); 
         
         assertEquals("text/html", res.getContentType());
         
@@ -118,11 +132,11 @@
         WebResponse res = client.getResponse(req); 
         assertEquals(200, res.getResponseCode());
         assertEquals("text/xml", res.getContentType());
-        assertTrue("the wsdl should contain the opertion greetMe",
-                   res.getText().contains("<wsdl:operation name=\"greetMe\">"));
-        assertTrue("the soap address should changed",
-                   res.getText().contains("<soap:address location=\"" + CONTEXT_URL + "/services/greeter\""));
+        Document doc = DOMUtils.readXml(res.getInputStream());
+        assertNotNull(doc);
         
+        assertValid("//wsdl:operation[@name='greetMe']", doc);
+        assertValid("//wsdlsoap:address[@location='" + CONTEXT_URL + "/services/greeter']", doc);
     }
     
     @Test
@@ -135,11 +149,13 @@
         WebResponse res = client.getResponse(req); 
         assertEquals(200, res.getResponseCode());
         assertEquals("text/xml", res.getContentType());
-        assertTrue("the wsdl should contain the opertion greetMe",
-                   res.getText().contains("<wsdl:operation name=\"greetMe\">"));
-        assertTrue("the http address should changed",
-                   res.getText().contains(CONTEXT_URL + "/services/greeter2\""));
         
+        Document doc = DOMUtils.readXml(res.getInputStream());
+        assertNotNull(doc);
+        
+        addNamespace("http", "http://schemas.xmlsoap.org/wsdl/http/");
+        assertValid("//wsdl:operation[@name='greetMe']", doc);
+        assertValid("//http:address[@location='" + CONTEXT_URL + "/services/greeter2']", doc);
     }
 
     @Test

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java Tue Feb 12 12:50:56 2008
@@ -19,6 +19,9 @@
 package org.apache.cxf.systest.servlet;
 
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.w3c.dom.Document;
 
 
@@ -56,8 +59,14 @@
         WebResponse  res = client.getResponse(CONTEXT_URL + "/");
         WebLink[] links = res.getLinks();
         assertEquals("There should get two links for the services", 2, links.length);
-        assertEquals(FORCED_BASE_ADDRESS + "/greeter?wsdl", links[0].getURLString()); 
-        assertEquals(FORCED_BASE_ADDRESS + "/greeter2?wsdl", links[1].getURLString()); 
+        
+        Set<String> links2 = new HashSet<String>();
+        for (WebLink l : links) {
+            links2.add(l.getURLString());
+        }
+        assertTrue(links2.contains(FORCED_BASE_ADDRESS + "/greeter?wsdl"));       
+        assertTrue(links2.contains(FORCED_BASE_ADDRESS + "/greeter2?wsdl")); 
+        
         assertEquals("text/html", res.getContentType());
         
         //HTTPUnit do not support require url with ""

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Tue Feb 12 12:50:56 2008
@@ -109,20 +109,24 @@
         WebResponse res = client.getResponse(req);        
         assertEquals(200, res.getResponseCode());
         assertEquals("text/xml", res.getContentType());
-        assertTrue("the wsdl should contain the opertion greetMe",
-                   res.getText().contains("<wsdl:operation name=\"greetMe\">"));
-        assertTrue("the soap address should changed",
-                   res.getText().contains("<soap:address location=\"" + CONTEXT_URL + "/services/Greeter"));
+        
+        Document doc = DOMUtils.readXml(res.getInputStream());
+        assertNotNull(doc);
+        
+        assertValid("//wsdl:operation[@name='greetMe']", doc);
+        assertValid("//wsdlsoap:address[@location='" + CONTEXT_URL + "/services/Greeter']", doc);
         
         req = 
             new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter2?wsdl");
         res = client.getResponse(req);    
         assertEquals(200, res.getResponseCode());
         assertEquals("text/xml", res.getContentType());
-        assertTrue("the wsdl should contain the opertion greetMe",
-                   res.getText().contains("<wsdl:operation name=\"greetMe\">"));
-        assertTrue("the soap address should be updated",
-                   res.getText().contains("<soap:address location=\"http://cxf.apache.org/Greeter"));
+        
+        doc = DOMUtils.readXml(res.getInputStream());
+        assertNotNull(doc);
+        
+        assertValid("//wsdl:operation[@name='greetMe']", doc);
+        assertValid("//wsdlsoap:address[@location='http://cxf.apache.org/Greeter']", doc);
         
     }
     

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl Tue Feb 12 12:50:56 2008
@@ -161,7 +161,7 @@
                     </sequence>
                     <attribute name="id" type="int"/>
                 </complexType>
-            </element>      
+            </element>
         </schema>
     </wsdl:types>
     <wsdl:message name="sayHiRequest">
@@ -214,7 +214,7 @@
     </wsdl:message>
     <wsdl:message name="testDocLitBareResponse">
         <wsdl:part name="out" element="x1:BareDocumentResponse"/>
-    </wsdl:message> 
+    </wsdl:message>
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input message="tns:sayHiRequest"/>
@@ -232,7 +232,7 @@
             <wsdl:input  message="tns:greetMeLaterRequest"/>
             <wsdl:output  message="tns:greetMeLaterResponse"/>
         </wsdl:operation>
-       <wsdl:operation name="greetMeSometime">
+        <wsdl:operation name="greetMeSometime">
             <wsdl:input  message="tns:greetMeSometimeRequest"/>
             <wsdl:output  message="tns:greetMeSometimeResponse"/>
         </wsdl:operation>
@@ -252,7 +252,7 @@
         <wsdl:operation name="testDocLitBare">
             <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/>
             <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/>
-        </wsdl:operation>       
+        </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
@@ -339,11 +339,11 @@
 
 
     <wsdl:service name="SOAPService">
-	<wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+        <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
         </wsdl:port>
 
-	<wsdl:port name="SoapPort1" binding="tns:Greeter_SOAPBinding">
+        <wsdl:port name="SoapPort1" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:7000/SoapContext/SoapPort"/>
         </wsdl:port>
     </wsdl:service>
@@ -354,7 +354,7 @@
         </wsdl:port>
     </wsdl:service>
 
-        <wsdl:service name="SOAPDispatchService">
+    <wsdl:service name="SOAPDispatchService">
         <wsdl:port name="SoapDispatchPort" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:9006/SOAPDispatchService/SoapDispatchPort"/>
         </wsdl:port>
@@ -396,12 +396,12 @@
         </wsdl:port>
     </wsdl:service>
     <wsdl:service name="SOAPServiceMultiPortTypeTest">
-		<wsdl:port name="GreeterPort" binding="tns:Greeter_SOAPBinding">
+        <wsdl:port name="GreeterPort" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:9020/MultiPort/GreeterPort"/>
         </wsdl:port>
         <wsdl:port name="DocLitBarePort" binding="tns:Doc_Lit_Bare_SOAPBinding">
             <soap:address location="http://localhost:9021/MultiPort/DocBarePort"/>
-        </wsdl:port>        
+        </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>
 

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java Tue Feb 12 12:50:56 2008
@@ -30,7 +30,6 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
-import java.security.Permission;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -93,21 +92,10 @@
     }
 
     private int execute(String[] args) {
-        SecurityManager oldManager = System.getSecurityManager();
         try {
-            SecurityManager newManager = new SecurityManager() {
-                public void checkPermission(Permission perm) {
-                    if ("exitVM".equals(perm.getName())) {
-                        throw new SecurityException("Exit Not Allowed");
-                    }
-                }
-            };
-            System.setSecurityManager(newManager);
-            IDLToWSDL.main(args);
+            IDLToWSDL.run(args);
         } catch (Throwable t) {
             return error;
-        } finally {
-            System.setSecurityManager(oldManager);
         }
 
         return noError;

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/WSDLToIDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/WSDLToIDLTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/WSDLToIDLTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/WSDLToIDLTest.java Tue Feb 12 12:50:56 2008
@@ -29,7 +29,6 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
-import java.security.Permission;
 
 import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
@@ -84,25 +83,13 @@
         output = null;
     }
 
-    private int execute(String[] args) {
-        SecurityManager oldManager = System.getSecurityManager();
+    private int execute(String[] args) throws Exception {
         try {
-            SecurityManager newManager = new SecurityManager() {
-                public void checkPermission(Permission perm) {
-                    if ("exitVM".equals(perm.getName())) {
-                        throw new SecurityException("Exit Not Allowed");
-                    }
-                }
-            };
-            System.setSecurityManager(newManager);
-            WSDLToIDL.main(args);
-        } catch (Throwable t) {
-            return error;
-        } finally {
-            System.setSecurityManager(oldManager);
+            WSDLToIDL.run(args);
+        } catch (Exception ex) {
+            return -1;
         }
-
-        return noError;
+        return 0;
     }
 
     private void checkStrings(byte orig[], byte generated[]) throws Exception {

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java Tue Feb 12 12:50:56 2008
@@ -20,8 +20,10 @@
 package org.apache.cxf.tools.corba.processors;
 
 import java.io.File;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.wsdl.Binding;
 import javax.wsdl.BindingFault;
@@ -35,10 +37,9 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.corba.wsdl.BindingType;
 import org.apache.cxf.binding.corba.wsdl.CorbaConstants;
+import org.apache.cxf.binding.corba.wsdl.CorbaTypeImpl;
 import org.apache.cxf.binding.corba.wsdl.Fixed;
 import org.apache.cxf.binding.corba.wsdl.OperationType;
 import org.apache.cxf.binding.corba.wsdl.ParamType;
@@ -47,16 +48,17 @@
 import org.apache.cxf.tools.corba.common.WSDLCorbaFactory;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToCorbaBinding;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToIDLAction;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class WSDLToCorbaBindingTest extends TestCase {
+public class WSDLToCorbaBindingTest extends Assert {
     WSDLToCorbaBinding generator;
     WSDLWriter writer;
 
-    public WSDLToCorbaBindingTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() {
+    @Before
+    public void setUp() {
         System.setProperty("UseWSDLModelCaching", "false");
         generator = new WSDLToCorbaBinding();
         try {
@@ -69,13 +71,11 @@
         }
     }
 
-    protected void tearDown() {
+    @After
+    public void tearDown() {
         System.setProperty("UseWSDLModelCaching", "true");
     }
 
-    public static void main(String args[]) {
-        junit.textui.TestRunner.run(WSDLToCorbaBindingTest.class);
-    }
     
     private Element getElementNode(Document document, String elName) {
         Element root = document.getDocumentElement();
@@ -87,7 +87,7 @@
         return null;
     }    
     
-    
+    @Test
     public void testSequenceType() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/sequencetype.wsdl").toString();
@@ -117,6 +117,7 @@
     }
 
     
+    @Test
     public void testFixedBindingGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/fixed.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -124,7 +125,7 @@
 
         Definition model = generator.generateCORBABinding();
         Document document = writer.getDocument(model);
-
+        
         Element typemap = getElementNode(document, "corba:typeMapping");
         assertEquals(1, typemap.getElementsByTagName("corba:sequence").getLength());
         assertEquals(5, typemap.getElementsByTagName("corba:fixed").getLength());
@@ -134,26 +135,32 @@
         QName bName = new QName("http://schemas.apache.org/idl/fixed.idl", 
                                 "YCORBABinding", "tns");
         Binding binding = model.getBinding(bName);
+        TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
+        Map<String, CorbaTypeImpl> tmap = new HashMap<String, CorbaTypeImpl>();
+        for (CorbaTypeImpl type : mapType.getStructOrExceptionOrUnion()) {
+            tmap.put(type.getName(), type);
+        }
         
         Iterator j = binding.getBindingOperations().iterator();
         while (j.hasNext()) {            
             BindingOperation bindingOperation = (BindingOperation)j.next();
             assertEquals("YCORBABinding", binding.getQName().getLocalPart());
             assertEquals(1, bindingOperation.getExtensibilityElements().size());
-            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
-            checkFixedTypeOne(bindingOperation, mapType);
+            
+            checkFixedTypeOne(bindingOperation, tmap);
             bindingOperation = (BindingOperation)j.next();
-            checkSequenceType(bindingOperation, mapType);
+            checkSequenceType(bindingOperation, tmap);
             bindingOperation = (BindingOperation)j.next();
-            checkFixedTypeTwo(bindingOperation, mapType);
+            checkFixedTypeTwo(bindingOperation, tmap);
             bindingOperation = (BindingOperation)j.next();
-            checkFixedTypeThree(bindingOperation, mapType);
+            checkFixedTypeThree(bindingOperation, tmap);
             bindingOperation = (BindingOperation)j.next();
-            checkFixedTypeFour(bindingOperation, mapType);
+            checkFixedTypeFour(bindingOperation, tmap);
         }
     }
      
-    private void checkSequenceType(BindingOperation bindingOperation, TypeMappingType mapType) {
+    private void checkSequenceType(BindingOperation bindingOperation,
+                                   Map<String, CorbaTypeImpl> mapType) {
         Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
         while (bOp.hasNext()) {
             ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
@@ -163,7 +170,7 @@
                 assertEquals(3, corbaOpType.getParam().size());
                 assertEquals("Y.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                 assertEquals("Y.H", corbaOpType.getReturn().getIdltype().getLocalPart());
-                Sequence seq = (Sequence)mapType.getStructOrExceptionOrUnion().get(4);
+                Sequence seq = (Sequence)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                 assertEquals("ElementType is incorrect for Sequence Type", "fixed_1", seq.getElemtype()
                     .getLocalPart());
             }
@@ -171,7 +178,8 @@
         }
     }
     
-    private void checkFixedTypeOne(BindingOperation bindingOperation, TypeMappingType mapType) {
+    private void checkFixedTypeOne(BindingOperation bindingOperation,
+                                   Map<String, CorbaTypeImpl>  mapType) {
 
         Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
         while (bOp.hasNext()) {
@@ -184,7 +192,7 @@
                 assertEquals(3, corbaOpType.getParam().size());
                 assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                 assertEquals("fixed_1", corbaOpType.getReturn().getIdltype().getLocalPart());
-                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(0);
+                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
 
                 assertNotNull("Could not find the decimal type", fixed.getType());
                 assertEquals("Fixed digits is incorrect for the return corba parameter", 31, fixed
@@ -195,7 +203,8 @@
         }
     }
     
-    private void checkFixedTypeTwo(BindingOperation bindingOperation, TypeMappingType mapType) {
+    private void checkFixedTypeTwo(BindingOperation bindingOperation,
+                                   Map<String, CorbaTypeImpl>  mapType) {
         Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
         while (bOp.hasNext()) {
             ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
@@ -205,7 +214,7 @@
                 assertEquals(3, corbaOpType.getParam().size());
                 assertEquals("X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                 assertEquals("X.H", corbaOpType.getReturn().getIdltype().getLocalPart());
-                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(2);
+                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                 assertNotNull("Could not find the decimal type", fixed.getType());
                 assertEquals("Fixed digits is incorrect for the return corba parameter", 10, fixed
                     .getDigits());
@@ -215,7 +224,8 @@
         }
     }
     
-    private void checkFixedTypeThree(BindingOperation bindingOperation, TypeMappingType mapType) {
+    private void checkFixedTypeThree(BindingOperation bindingOperation,
+                                     Map<String, CorbaTypeImpl>  mapType) {
         Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
         while (bOp.hasNext()) {
             ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();            
@@ -225,7 +235,7 @@
                 assertEquals(3, corbaOpType.getParam().size());
                 assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                 assertEquals("Z.H", corbaOpType.getReturn().getIdltype().getLocalPart());
-                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(1);
+                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                 assertNotNull("Could not find the decimal type", fixed.getType());
                 assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                     .getDigits());
@@ -235,7 +245,8 @@
         }
     }
     
-    private void checkFixedTypeFour(BindingOperation bindingOperation, TypeMappingType mapType) {
+    private void checkFixedTypeFour(BindingOperation bindingOperation,
+                                    Map<String, CorbaTypeImpl>  mapType) {
         Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
         while (bOp.hasNext()) {
             ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
@@ -246,7 +257,7 @@
                 assertEquals(3, corbaOpType.getParam().size());
                 assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                 assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getReturn().getIdltype().getLocalPart());
-                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(3);
+                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                 assertNotNull("Could not find the decimal type", fixed.getType());
                 assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                     .getDigits());
@@ -256,6 +267,7 @@
         }
     }       
                      
+    @Test
     public void testAllType() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/alltype.wsdl").toString();
@@ -281,6 +293,7 @@
         }        
     }
     
+    @Test
     public void testComplexContentStructType() throws Exception {
         
         try {
@@ -310,6 +323,7 @@
     }
     
         
+    @Test
     public void testUnionType() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/uniontype.wsdl").toString();
@@ -338,6 +352,7 @@
 
     
     // next story to add Fault support
+    @Test
     public void testExceptionCORBABindingGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/exceptions.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -392,6 +407,7 @@
         }            
     }
     
+    @Test
     public void testCORBABindingGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/simpleList.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -443,6 +459,7 @@
         }            
     }
     
+    @Test
     public void testCORBATypeMapGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/simpleList.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -457,6 +474,7 @@
         assertEquals(1, typemap.getElementsByTagName("corba:enum").getLength());        
     }
     
+    @Test
     public void testSimpleListIdl() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/simpleList.wsdl").toString();
@@ -478,6 +496,7 @@
         }
     }
         
+    @Test
     public void testMultipartTypeMapGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/multipart.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -491,6 +510,7 @@
         assertEquals(1, typemap.getElementsByTagName("corba:enum").getLength());        
     }
     
+    @Test
     public void testMulitPartIdl() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/multipart.wsdl").toString();
@@ -511,6 +531,7 @@
         }
     }
     
+    @Test
     public void testMultipartCORBABindingGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/multipart.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -666,6 +687,7 @@
         }
     }
     
+    @Test
     public void testArrayMapping() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/array.wsdl").toString();

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java Tue Feb 12 12:50:56 2008
@@ -21,8 +21,10 @@
 
 import java.io.File;
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Port;
@@ -34,8 +36,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.corba.wsdl.AddressType;
 import org.apache.cxf.binding.corba.wsdl.Anonarray;
 import org.apache.cxf.binding.corba.wsdl.Anonfixed;
@@ -50,16 +50,16 @@
 import org.apache.cxf.tools.corba.common.WSDLCorbaFactory;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToCorbaBinding;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToIDLAction;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class WSDLToCorbaBindingTypeTest extends TestCase {
+public class WSDLToCorbaBindingTypeTest extends Assert {
     WSDLToCorbaBinding generator;
     WSDLWriter writer;
 
-    public WSDLToCorbaBindingTypeTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() {
+    @Before
+    public void setUp() {
         generator = new WSDLToCorbaBinding();
         try {
             WSDLCorbaFactory wsdlfactory = WSDLCorbaFactory
@@ -71,13 +71,6 @@
         }
     }
 
-    protected void tearDown() {
-    }
-
-    public static void main(String args[]) {
-        junit.textui.TestRunner.run(WSDLToCorbaBindingTest.class);
-    }
-    
     private Element getElementNode(Document document, String elName) {
         Element root = document.getDocumentElement();
         for (Node nd = root.getFirstChild(); nd != null; nd = nd.getNextSibling()) {
@@ -88,6 +81,7 @@
         return null;
     }
 
+    @Test
     public void testWsAddressingAccountType() throws Exception {
         
         try {
@@ -115,6 +109,7 @@
         }
     }
     
+    @Test
     public void testWsAddressingBankType() throws Exception {
         
         try {
@@ -142,6 +137,7 @@
     }
 
     
+    @Test
     public void testWsAddressingTypes() throws Exception {
         
         try {
@@ -168,6 +164,7 @@
         }
     }
 
+    @Test
     public void testDateTimeTypes() throws Exception {
         
         try {
@@ -195,6 +192,7 @@
         }
     }
 
+    @Test
     public void testNestedInterfaceTypes() throws Exception {
         
         try {
@@ -222,6 +220,7 @@
         }
     }    
 
+    @Test
     public void testNestedComplexTypes() throws Exception {
         
         try {
@@ -254,6 +253,7 @@
     }    
 
     
+    @Test
     public void testNestedDerivedTypes() throws Exception {
         
         try {
@@ -283,6 +283,7 @@
         }
     }    
 
+    @Test
     public void testNestedType() throws Exception {
         
         try {
@@ -312,6 +313,7 @@
     }    
 
     
+    @Test
     public void testNillableType() throws Exception {
         
         try {
@@ -355,6 +357,7 @@
     
     
     // tests Type Inheritance and attributes.
+    @Test
     public void testTypeInheritance() throws Exception {
         try {
             String fileName = getClass().getResource("/wsdl/TypeInheritance.wsdl").toString();
@@ -402,6 +405,7 @@
     }    
     
     // tests anonymous strings and fixed types.
+    @Test
     public void testAnonFixedType() throws Exception {
         
         try {
@@ -459,6 +463,7 @@
     }
     
     // tests anonymous arrays and sequences
+    @Test
     public void testAnonType() throws Exception {
         
         try {
@@ -476,41 +481,46 @@
             assertEquals(2, typemap.getElementsByTagName("corba:struct").getLength());            
 
             TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
+            Map<String, CorbaTypeImpl> tmap = new HashMap<String, CorbaTypeImpl>();
+            for (CorbaTypeImpl type : mapType.getStructOrExceptionOrUnion()) {
+                tmap.put(type.getName(), type);
+            }
+
 
             WSDLToIDLAction idlgen = new WSDLToIDLAction();
             idlgen.setBindingName("XCORBABinding");
             idlgen.setOutputFile("atype.idl");
             idlgen.generateIDL(model);
 
-            Array arr = (Array)mapType.getStructOrExceptionOrUnion().get(0);            
+            Array arr = (Array)tmap.get("X.A");
+            assertNotNull(arr);
             assertEquals("ElementType is incorrect for Array Type", "X._5_A", 
                          arr.getElemtype().getLocalPart());
             
-            Anonarray arr2 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(3);
+            Anonarray arr2 = (Anonarray)tmap.get("X._5_A");
+            assertNotNull(arr2);
             assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A", 
                          arr2.getElemtype().getLocalPart());
             
-            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
+            Anonarray arr3 = (Anonarray)tmap.get("X._4_A");
+            assertNotNull(arr3);
             assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A", 
                          arr3.getElemtype().getLocalPart());
             
             
-            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
-            assertEquals("Name is incorrect for Anon Array Type", "X._1_A", 
-                         seq.getName());                        
+            Anonsequence seq = (Anonsequence)tmap.get("X._1_A");
+            assertNotNull(seq);
             assertEquals("ElementType is incorrect for Anon Sequence Type", "X._2_A", 
                          seq.getElemtype().getLocalPart());
             
             
-            Anonsequence seq2 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(1);
-            assertEquals("Name is incorrect for Anon Array Type", "X._2_A", 
-                         seq2.getName());                        
+            Anonsequence seq2 = (Anonsequence)tmap.get("X._2_A");
+            assertNotNull(seq2);
             assertEquals("ElementType is incorrect for Anon Sequence Type", "X._3_A", 
                          seq2.getElemtype().getLocalPart());
             
-            Anonsequence seq3 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(4);
-            assertEquals("Name is incorrect for Anon Array Type", "X._3_A", 
-                         seq3.getName());
+            Anonsequence seq3 = (Anonsequence)tmap.get("X._3_A");
+            assertNotNull(seq3);
             assertEquals("ElementType is incorrect for Anon Sequence Type", "long", 
                          seq3.getElemtype().getLocalPart());
             
@@ -521,6 +531,7 @@
         }
     }
     
+    @Test
     public void testAnyType() throws Exception {
         
         try {
@@ -560,6 +571,7 @@
         }
     }
     
+    @Test
     public void testMultipleBindings() throws Exception {
         String fileName = getClass().getResource("/wsdl/multiplePortTypes.wsdl").toString();
         generator.setWsdlFile(fileName);
@@ -568,6 +580,7 @@
         assertEquals("All bindings should be generated.", 2, model.getAllBindings().size());
     }
 
+    @Test
     public void testAnonymousReturnParam() throws Exception {
         
         try {
@@ -585,6 +598,7 @@
         }
     }
     
+    @Test
     public void testComplextypeDerivedSimpletype() throws Exception {
         
         try {
@@ -608,6 +622,7 @@
         }
     }
     
+    @Test
     public void testCorbaExceptionComplextype() throws Exception {
         
         try {
@@ -627,6 +642,7 @@
         }
     }    
     
+    @Test
     public void testSetCorbaAddress() throws Exception {
         
         try {
@@ -655,6 +671,7 @@
         }
     }    
     
+    @Test
     public void testSetCorbaAddressFile() throws Exception {
         
         try {

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java Tue Feb 12 12:50:56 2008
@@ -28,34 +28,31 @@
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToIDLAction;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class WSDLToIDLGenerationTest extends TestCase {
+public class WSDLToIDLGenerationTest extends Assert {
 
     protected static final String START_COMMENT = "/*";
     protected static final String END_COMMENT = "*/";
     WSDLToIDLAction idlgen;
     ByteArrayOutputStream idloutput;
 
-    public WSDLToIDLGenerationTest(String name) {
-        super(name);
-    }
-    
-    protected void setUp() {
+    @Before
+    public void setUp() {
         System.setProperty("WSDLTOIDLGeneration", "false");
         idlgen = new WSDLToIDLAction();
         idloutput = new ByteArrayOutputStream();
     }
 
-    protected void tearDown() {
+    @After
+    public void tearDown() {
         System.setProperty("WSDLTOIDLGeneration", "true");
     }
 
-    public static void main(String args[]) {
-        junit.textui.TestRunner.run(WSDLToCorbaBindingTest.class);
-    }
     
     private void checkIDLStrings(byte orig[], byte generated[]) throws Exception {
         BufferedReader origReader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(orig)));
@@ -113,6 +110,7 @@
         return out.toByteArray();
     } 
 
+    @Test
     public void testOnewayGeneration() throws Exception {
         
         String fileName = getClass().getResource("/idlgen/oneway.wsdl").toString();
@@ -129,6 +127,7 @@
         checkIDLStrings(orig, idloutput.toByteArray());
     }
     
+    @Test
     public void testStringtypesIdlgen() throws Exception {
         try {
             String fileName = getClass().getResource("/idlgen/stringtypes.wsdl").toString();
@@ -148,6 +147,7 @@
         }
     }
 
+    @Test
     public void testIntegertypesIdlgen() throws Exception {
         try {
             String fileName = getClass().getResource("/idlgen/integertypes.wsdl").toString();
@@ -167,6 +167,7 @@
         }
     }
     
+    @Test
     public void testUniontypesIdlgen() throws Exception {
         try {
             String fileName = getClass().getResource("/idlgen/uniontypes.wsdl").toString();
@@ -186,6 +187,7 @@
         }
     }
     
+    @Test
     public void testDefaultUniontypesIdlgen() throws Exception {
         try {
             String fileName = getClass().getResource("/idlgen/defaultuniontypes.wsdl").toString();
@@ -206,6 +208,7 @@
     }
 
 
+    @Test
     public void testExceptionIdlgen() throws Exception {
 
         try {
@@ -226,6 +229,7 @@
         }
     }
     
+    @Test
     public void testStructIdlgen() throws Exception {
 
         try {
@@ -247,6 +251,7 @@
     }
 
 
+    @Test
     public void testSequenceIdlgen() throws Exception {
 
         try {
@@ -267,6 +272,7 @@
         }
     }
     
+    @Test
     public void testArrayIdlgen() throws Exception {
 
         try {
@@ -288,6 +294,7 @@
     }
 
 
+    @Test
     public void testEnumIdlgen() throws Exception {
         
         try {           
@@ -308,6 +315,7 @@
         }
     }
     
+    @Test
     public void testContentIdlgen() throws Exception {
         
         try {
@@ -328,6 +336,7 @@
         }
     }
     
+    @Test
     public void testAllTypeIdlgen() throws Exception {
         
         try {
@@ -348,6 +357,7 @@
         }
     }
     
+    @Test
     public void testFixedTypeIdlgen() throws Exception {
         
         try {
@@ -368,6 +378,7 @@
         }
     }
     
+    @Test
     public void testAnonFixedTypeIdlgen() throws Exception {
         
         try {
@@ -388,6 +399,7 @@
         }
     }
 
+    @Test
     public void testAnyTypeIdlgen() throws Exception {
         
         try {
@@ -409,6 +421,7 @@
     }
 
 
+    @Test
     public void testTypeInheritanceIdlgen() throws Exception {
         
         try {
@@ -429,6 +442,7 @@
         }
     }
     
+    @Test
     public void testNillableIdlgen() throws Exception {
         
         try {
@@ -449,6 +463,7 @@
         }
     }
     
+    @Test
     public void testTypedefIdlgen() throws Exception {
         
         try {
@@ -469,6 +484,7 @@
         }
     }
 
+    @Test
     public void testNestedIdlgen() throws Exception {
         
         try {
@@ -489,6 +505,7 @@
         }
     }
     
+    @Test
     public void testNestedDerivedTypesIdlgen() throws Exception {
         
         try {
@@ -510,6 +527,7 @@
         }
     }
 
+    @Test
     public void testNestedComplexTypesIdlgen() throws Exception {
         
         try {
@@ -531,6 +549,7 @@
         }
     }
 
+    @Test
     public void testNestedInterfaceTypesIdlgen() throws Exception {
         
         try {
@@ -552,6 +571,7 @@
         }
     }
     
+    @Test
     public void testDateTimeTypesIdlgen() throws Exception {
         
         try {
@@ -573,6 +593,7 @@
         }
     }
     
+    @Test
     public void testWsaddressingServerIdlgen() throws Exception {
         
         try {
@@ -594,6 +615,7 @@
         }
     }
     
+    @Test
     public void testWsaddressingAccountIdlgen() throws Exception {
         
         try {
@@ -615,6 +637,7 @@
         }
     }
     
+    @Test
     public void testWsaddressingBankIdlgen() throws Exception {
         
         try {
@@ -636,6 +659,7 @@
         }
     }
     
+    @Test
     public void testMultipleBindingIdlgen() throws Exception {
         
         try {
@@ -656,6 +680,7 @@
         }
     }
 
+    @Test
     public void testComplextypeDerivedSimpletype() throws Exception {
         
         try {
@@ -677,6 +702,7 @@
     }
 
     
+    @Test
     public void testCorbaExceptionComplexType() throws Exception {
         
         try {
@@ -697,6 +723,7 @@
         }
     }
 
+    @Test
     public void testCorbaRecursiveStructs() throws Exception {
         
         try {
@@ -718,6 +745,7 @@
         }
     }
 
+    @Test
     public void testCoraRecursiveUnion() throws Exception {
         
         try {
@@ -737,10 +765,6 @@
             new File("recursiveunion.idl").deleteOnExit();
         }
     }
-
-
-
-
 
 
 }

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=627095&r1=627094&r2=627095&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 Tue Feb 12 12:50:56 2008
@@ -85,11 +85,10 @@
     
         WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
         reader.setFeature("javax.wsdl.verbose", false);
-        Definition def = reader.readWSDL(wsdlFile.toURL().toString());
+        Definition def = reader.readWSDL(wsdlFile.toURI().toURL().toString());
         Document wsdl = WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
         addNamespace("ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/");
         assertValid("//xsd:element[@type='ns0:Something']", wsdl);
-        assertXPathEquals("//namespace::ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/", wsdl);
     }
     
     @Test 
@@ -111,7 +110,7 @@
     
         WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
         reader.setFeature("javax.wsdl.verbose", false);
-        Definition def = reader.readWSDL(wsdlFile.toURL().toString());
+        Definition def = reader.readWSDL(wsdlFile.toURI().toURL().toString());
         Document wsdl = WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
         addNamespace("ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/");
         assertValid("//xsd:element[@type='ns0:Something']", wsdl);
@@ -121,7 +120,6 @@
         assertInvalid("//xsd:complexType[@name='Something']/" 
                           + "xsd:sequence/xsd:element[@name='singular']/@minOccurs", 
                           wsdl);
-        assertXPathEquals("//namespace::ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/", wsdl);
     }
 
 }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java?rev=627095&r1=627094&r2=627095&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java Tue Feb 12 12:50:56 2008
@@ -55,9 +55,9 @@
         generator.generate(output);
         assertTrue(output.exists());
 
-        String expectedFile = this.getClass()
-            .getResource("expected/rpc_greeter.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        File expectedFile = new File(this.getClass()
+            .getResource("expected/rpc_greeter.wsdl").toURI());
+        assertWsdlEquals(expectedFile, output);
     }
 
     private File getOutputFile(String fileName) {



Mime
View raw message