cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sea...@apache.org
Subject svn commit: r735734 - in /cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
Date Mon, 19 Jan 2009 15:52:40 GMT
Author: seanoc
Date: Mon Jan 19 07:52:40 2009
New Revision: 735734

URL: http://svn.apache.org/viewvc?rev=735734&view=rev
Log:
CXF-1973 Dynamic Client Factory classes should take URL objects as well as Strings

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?rev=735734&r1=735733&r2=735734&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Mon Jan 19 07:52:40 2009
@@ -146,6 +146,21 @@
     public Client createClient(String wsdlUrl, List<String> bindingFiles) {
         return createClient(wsdlUrl, (QName)null, (QName)null, bindingFiles);
     }
+    
+    
+    /**
+     * Create a new <code>Client</code> instance using the WSDL to be loaded
+     * from the specified URL and using the current classloading context.
+     * 
+     * @param wsdlURL the URL to load
+     * @return
+     */
+    public Client createClient(URL wsdlUrl) {
+        return createClient(wsdlUrl, (QName)null, (QName)null);
+    }
+    public Client createClient(URL wsdlUrl, List<String> bindingFiles) {
+        return createClient(wsdlUrl, (QName)null, (QName)null, bindingFiles);
+    }
 
     /**
      * Create a new <code>Client</code> instance using the WSDL to be loaded
@@ -180,6 +195,52 @@
     public Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName
port) {
         return createClient(wsdlUrl, service, classLoader, port, null);
     }
+
+    
+    /**
+     * Create a new <code>Client</code> instance using the WSDL to be loaded
+     * from the specified URL and with the specified <code>ClassLoader</code>
+     * as parent.
+     * 
+     * @param wsdlUrl
+     * @param classLoader
+     * @return
+     */
+    public Client createClient(URL wsdlUrl, ClassLoader classLoader) {
+        return createClient(wsdlUrl, null, classLoader, null);
+    }
+    public Client createClient(URL wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
{
+        return createClient(wsdlUrl.toString(), null, classLoader, null, bindingFiles);
+    }
+
+    public Client createClient(URL wsdlUrl, QName service) {
+        return createClient(wsdlUrl, service, (QName)null);
+    }
+    public Client createClient(URL wsdlUrl, QName service, List<String> bindingFiles)
{
+        return createClient(wsdlUrl, service, null, bindingFiles);
+    }
+
+    public Client createClient(URL wsdlUrl, QName service, QName port) {
+        return createClient(wsdlUrl, service, null, port);
+    }
+    public Client createClient(URL wsdlUrl, QName service, QName port, List<String>
bindingFiles) {
+        return createClient(wsdlUrl.toString(), service, null, port, bindingFiles);
+    }
+
+    public Client createClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName
port) {
+        return createClient(wsdlUrl.toString(), service, classLoader, port, null);
+    }
+    
+    public Client createClient(URL wsdlUrl, 
+                               QName service, 
+                               ClassLoader classLoader, 
+                               QName port, 
+                               List<String> bindingFiles) {
+        return createClient(wsdlUrl.toString(), service, classLoader, port, bindingFiles);
+    }
+    
+    
+    
     public Client createClient(String wsdlUrl, QName service,
                                ClassLoader classLoader, QName port,
                                List<String> bindingFiles) {

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java?rev=735734&r1=735733&r2=735734&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
Mon Jan 19 07:52:40 2009
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.jaxws;
 
+import java.net.URL;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
@@ -63,7 +64,8 @@
     public void testInvocation() throws Exception {
         JaxWsDynamicClientFactory dcf = 
             JaxWsDynamicClientFactory.newInstance();
-        Client client = dcf.createClient("http://localhost:9020/NoBodyParts/NoBodyPartsService?wsdl");
+        URL wsdlURL = new URL("http://localhost:9020/NoBodyParts/NoBodyPartsService?wsdl");
+        Client client = dcf.createClient(wsdlURL);
         byte[] bucketOfBytes = 
             IOUtils.readBytesFromStream(getClass().getResourceAsStream("/wsdl/no_body_parts.wsdl"));
         Operation1 parameters = new Operation1();



Mime
View raw message