You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2007/04/05 03:03:04 UTC

svn commit: r525667 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/configuration/ common/common/src/main/java/org/apache/cxf/configuration/spring/ common/common/src/main/java/org/apache/cxf/helpers/ integration/jca/src/main/java/org/apache...

Author: dandiep
Date: Wed Apr  4 18:03:01 2007
New Revision: 525667

URL: http://svn.apache.org/viewvc?view=rev&rev=525667
Log:
o Make ServiceImpl use the JaxWsClientFactoryBean instead of replicating
  the same code in multiple places.
o Enable <jaxws:client> configuration for both Spring-only and ServiceImpl
  cases. 
o Add support for setting endpointName & serviceName on EndpointFactoryBean.
  EndpointFactoryBean still needs to be unified with ServerFactoryBean &
  EndpointImpl somehow. Also I need to add in support for configuring a
  EndpointImpl via <jaxws:endpoint>. That should come in my next commit.
o Remove http/jms namespaces from SoapBindingFactory configurations. Properly
  check for these the JAX-WS binding ids inside JaxWsServerFactoryBean and map
  them to the appropriate binding configurations. Now if you select the 
  SOAP12_MTOM_BINDING, you should actually get a binding with soap 1.2 and 
  MTOM enabled - although this does need some proper tests.


Added:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml   (with props)
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceImplTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/ws/security/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java Wed Apr  4 18:03:01 2007
@@ -29,5 +29,6 @@
     String USER_CFG_FILE_PROPERTY_URL = "cxf.config.file.url";
 
     void configureBean(Object beanInstance);
+    void configureBean(String name, Object beanInstance);
 
 }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java Wed Apr  4 18:03:01 2007
@@ -28,6 +28,7 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import org.apache.cxf.helpers.DOMUtils;
 import org.springframework.beans.factory.config.BeanDefinition;
 import org.springframework.beans.factory.config.BeanDefinitionHolder;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
@@ -145,6 +146,42 @@
                 bean.addPropertyValue(propertyName, val);
             }
         }
+    }
+    
+    protected boolean isAttribute(String pre, String name) {
+        return !"xmlns".equals(name) && (pre == null || !pre.equals("xmlns"))
+            && !"abstract".equals(name) && !"lazy-init".equals(name) && !"id".equals(name);
+    }
+
+    protected QName parseQName(Element element, String t) {
+        String ns = null;
+        String pre = null;
+        String local = null;
+
+        if (t.startsWith("{")) {
+            int i = t.indexOf('}');
+            if (i == -1) {
+                throw new RuntimeException("Namespace bracket '{' must having a closing bracket '}'.");
+            }
+
+            ns = t.substring(1, i);
+            t = t.substring(i + 1);
+        }
+
+        int colIdx = t.indexOf(':');
+        if (colIdx == -1) {
+            local = t;
+            pre = "";
+            
+            ns = DOMUtils.getNamespace(element, "");
+        } else {
+            pre = t.substring(0, colIdx);
+            local = t.substring(colIdx + 1);
+            
+            ns = DOMUtils.getNamespace(element, pre);
+        }
+
+        return new QName(ns, local, pre);
     }
 
 }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java Wed Apr  4 18:03:01 2007
@@ -371,4 +371,25 @@
         el.setAttribute("xmlns:" + p, ns);
         return p;
     }
+
+    public static String getNamespace(Element el, String pre) {
+        NamedNodeMap atts = el.getAttributes();
+        for (int i = 0; i < atts.getLength(); i++) {
+            Node node = atts.item(i);
+            String name = node.getLocalName();
+            String pre2 = node.getPrefix();
+            if (pre.equals(name) && "xmlns".equals(pre2)) {
+                return node.getNodeValue();
+            } else if (pre.length() == 0 && "xmlns".equals(name) && pre2.length() == 0) {
+                return node.getNodeValue();
+            }
+        }
+        
+        Node parent = el.getParentNode();
+        if (parent instanceof Element) {
+            return getNamespace((Element) parent, pre);
+        }
+        
+        return null;
+    }
 }

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java Wed Apr  4 18:03:01 2007
@@ -143,7 +143,12 @@
                 Object obj = null;
                 Service service = Service.create(serviceName);
             
-                obj = service.getPort(arReqInfo.getInterface());
+                QName port = arReqInfo.getPortQName();
+                if (port == null) {
+                    obj = service.getPort(arReqInfo.getInterface());
+                } else {
+                    obj = service.getPort(arReqInfo.getPortQName(), arReqInfo.getInterface());
+                }
                 setSubject(subject);
                 return createConnectionProxy(obj, arReqInfo, subject);
             } catch (WebServiceException wse) {

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml Wed Apr  4 18:03:01 2007
@@ -23,9 +23,6 @@
       interface="org.apache.cxf.binding.BindingFactory" deferred="true">
         <namespace>http://schemas.xmlsoap.org/soap/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap/</namespace>
-        <namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
-        <namespace>http://cxf.apache.org/transports/jms</namespace>
-        <namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap12/</namespace>
     </extension>
     

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml Wed Apr  4 18:03:01 2007
@@ -29,9 +29,6 @@
             <set>
                 <value>http://schemas.xmlsoap.org/soap/</value>
                 <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
-                <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
-                <value>http://cxf.apache.org/transports/jms</value>
- 	            <value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
                 <value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
             </set>
         </property>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java Wed Apr  4 18:03:01 2007
@@ -23,4 +23,7 @@
     public void configureBean(Object beanInstance) {
     }
 
+    public void configureBean(String name, Object beanInstance) {
+    }
+
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Wed Apr  4 18:03:01 2007
@@ -70,17 +70,24 @@
     }
     
     public void configureBean(Object beanInstance) {
+        configureBean(null, beanInstance);
+    }
+    
+    public void configureBean(String bn, Object beanInstance) {
 
         if (null == appContext) {
             return;
         }
         
-        final String beanName = getBeanName(beanInstance);
+        if (null == bn) {
+            bn = getBeanName(beanInstance);
+        }
         
-        if (null == beanName) {
+        if (null == bn) {
             return;
         }
         
+        final String beanName = bn;
         setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
             public BeanWiringInfo resolveWiringInfo(Object instance) {
                 if (null != beanName && !"".equals(beanName)) {

Modified: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml (original)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml Wed Apr  4 18:03:01 2007
@@ -99,5 +99,4 @@
     <bean id="org.apache.cxf.endpoint.EndpointResolverRegistry" class="org.apache.cxf.endpoint.EndpointResolverRegistryImpl">
         <property name="bus" ref="cxf"/>
     </bean>
-    
 </beans>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java Wed Apr  4 18:03:01 2007
@@ -76,13 +76,20 @@
     private JaxWsImplementorInfo implInfo;
     private JaxWsServiceFactoryBean serviceFactory;
     private Map<String, Object> properties;
+    private List<Source> metadata;
     
     public EndpointImpl(Bus b, Object implementor, JaxWsServiceFactoryBean serviceFactory) {
+        this(b, implementor, serviceFactory, null);
+    }
+    
+    public EndpointImpl(Bus b, Object implementor, 
+                        JaxWsServiceFactoryBean serviceFactory, String bindingUri) {
         this.bus = b;
         this.serviceFactory = serviceFactory;
         this.implInfo = serviceFactory.getJaxWsImplementorInfo();
         this.service = serviceFactory.getService();
         this.implementor = implementor;
+        this.bindingId = bindingUri;
         
         if (this.service == null) {
             service = serviceFactory.create();
@@ -90,11 +97,19 @@
         
         doInit = true;
     }
-    
-    public EndpointImpl(Bus b, Object i, String uri, URL wsdl) {
+   
+    /**
+     * 
+     * @param b
+     * @param i The implementor object.
+     * @param bindingUri The URI of the Binding being used. Optional.
+     * @param wsdl The URL of the WSDL for the service, if different than the URL specified on the
+     * WebService annotation. Optional.
+     */
+    public EndpointImpl(Bus b, Object i, String bindingUri, URL wsdl) {
         bus = b;
         implementor = i;
-        bindingId = uri;
+        bindingId = bindingUri;
         // build up the Service model
         implInfo = new JaxWsImplementorInfo(implementor.getClass());
         serviceFactory = new JaxWsServiceFactoryBean(implInfo);
@@ -118,8 +133,6 @@
         this(b, i, uri, (URL)null);
     }
    
-   
-
     public EndpointImpl(Bus bus, Object implementor) {
         this(bus, implementor, (String) null);
     }
@@ -141,10 +154,8 @@
         return implementor;
     }
 
-    @Override
     public List<Source> getMetadata() {
-        // TODO Auto-generated method stub
-        return null;
+        return metadata;
     }
 
     @Override
@@ -168,9 +179,8 @@
         doPublish(address);
     }
 
-    public void setMetadata(List<Source> arg0) {
-        // TODO Auto-generated method stub
-
+    public void setMetadata(List<Source> metadata) {
+        this.metadata = metadata;
     }
 
     @Override

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -28,4 +28,5 @@
     public JaxWsClientFactoryBean() {
         setServiceFactory(new JaxWsServiceFactoryBean());
     }
+    
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -18,13 +18,26 @@
  */
 package org.apache.cxf.jaxws;
 
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 
 public class JaxWsProxyFactoryBean extends ClientProxyFactoryBean {
-
     public JaxWsProxyFactoryBean() {
         super();
         setClientFactoryBean(new JaxWsClientFactoryBean());
     }
 
-}
+    @Override
+    protected ClientProxy clientClientProxy(Client c) {
+        return new JaxWsClientProxy(c, ((JaxWsEndpointImpl)  c.getEndpoint()).getJaxwsBinding());
+    }
+
+    protected Class[] getImplementingClasses() {
+        Class cls = getClientFactoryBean().getServiceClass();
+        return new Class[] {cls, BindingProvider.class};
+    }
+}
\ No newline at end of file

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -19,8 +19,10 @@
 package org.apache.cxf.jaxws;
 
 import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.binding.AbstractBindingFactory;
+import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapBindingFactory;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.frontend.ServerFactoryBean;
@@ -61,15 +63,43 @@
         JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)getServiceFactory(); 
         
         JaxWsImplementorInfo implInfo = sf.getJaxWsImplementorInfo();
+        String jaxBid = implInfo.getBindingType();
         String binding = getBindingId();
         if (binding == null) {
-            binding = implInfo.getBindingType();
+            binding = jaxBid;
+            
+            if (binding.equals(SOAPBinding.SOAP11HTTP_BINDING) 
+                || binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
+                || binding.equals(SOAPBinding.SOAP12HTTP_BINDING) 
+                || binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
+                binding = "http://schemas.xmlsoap.org/soap/";
+                
+                if (getBindingConfig() == null) {
+                    setBindingConfig(new JaxWsSoapBindingInfoConfigBean(sf));
+                }
+            }
+            
             setBindingId(binding);
         }
         boolean messageMode = implInfo.getServiceMode().equals(javax.xml.ws.Service.Mode.MESSAGE);
         
         if (getBindingConfig() instanceof JaxWsSoapBindingInfoConfigBean) {
-            ((JaxWsSoapBindingInfoConfigBean)getBindingConfig()).setJaxWsServiceFactoryBean(sf);
+            JaxWsSoapBindingInfoConfigBean conf = (JaxWsSoapBindingInfoConfigBean)getBindingConfig();
+            
+            if (jaxBid.equals(binding.equals(SOAPBinding.SOAP12HTTP_BINDING))) {
+                conf.setSoapVersion(Soap12.getInstance());
+            }
+            
+            if (jaxBid.equals(binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))) {
+                conf.setSoapVersion(Soap12.getInstance());
+                conf.setMtomEnabled(true);
+            }
+            
+            if (jaxBid.equals(binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING))) {
+                conf.setMtomEnabled(true);
+            }
+            
+            conf.setJaxWsServiceFactoryBean(sf);
         }
         
         BindingInfo bindingInfo = super.createBindingInfo();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Wed Apr  4 18:03:01 2007
@@ -19,8 +19,6 @@
 
 package org.apache.cxf.jaxws;
 
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Proxy;
 import java.net.URL;
 import java.util.Collection;
 import java.util.HashMap;
@@ -33,17 +31,11 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.jws.WebService;
 import javax.xml.bind.JAXBContext;
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Dispatch;
-//  TODO JAX-WS 2.1
-//import javax.xml.ws.EndpointReference;
 import javax.xml.ws.Service.Mode;
 import javax.xml.ws.WebServiceException;
-//  TODO JAX-WS 2.1
-//import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.HandlerResolver;
 import javax.xml.ws.spi.ServiceDelegate;
@@ -55,8 +47,6 @@
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.databinding.source.SourceDataBinding;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.jaxb.JAXBDataBinding;
@@ -65,6 +55,7 @@
 import org.apache.cxf.jaxws.handler.PortInfoImpl;
 import org.apache.cxf.jaxws.support.DummyImpl;
 import org.apache.cxf.jaxws.support.JaxWsClientEndpointImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
@@ -228,91 +219,61 @@
         LOG.log(Level.FINE, "creating port for portName", portName);
         LOG.log(Level.FINE, "endpoint interface:", serviceEndpointInterface);
 
-        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
-        serviceFactory.setBus(bus);
-        serviceFactory.setServiceName(serviceName);
-        serviceFactory.setServiceClass(serviceEndpointInterface);
+        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
+        JaxWsClientFactoryBean clientFac = (JaxWsClientFactoryBean) proxyFac.getClientFactoryBean();
+        ReflectionServiceFactoryBean serviceFactory = proxyFac.getServiceFactory();
+        
+        proxyFac.setBus(bus);
+        proxyFac.setServiceClass(serviceEndpointInterface);
+        proxyFac.setServiceName(serviceName);
 
         if (wsdlURL != null) {
-            serviceFactory.setWsdlURL(wsdlURL);
+            proxyFac.setWsdlURL(wsdlURL);
         }
 
-        Service service = serviceFactory.create();
-        configureObject(service);
-        service.put(Message.SCHEMA_VALIDATION_ENABLED, service.getEnableSchemaValidationForAllPort());
-
-        QName pn = portName;
-        ServiceInfo si = service.getServiceInfo();
-
-        EndpointInfo ei = null;
         if (portName == null) {
-            if (1 <= si.getEndpoints().size()) {
-                Iterator it = si.getEndpoints().iterator();
-                if (1 == si.getEndpoints().size()) {
-                    ei = (EndpointInfo) it.next();
-                    pn = new QName(service.getName().getNamespaceURI(), ei.getName().getLocalPart());
+            clientFac.create();
+            portName = clientFac.getEndpointName();
+        }
+        
+        serviceFactory.setEndpointName(portName);
+        PortInfoImpl portInfo = portInfos.get(portName);
+        if (portInfo != null) {
+            clientFac.setBindingId(portInfo.getBindingID());
+            clientFac.setAddress(portInfo.getAddress());
+        }
+        configureObject(portName.toString() + ".jaxwsProxyFactory", proxyFac);
+        
+        proxyFac.create();
+        
+        // Configure the Service
+        Service service = serviceFactory.getService();
+        service.put(Message.SCHEMA_VALIDATION_ENABLED, service.getEnableSchemaValidationForAllPort());
+        service.setExecutor(new Executor() {
+            public void execute(Runnable command) {
+                Executor ex = getExecutor();
+                if (ex != null) {
+                    ex.execute(command);
                 } else {
-                    WebService webService = (WebService) serviceEndpointInterface
-                        .getAnnotation(WebService.class);
-                    String name = webService.name();
-                    String nameSpace = webService.targetNamespace();
-                    QName portTypeName = new QName(nameSpace, name);
-                    EndpointInfo epi = null;
-                    while (it.hasNext()) {
-                        epi = (EndpointInfo) it.next();
-                        //InterfaceInfo interfaceInfo = epi.getBinding().getInterface();
-                        if (epi.getBinding().getInterface().getName().equals(portTypeName)) {
-                            pn = new QName(service.getName().getNamespaceURI(), epi.getName().getLocalPart());
-                            ei = epi;
-                            break;
-                        }
-                    }
-                }
-            }
-        } else {
-            // first check the endpointInfo from portInfos
-            PortInfoImpl portInfo = portInfos.get(portName);
-            if (null != portInfo) {
-                try {
-                    ei = createEndpointInfo(serviceFactory, portName, portInfo);
-                } catch (BusException e) {
-                    throw new WebServiceException(e);
+                    command.run();
                 }
-            } else {
-                ei = si.getEndpoint(portName);
             }
-        }
-        if (null == pn) {
-            throw new WebServiceException(BUNDLE.getString("COULD_NOT_DETERMINE_PORT"));
-        }
-
-        JaxWsClientEndpointImpl jaxwsEndpoint;
-        try {
-            jaxwsEndpoint = new JaxWsClientEndpointImpl(bus, service, ei, this);
-        } catch (EndpointException e) {
-            throw new WebServiceException(e);
-        }
-        configureObject(jaxwsEndpoint);        
+        });
+        configureObject(service);
         
+        // Configure the JaxWsEndpoitnImpl
+        JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) clientFac.getClient().getEndpoint();
+        configureObject(jaxwsEndpoint);  
+        
+        QName pn = portName;
         if (jaxwsEndpoint.getEnableSchemaValidation()) {
             jaxwsEndpoint.put(Message.SCHEMA_VALIDATION_ENABLED, jaxwsEndpoint.getEnableSchemaValidation());
         }
 
-        Client client = new ClientImpl(bus, jaxwsEndpoint);
-
-        InvocationHandler ih = new JaxWsClientProxy(client, jaxwsEndpoint.getJaxwsBinding());
-        
-        List<Handler> hc = ((JaxWsClientProxy)ih).getBinding().getHandlerChain();
+        List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain();
         hc.addAll(handlerResolver.getHandlerChain(portInfos.get(pn)));
 
-        // configuration stuff
-        // createHandlerChainForBinding(serviceEndpointInterface, portName,
-        // endpointHandler.getBinding());
-
-        Object obj = Proxy
-            .newProxyInstance(serviceEndpointInterface.getClassLoader(),
-                              new Class[] {serviceEndpointInterface, BindingProvider.class}, ih);
-
+        Object obj = proxyFac.create();
         LOG.log(Level.FINE, "created proxy", obj);
 
         ports.add(pn);
@@ -354,9 +315,13 @@
     }
 
     private void configureObject(Object instance) {
+        configureObject(null, instance);
+    }
+    
+    private void configureObject(String name, Object instance) {
         Configurer configurer = bus.getExtension(Configurer.class);
         if (null != configurer) {
-            configurer.configureBean(instance);
+            configurer.configureBean(name, instance);
         }
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -23,6 +23,7 @@
 import java.util.Map;
 import java.util.concurrent.Executor;
 
+import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
@@ -55,6 +56,8 @@
     private String binding;
     private Map<String, Object> properties;
     private String wsdlLocation;
+    private QName endpointName;
+    private QName serviceName;
     
     public void setApplicationContext(ApplicationContext c) 
         throws BeansException {
@@ -81,18 +84,25 @@
         }
 
         if (serviceFactory == null) {
-            //TODO support to lookup wsdl from classpath
-            if (null != wsdlLocation && wsdlLocation.length() > 0) {
-                //if wsdl can't be found, we will try to init Endpoint without wsdl
-                URL wsdl = ClassLoaderUtils.getResource(wsdlLocation, this.getClass());                
-                endpoint = new EndpointImpl(bus, implementor, binding, wsdl);
-            } else {
-                endpoint = new EndpointImpl(bus, implementor, binding);
+            serviceFactory = new JaxWsServiceFactoryBean();
+            
+        }
+        
+        serviceFactory.setServiceClass(implementor.getClass());
+        serviceFactory.setBus(bus);
+        serviceFactory.setServiceName(serviceName);
+        serviceFactory.setEndpointName(endpointName);
+        
+        if (null != wsdlLocation && wsdlLocation.length() > 0) {
+            //if wsdl can't be found, we will try to init Endpoint without wsdl
+            URL wsdl = ClassLoaderUtils.getResource(wsdlLocation, this.getClass());                
+            if (null != wsdl) {
+                serviceFactory.setWsdlURL(wsdl);
             }
-        } else {
-            endpoint = new EndpointImpl(bus, implementor, serviceFactory);
         }
         
+        endpoint = new EndpointImpl(bus, implementor, serviceFactory);
+        
         if (executor != null) {
             endpoint.setExecutor(executor);
         }
@@ -200,6 +210,22 @@
 
     public void setWsdlLocation(String wsdlLocation) {
         this.wsdlLocation = wsdlLocation;
+    }
+
+    public QName getEndpointName() {
+        return endpointName;
+    }
+
+    public void setEndpointName(QName endpointName) {
+        this.endpointName = endpointName;
+    }
+
+    public QName getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(QName serviceName) {
+        this.serviceName = serviceName;
     }
     
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java Wed Apr  4 18:03:01 2007
@@ -21,6 +21,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
+
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -44,11 +46,18 @@
         for (int i = 0; i < atts.getLength(); i++) {
             Attr node = (Attr) atts.item(i);
             String val = node.getValue();
+            String pre = node.getPrefix();
+            String name = node.getLocalName();
             
-            if (IMPLEMENTOR.equals(node.getLocalName())) {
-                loadImplementor(bean, val);
-            } else {
-                mapToProperty(bean, node.getLocalName(), val);
+            if (isAttribute(pre, name)) {
+                if ("endpointName".equals(name) || "serviceName".equals(name)) {
+                    QName q = parseQName(element, val);
+                    bean.addPropertyValue(name, q);
+                } else if (IMPLEMENTOR.equals(name)) {
+                    loadImplementor(bean, val);
+                } else {
+                    mapToProperty(bean, name, val);
+                }
             }
         }
         

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java?view=auto&rev=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java Wed Apr  4 18:03:01 2007
@@ -0,0 +1,96 @@
+/**
+ * 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.spring;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.xml.ParserContext;
+
+public class JaxWsProxyFactoryBeanDefinitionParser extends AbstractBeanDefinitionParser {
+
+    @Override
+    protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder clientBean) {
+        
+        BeanDefinitionBuilder bean = BeanDefinitionBuilder.rootBeanDefinition(JaxWsProxyFactoryBean.class);
+
+        NamedNodeMap atts = element.getAttributes();
+        String id = null;
+        for (int i = 0; i < atts.getLength(); i++) {
+            Attr node = (Attr) atts.item(i);
+            String val = node.getValue();
+            String pre = node.getPrefix();
+            String name = node.getLocalName();
+            if (!"id".equals(name) && isAttribute(pre, name)) {
+                if ("endpointName".equals(name) || "serviceName".equals(name)) {
+                    QName q = parseQName(element, val);
+                    bean.addPropertyValue(name, q);
+                } else {
+                    mapToProperty(bean, name, val);
+                }
+            } else if ("id".equals(name)) {
+                id = val;
+            } else if ("abstract".equals(name)) {
+                bean.setAbstract(true);
+                clientBean.setAbstract(true);
+            }
+            
+        }
+        
+        NodeList children = element.getChildNodes();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node n = children.item(i);
+            if (n.getNodeType() == Node.ELEMENT_NODE) {
+                String name = n.getLocalName();
+                if ("properties".equals(n.getLocalName())) {
+                    Map map = ctx.getDelegate().parseMapElement((Element) n, bean.getBeanDefinition());
+                    bean.addPropertyValue("properties", map);
+                } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)
+                    || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name)) {
+                    List list = ctx.getDelegate().parseListElement((Element) n, bean.getBeanDefinition());
+                    bean.addPropertyValue(n.getLocalName(), list);
+                } else {
+                    setFirstChildAsProperty((Element) n, ctx, bean, n.getLocalName());
+                }
+            }
+        }
+        
+        String factoryId = id + ".jaxwsProxyFactory";
+        ctx.getRegistry().registerBeanDefinition(factoryId, bean.getBeanDefinition());
+        
+        clientBean.getBeanDefinition().setAttribute("id", id);
+        clientBean.setFactoryBean(factoryId, "create");
+    }
+
+    @Override
+    protected Class getBeanClass(Element arg0) {
+        return Object.class;
+    }
+}

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

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
------------------------------------------------------------------------------
    svn:executable = *

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

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java Wed Apr  4 18:03:01 2007
@@ -22,6 +22,7 @@
 
 public class NamespaceHandler extends NamespaceHandlerSupport {
     public void init() {
+        registerBeanDefinitionParser("client", new JaxWsProxyFactoryBeanDefinitionParser());        
         registerBeanDefinitionParser("endpoint", new EndpointFactoryBeanDefinitionParser());        
         registerBeanDefinitionParser("server", new ServerBeanDefinitionParser());        
     }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd Wed Apr  4 18:03:01 2007
@@ -29,7 +29,7 @@
           <xsd:attribute name="bus" type="xsd:string" />
           <xsd:attribute name="implementor" type="xsd:string"/>
           <xsd:attribute name="publish" type="xsd:boolean" default="true"/>
-          <xsd:attribute name="portName" type="xsd:QName" />
+          <xsd:attribute name="endpointName" type="xsd:QName" />
           <xsd:attribute name="serviceName" type="xsd:QName" />
           <xsd:attribute name="wsdlLocation" type="xsd:string" />
         </xsd:extension>
@@ -66,4 +66,28 @@
     </xsd:complexType>
   </xsd:element>
 
+  <xsd:element name="client">
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="beans:identifiedType">
+          <xsd:sequence>
+            <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="properties" type="beans:mapType" minOccurs="0"/>
+          </xsd:sequence>
+          <xsd:attribute name="address" type="xsd:string" />
+          <xsd:attribute name="binding" type="xsd:string" />
+          <xsd:attribute name="bus" type="xsd:string" />
+          <xsd:attribute name="endpointName" type="xsd:QName" />
+          <xsd:attribute name="password" type="xsd:string" />
+          <xsd:attribute name="serviceClass" type="xsd:QName" />
+          <xsd:attribute name="serviceName" type="xsd:QName" />
+          <xsd:attribute name="username" type="xsd:string" />
+          <xsd:attribute name="wsdlLocation" type="xsd:string" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
 </xsd:schema>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Wed Apr  4 18:03:01 2007
@@ -153,4 +153,5 @@
         //List<String> result = proxy.getGreetings();
         //assertEquals(2, result.size());
     }
+
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceImplTest.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceImplTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceImplTest.java Wed Apr  4 18:03:01 2007
@@ -18,13 +18,30 @@
  */
 package org.apache.cxf.jaxws;
 
-import org.junit.Ignore;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
 import org.junit.Test;
 
 public class ServiceImplTest extends AbstractJaxWsTest {
     @Test
-    @Ignore
     public void testServiceImpl() throws Exception {
-        // new ServiceImpl(getBus(), )
+        SOAPService service = new SOAPService();
+        
+        Greeter proxy = service.getSoapPort();
+        
+        Client client = ClientProxy.getClient(proxy);
+        assertEquals("bar", client.getEndpoint().get("foo"));
     }
+
+    @Override
+    protected Bus createBus() throws BusException {
+        SpringBusFactory bf = new SpringBusFactory();
+        return bf.createBus("/org/apache/cxf/jaxws/soapServiceConfig.xml");
+    }
+    
 }

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml?view=auto&rev=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml Wed Apr  4 18:03:01 2007
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xmlns:jaxws="http://cxf.apache.org/jaxws"
+      xmlns:soap="http://cxf.apache.org/bindings/soap"
+      xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap http://cxf.apache.org/schema/bindings/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
+
+  
+  <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort" abstract="true">
+     <jaxws:properties>
+      <entry key="foo" value="bar"/>
+    </jaxws:properties>
+  </jaxws:client>
+
+</beans>

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

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml
------------------------------------------------------------------------------
    svn:executable = *

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

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/soapServiceConfig.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java Wed Apr  4 18:03:01 2007
@@ -20,7 +20,10 @@
 
 import java.util.List;
 
-import junit.framework.TestCase;
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
 import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
 import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
 import org.apache.cxf.endpoint.Endpoint;
@@ -30,9 +33,12 @@
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.jaxws.service.Hello;
+import org.apache.hello_world_soap_http.Greeter;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class SpringBeansTest extends TestCase {
+public class SpringBeansTest extends Assert {
+    @Test
     public void testEndpoints() throws Exception {
         ClassPathXmlApplicationContext ctx = 
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/endpoints.xml"});
@@ -71,6 +77,14 @@
         ep = (EndpointImpl) bean;
         assertTrue(ep.getImplementor() instanceof Hello);
         
+        QName name = ep.getServer().getEndpoint().getService().getName();
+        assertEquals("http://service.jaxws.cxf.apache.org/service", name.getNamespaceURI());
+        assertEquals("HelloServiceCustomized", name.getLocalPart());
+        
+        name = ep.getServer().getEndpoint().getEndpointInfo().getName();
+        assertEquals("http://service.jaxws.cxf.apache.org/endpoint", name.getNamespaceURI());
+        assertEquals("HelloEndpointCustomized", name.getLocalPart());
+        
         bean = ctx.getBean("wsdlLocation");
         assertNotNull(bean);
         
@@ -101,6 +115,7 @@
         }
     }
     
+    @Test
     public void testServers() throws Exception {
         ClassPathXmlApplicationContext ctx = 
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/servers.xml"});
@@ -110,5 +125,19 @@
 
         bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
         assertNotNull(bean);
+    }
+    
+
+    @Test
+    public void testClients() throws Exception {
+        ClassPathXmlApplicationContext ctx = 
+            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/clients.xml"});
+
+        Object bean = ctx.getBean("client1.jaxwsProxyFactory");
+        assertNotNull(bean);
+        
+        Greeter c1 = (Greeter) ctx.getBean("client1");
+        assertNotNull(c1);
+
     }
 }

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml?view=auto&rev=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml Wed Apr  4 18:03:01 2007
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xmlns:jaxws="http://cxf.apache.org/jaxws"
+      xmlns:soap="http://cxf.apache.org/bindings/soap"
+      xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap http://cxf.apache.org/schema/bindings/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
+
+  <import resource="classpath:META-INF/cxf/cxf.xml"/>
+  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
+    
+  <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
+      <property name="transportIds">
+          <list>
+              <value>http://cxf.apache.org/transports/local</value>
+              <value>http://schemas.xmlsoap.org/soap/http</value>
+              <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
+          </list>
+      </property>
+  </bean>
+  
+  <jaxws:client id="client1" 
+    serviceClass="org.apache.hello_world_soap_http.Greeter"
+    address="http://localhost:9000/foo"
+    serviceName="s:SOAPService"
+    xmlns:s="http://apache.org/hello_world_soap_http"/>
+    
+<!--
+  
+  <jaxws:endpoint id="epWithProps" 
+    implementor="#greeter"
+    address="http://localhost:8080/test">
+    <jaxws:properties>
+      <entry key="foo" value="bar"/>
+    </jaxws:properties>
+  </jaxws:endpoint>
+  
+  <jaxws:endpoint id="classImpl" 
+    implementor="org.apache.cxf.jaxws.service.Hello"
+    address="http://localhost:8080/test"/>
+    
+  <jaxws:endpoint id="wsdlLocation" 
+    implementor="#greeter" address="http://localhost:8080/simpleWithAddress"
+    wsdlLocation="wsdl/hello_world.wsdl"/>
+    
+      
+  <jaxws:endpoint id="epWithInterceptors" 
+    implementor="org.apache.cxf.jaxws.service.Hello"
+    address="http://localhost:8080/test">
+	<jaxws:inInterceptors>
+	  <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+	  <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+	</jaxws:inInterceptors>
+	<jaxws:outInterceptors>
+	  <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+	  <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+	</jaxws:outInterceptors>
+  </jaxws:endpoint>
+    -->
+</beans>

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/clients.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml Wed Apr  4 18:03:01 2007
@@ -62,7 +62,11 @@
   
   <jaxws:endpoint id="classImpl" 
     implementor="org.apache.cxf.jaxws.service.Hello"
-    address="http://localhost:8080/test"/>
+    endpointName="e:HelloEndpointCustomized"
+    serviceName="s:HelloServiceCustomized"
+    address="http://localhost:8080/test"
+    xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
+    xmlns:s="http://service.jaxws.cxf.apache.org/service"/>
     
   <jaxws:endpoint id="wsdlLocation" 
     implementor="#greeter" address="http://localhost:8080/simpleWithAddress"

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java Wed Apr  4 18:03:01 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.frontend;
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Logger;
@@ -39,6 +40,7 @@
 import org.apache.cxf.service.factory.ServiceConstructionException;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.ws.AbstractWSFeature;
@@ -73,7 +75,7 @@
         if (endpointName == null) {
             endpointName = serviceFactory.getEndpointName();
         }
-
+        
         EndpointInfo ei = service.getServiceInfo().getEndpoint(endpointName);
         if (ei != null
             && transportId != null
@@ -83,7 +85,12 @@
         
         Endpoint ep = null;
         if (ei == null) {
-            ei = createEndpointInfo();
+            if (getAddress() == null) {
+                ei = findBestEndpointInfo(service.getServiceInfo());
+            } 
+            if (ei == null) {
+                ei = createEndpointInfo();
+            }
         } else if (getAddress() != null) {
             ei.setAddress(getAddress()); 
         }                        
@@ -113,6 +120,25 @@
             ep.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
         }
         return ep;
+    }
+
+    protected EndpointInfo findBestEndpointInfo(ServiceInfo serviceInfo) {
+        Collection<EndpointInfo> eps = serviceInfo.getEndpoints();
+        if (eps.size() == 1) {
+            return eps.iterator().next();
+        } else {
+            for (EndpointInfo ep : eps) {
+                if (ep.getTransportId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) {
+                    return ep;
+                }
+            }
+        } 
+        
+        if (eps.size() > 0) {
+            return eps.iterator().next();
+        }
+        
+        return null;
     }
 
     protected EndpointInfo createEndpointInfo() throws BusException {

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -36,10 +36,14 @@
     }
 
     public Client create() {
+        if (client != null) {
+            return client;
+        }
+        
         try {
             Endpoint ep = createEndpoint();
             
-            client = new ClientImpl(getBus(), ep);
+            createClient(ep);
         } catch (EndpointException e) {
             throw new ServiceConstructionException(e);
         } catch (BusException e) {
@@ -49,6 +53,10 @@
         applyFeatures();
         
         return client;
+    }
+
+    protected void createClient(Endpoint ep) {
+        client = new ClientImpl(getBus(), ep);
     }
 
     protected void applyFeatures() {

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java Wed Apr  4 18:03:01 2007
@@ -23,9 +23,12 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
 import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 
 /**
@@ -41,7 +44,7 @@
  * Client cxfClient = ClientProxy.getClient(client);
  * </pre>
  */
-public class ClientProxyFactoryBean {
+public class ClientProxyFactoryBean extends AbstractBasicInterceptorProvider {
     private ClientFactoryBean clientFactoryBean;
     private String username;
     private String password;
@@ -73,14 +76,24 @@
 
         Client c = clientFactoryBean.create();
 
-        ClientProxy handler = new ClientProxy(c);
+        ClientProxy handler = clientClientProxy(c);
 
-        Class cls = clientFactoryBean.getServiceClass();
-        Object obj = Proxy.newProxyInstance(cls.getClassLoader(), new Class[] {cls}, handler);
+        Object obj = Proxy.newProxyInstance(clientFactoryBean.getServiceClass().getClassLoader(), 
+                                            getImplementingClasses(), 
+                                            handler);
 
         return obj;
     }
 
+    protected Class[] getImplementingClasses() {
+        Class cls = clientFactoryBean.getServiceClass();
+        return new Class[] {cls};
+    }
+
+    protected ClientProxy clientClientProxy(Client c) {
+        return new ClientProxy(c);
+    }
+
     public ClientFactoryBean getClientFactoryBean() {
         return clientFactoryBean;
     }
@@ -119,6 +132,23 @@
 
     public void setWsdlURL(URL wsdlURL) {
         clientFactoryBean.getServiceFactory().setWsdlURL(wsdlURL);
+    }
+
+    public QName getEndpointName() {
+        return clientFactoryBean.getEndpointName();
+    }
+
+    public void setEndpointName(QName endpointName) {
+        System.out.println("Setting endpoint name " + endpointName);
+        clientFactoryBean.setEndpointName(endpointName);
+    }
+
+    public QName getServiceName() {
+        return getServiceFactory().getServiceQName();
+    }
+
+    public void setServiceName(QName serviceName) {
+        getServiceFactory().setServiceName(serviceName);
     }
 
     public String getAddress() {

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?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- 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 Wed Apr  4 18:03:01 2007
@@ -105,6 +105,7 @@
     private SimpleMethodDispatcher methodDispatcher = new SimpleMethodDispatcher();
     private Boolean wrappedStyle;
     private Map<String, Object> properties;
+    private QName endpointName;
     
     public ReflectionServiceFactoryBean() {
         getServiceConfigurations().add(0, new DefaultServiceConfiguration());
@@ -504,7 +505,7 @@
         return rawClass;
     }
     
-    protected QName getServiceQName() { 
+    public QName getServiceQName() { 
         if (serviceName == null) {
             serviceName = new QName(getServiceNamespace(), getServiceName());
         }
@@ -513,15 +514,24 @@
     }
     
     public QName getEndpointName() {
+        if (endpointName != null) {
+            return endpointName;
+        }
+        
         for (AbstractServiceConfiguration c : serviceConfigurations) {
             QName name = c.getEndpointName();
             if (name != null) {
+                endpointName = name;
                 return name;
             }
         }
         throw new IllegalStateException("ServiceConfiguration must provide a value!");
     }
 
+    public void setEndpointName(QName en) {
+        this.endpointName = en;
+    }
+    
     protected String getServiceName() {
         for (AbstractServiceConfiguration c : serviceConfigurations) {
             String name = c.getServiceName();

Modified: incubator/cxf/trunk/rt/ws/security/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/security/pom.xml?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/rt/ws/security/pom.xml (original)
+++ incubator/cxf/trunk/rt/ws/security/pom.xml Wed Apr  4 18:03:01 2007
@@ -103,16 +103,6 @@
         </dependency>
 
         <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-            <version>2.7.1</version>
-        </dependency>
-        <dependency>
-            <groupId>xml-apis</groupId>
-            <artifactId>xml-apis</artifactId>
-            <version>1.0.b2</version>
-        </dependency>
-        <dependency>
             <groupId>xml-security</groupId>
             <artifactId>xmlsec</artifactId>
             <version>1.3.0</version>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java Wed Apr  4 18:03:01 2007
@@ -61,12 +61,6 @@
         }
         assertNotNull("binding factory not available", 
                       bfm.getBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/"));
-        assertNotNull("binding factory not available", 
-                      bfm.getBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/http"));
-        assertNotNull("binding factory not available", 
-                      bfm.getBindingFactory("http://cxf.apache.org/transports/jms"));   
-        assertNotNull("binding factory not available", 
-                      bfm.getBindingFactory("http://cxf.apache.org/bindings/xformat"));
         
         
         try {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?view=diff&rev=525667&r1=525666&r2=525667
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java Wed Apr  4 18:03:01 2007
@@ -154,7 +154,7 @@
     }
     
     @Test
-    public void testGetPortOnePara() throws Exception {
+    public void testGetPortOneParam() throws Exception {
 
         Service service = Service.create(serviceName);
         



RE: Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Sorry, I missed the ServiceImplTest after just looking under the
test/.../jaxws/spring dir for the relevant tests. My mistake.

Thanks,
Eoghan 

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 11 April 2007 18:40
> To: cxf-dev@incubator.apache.org
> Cc: cxf-commits@incubator.apache.org
> Subject: Re: Generic client config [WAS: svn commit: r525667]
> 
> Hiya
> 
> On 4/11/07, Glynn, Eoghan <eo...@iona.com> wrote:
> 
> >
> > 1. How does the <jaxws:client> id attribute relate to the 
> target port 
> > name? e.g. id="MyPort", or id="MyService/MyPort", or 
> > id="{http://myNamespace}MyService/MyPort", or some 
> wildcarded variant, 
> > or something else entirely?
> 
> 
> It pulls out the <jaxws:client> config by the port name.
> 
> From the ServiceImplTest/soapServiceConfig.xml:
> 
>   <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort"
> abstract="true">
>      <jaxws:properties>
>       <entry key="foo" value="bar"/>
>     </jaxws:properties>
>   </jaxws:client>
> 
> 
> 2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
> > instance relate to JAX-WS proxies created on demand, i.e. via 
> > Service.getPort()? Unless I'm missing something, the Spring-loaded 
> > <jaxws:client> instance seems to be created upfront from the 
> > ApplicationContext when the Bus is being init'd. How is this client 
> > instance then related to the (distinct?) client instances 
> created as a 
> > result of subsequent calls to Service.getPort()?
> >
> > The answer to #2 may well follow on from #1. Its not really 
> clear to 
> > me from your JAX-WS SpringBeansTest which uses an 
> ApplicationContext 
> > directly to retrieve the Client instance instead of using
> > Service.getPort() (which obviously is what JAX-WS 
> application writers 
> > would normally want to do).
> 
> 
> The SpringBeansTest uses the Spring-first approach, i.e. it 
> creates a client with that id that people can inject into 
> their applications.
> 
> The ServiceImplTest shows the approach which I think you're 
> concerned about
> - where someone creates a Service instance via the API and 
> configures it via XML.
> 
> - Dan
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

RE: Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Sorry, I missed the ServiceImplTest after just looking under the
test/.../jaxws/spring dir for the relevant tests. My mistake.

Thanks,
Eoghan 

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 11 April 2007 18:40
> To: cxf-dev@incubator.apache.org
> Cc: cxf-commits@incubator.apache.org
> Subject: Re: Generic client config [WAS: svn commit: r525667]
> 
> Hiya
> 
> On 4/11/07, Glynn, Eoghan <eo...@iona.com> wrote:
> 
> >
> > 1. How does the <jaxws:client> id attribute relate to the 
> target port 
> > name? e.g. id="MyPort", or id="MyService/MyPort", or 
> > id="{http://myNamespace}MyService/MyPort", or some 
> wildcarded variant, 
> > or something else entirely?
> 
> 
> It pulls out the <jaxws:client> config by the port name.
> 
> From the ServiceImplTest/soapServiceConfig.xml:
> 
>   <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort"
> abstract="true">
>      <jaxws:properties>
>       <entry key="foo" value="bar"/>
>     </jaxws:properties>
>   </jaxws:client>
> 
> 
> 2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
> > instance relate to JAX-WS proxies created on demand, i.e. via 
> > Service.getPort()? Unless I'm missing something, the Spring-loaded 
> > <jaxws:client> instance seems to be created upfront from the 
> > ApplicationContext when the Bus is being init'd. How is this client 
> > instance then related to the (distinct?) client instances 
> created as a 
> > result of subsequent calls to Service.getPort()?
> >
> > The answer to #2 may well follow on from #1. Its not really 
> clear to 
> > me from your JAX-WS SpringBeansTest which uses an 
> ApplicationContext 
> > directly to retrieve the Client instance instead of using
> > Service.getPort() (which obviously is what JAX-WS 
> application writers 
> > would normally want to do).
> 
> 
> The SpringBeansTest uses the Spring-first approach, i.e. it 
> creates a client with that id that people can inject into 
> their applications.
> 
> The ServiceImplTest shows the approach which I think you're 
> concerned about
> - where someone creates a Service instance via the API and 
> configures it via XML.
> 
> - Dan
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

Re: Generic client config [WAS: svn commit: r525667]

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya

On 4/11/07, Glynn, Eoghan <eo...@iona.com> wrote:

>
> 1. How does the <jaxws:client> id attribute relate to the target port
> name? e.g. id="MyPort", or id="MyService/MyPort", or
> id="{http://myNamespace}MyService/MyPort", or some wildcarded variant,
> or something else entirely?


It pulls out the <jaxws:client> config by the port name.

>From the ServiceImplTest/soapServiceConfig.xml:

  <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort"
abstract="true">
     <jaxws:properties>
      <entry key="foo" value="bar"/>
    </jaxws:properties>
  </jaxws:client>


2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
> instance relate to JAX-WS proxies created on demand, i.e. via
> Service.getPort()? Unless I'm missing something, the Spring-loaded
> <jaxws:client> instance seems to be created upfront from the
> ApplicationContext when the Bus is being init'd. How is this client
> instance then related to the (distinct?) client instances created as a
> result of subsequent calls to Service.getPort()?
>
> The answer to #2 may well follow on from #1. Its not really clear to me
> from your JAX-WS SpringBeansTest which uses an ApplicationContext
> directly to retrieve the Client instance instead of using
> Service.getPort() (which obviously is what JAX-WS application writers
> would normally want to do).


The SpringBeansTest uses the Spring-first approach, i.e. it creates a client
with that id that people can inject into their applications.

The ServiceImplTest shows the approach which I think you're concerned about
- where someone creates a Service instance via the API and configures it via
XML.

- Dan

-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Generic client config [WAS: svn commit: r525667]

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya

On 4/11/07, Glynn, Eoghan <eo...@iona.com> wrote:

>
> 1. How does the <jaxws:client> id attribute relate to the target port
> name? e.g. id="MyPort", or id="MyService/MyPort", or
> id="{http://myNamespace}MyService/MyPort", or some wildcarded variant,
> or something else entirely?


It pulls out the <jaxws:client> config by the port name.

>From the ServiceImplTest/soapServiceConfig.xml:

  <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort"
abstract="true">
     <jaxws:properties>
      <entry key="foo" value="bar"/>
    </jaxws:properties>
  </jaxws:client>


2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
> instance relate to JAX-WS proxies created on demand, i.e. via
> Service.getPort()? Unless I'm missing something, the Spring-loaded
> <jaxws:client> instance seems to be created upfront from the
> ApplicationContext when the Bus is being init'd. How is this client
> instance then related to the (distinct?) client instances created as a
> result of subsequent calls to Service.getPort()?
>
> The answer to #2 may well follow on from #1. Its not really clear to me
> from your JAX-WS SpringBeansTest which uses an ApplicationContext
> directly to retrieve the Client instance instead of using
> Service.getPort() (which obviously is what JAX-WS application writers
> would normally want to do).


The SpringBeansTest uses the Spring-first approach, i.e. it creates a client
with that id that people can inject into their applications.

The ServiceImplTest shows the approach which I think you're concerned about
- where someone creates a Service instance via the API and configures it via
XML.

- Dan

-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

RE: Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Hi Dan,

A couple more quick questions on this <jaxws:client> config ...

1. How does the <jaxws:client> id attribute relate to the target port
name? e.g. id="MyPort", or id="MyService/MyPort", or
id="{http://myNamespace}MyService/MyPort", or some wildcarded variant,
or something else entirely?

2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
instance relate to JAX-WS proxies created on demand, i.e. via
Service.getPort()? Unless I'm missing something, the Spring-loaded
<jaxws:client> instance seems to be created upfront from the
ApplicationContext when the Bus is being init'd. How is this client
instance then related to the (distinct?) client instances created as a
result of subsequent calls to Service.getPort()? 

The answer to #2 may well follow on from #1. Its not really clear to me
from your JAX-WS SpringBeansTest which uses an ApplicationContext
directly to retrieve the Client instance instead of using
Service.getPort() (which obviously is what JAX-WS application writers
would normally want to do).

Thanks,
Eoghan 

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 05 April 2007 19:33
> To: cxf-dev@incubator.apache.org
> Cc: cxf-commits@incubator.apache.org
> Subject: Re: Generic client config [WAS: svn commit: r525667]
> 
> Hiya Eoghan,
> 
> Yes this could be made more generic. Its been more a time 
> thing than anything. There is support for specifying 
> interceptors on the <jaxws:endpoint> bean as well. But a 
> <cxf:bus> bean would be great too.
> 
> Just a side note - <jaxws:client/> gets applied to to the 
> JaxWsProxyFactoryBean, not the Client instance itself.
> 
> - Dan
> 
> On 4/5/07, Glynn, Eoghan <eo...@iona.com> wrote:
> >
> >
> >
> >
> > Dan,
> >
> > Quick question about this commit.
> >
> > I presume from the namespace that the <jaxws:client> config bean is 
> > limited to JAX-WS proxies, as opposed to 
> > org.apache.cxf.endpoint.Clients in general, or?
> >
> > Could it be made more generic? Which elements/attributes are 
> > definitely specific to JAX-WS?
> >
> > In particular I'm thinking the {in|out}[Fault]Interceptors elements 
> > should be configurable for any Client, whether JAX-WS or simple. As 
> > all the other client-side InterceptorProviders (Bus, Endpoint, 
> > Binding) are configurable in this way, whereas the generic 
> Client must 
> > seems to be the odd-man-out, needing its interceptor chains to be 
> > specified programmatically.
> >
> > Maybe these generic aspects should be moved to a base bean type for 
> > the generic Client, which is then specialized for JAX-WS?
> >
> > Cheers,
> > Eoghan
> >
> >
> > > -----Original Message-----
> > > From: dandiep@apache.org [mailto:dandiep@apache.org]
> > > Sent: 05 April 2007 02:03
> > > To: cxf-commits@incubator.apache.org
> > > Subject: svn commit: r525667 - in /incubator/cxf/trunk:
> > > api/src/main/java/org/apache/cxf/configuration/
> > > common/common/src/main/java/org/apache/cxf/configuration/sprin
> > > g/ common/common/src/main/java/org/apache/cxf/helpers/
> > > integration/jca/src/main/java/org/apache...
> > >
> > > Author: dandiep
> > > Date: Wed Apr  4 18:03:01 2007
> > > New Revision: 525667
> > >
> > > URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> > > Log:
> > > o Make ServiceImpl use the JaxWsClientFactoryBean instead of 
> > > replicating
> > >   the same code in multiple places.
> > > o Enable <jaxws:client> configuration for both Spring-only and 
> > > ServiceImpl
> > >   cases.
> > > o Add support for setting endpointName & serviceName on 
> > > EndpointFactoryBean.
> > >   EndpointFactoryBean still needs to be unified with 
> > > ServerFactoryBean &
> > >   EndpointImpl somehow. Also I need to add in support for 
> > > configuring a
> > >   EndpointImpl via <jaxws:endpoint>. That should come in my next 
> > > commit.
> > > o Remove http/jms namespaces from SoapBindingFactory 
> configurations. 
> > > Properly
> > >   check for these the JAX-WS binding ids inside 
> > > JaxWsServerFactoryBean and map
> > >   them to the appropriate binding configurations. Now if 
> you select 
> > > the
> > >   SOAP12_MTOM_BINDING, you should actually get a binding 
> with soap 
> > > 1.2 and
> > >   MTOM enabled - although this does need some proper tests.
> > >
> > >
> > > Added:
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
> > >  (with props)
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/soapServiceConfig.xml   (with props)
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/clients.xml   (with props)
> > > Modified:
> > >
> > > incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> > > tion/Configurer.java
> > >
> > > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > > /configuration/spring/AbstractBeanDefinitionParser.java
> > >
> > > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > > /helpers/DOMUtils.java
> > >
> > > incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> > > xf/jca/cxf/ManagedConnectionImpl.java
> > >
> > > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > > NF/bus-extensions.xml
> > >
> > > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > > NF/cxf/cxf-extension-soap.xml
> > >
> > > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > > guration/NullConfigurer.java
> > >
> > > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > > guration/spring/ConfigurerImpl.java
> > >
> > > 
> incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/EndpointImpl.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsClientFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsProxyFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsServerFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/ServiceImpl.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/EndpointFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/NamespaceHandler.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> > > pache/cxf/jaxws/spring/jaxws.xsd
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/CodeFirstTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/ServiceImplTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/SpringBeansTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/endpoints.xml
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/AbstractEndpointFactory.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/ClientFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/ClientProxyFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/service/factory/ReflectionServiceFactoryBean.java
> > >     incubator/cxf/trunk/rt/ws/security/pom.xml
> > >
> > > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > > est/bus/SpringBusFactoryTest.java
> > >
> > > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > > est/jaxws/ClientServerTest.java
> > >
> >
> 
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

RE: Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Hi Dan,

A couple more quick questions on this <jaxws:client> config ...

1. How does the <jaxws:client> id attribute relate to the target port
name? e.g. id="MyPort", or id="MyService/MyPort", or
id="{http://myNamespace}MyService/MyPort", or some wildcarded variant,
or something else entirely?

2. How does the lifecycle of the Spring-loaded <jaxws:client> bean
instance relate to JAX-WS proxies created on demand, i.e. via
Service.getPort()? Unless I'm missing something, the Spring-loaded
<jaxws:client> instance seems to be created upfront from the
ApplicationContext when the Bus is being init'd. How is this client
instance then related to the (distinct?) client instances created as a
result of subsequent calls to Service.getPort()? 

The answer to #2 may well follow on from #1. Its not really clear to me
from your JAX-WS SpringBeansTest which uses an ApplicationContext
directly to retrieve the Client instance instead of using
Service.getPort() (which obviously is what JAX-WS application writers
would normally want to do).

Thanks,
Eoghan 

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 05 April 2007 19:33
> To: cxf-dev@incubator.apache.org
> Cc: cxf-commits@incubator.apache.org
> Subject: Re: Generic client config [WAS: svn commit: r525667]
> 
> Hiya Eoghan,
> 
> Yes this could be made more generic. Its been more a time 
> thing than anything. There is support for specifying 
> interceptors on the <jaxws:endpoint> bean as well. But a 
> <cxf:bus> bean would be great too.
> 
> Just a side note - <jaxws:client/> gets applied to to the 
> JaxWsProxyFactoryBean, not the Client instance itself.
> 
> - Dan
> 
> On 4/5/07, Glynn, Eoghan <eo...@iona.com> wrote:
> >
> >
> >
> >
> > Dan,
> >
> > Quick question about this commit.
> >
> > I presume from the namespace that the <jaxws:client> config bean is 
> > limited to JAX-WS proxies, as opposed to 
> > org.apache.cxf.endpoint.Clients in general, or?
> >
> > Could it be made more generic? Which elements/attributes are 
> > definitely specific to JAX-WS?
> >
> > In particular I'm thinking the {in|out}[Fault]Interceptors elements 
> > should be configurable for any Client, whether JAX-WS or simple. As 
> > all the other client-side InterceptorProviders (Bus, Endpoint, 
> > Binding) are configurable in this way, whereas the generic 
> Client must 
> > seems to be the odd-man-out, needing its interceptor chains to be 
> > specified programmatically.
> >
> > Maybe these generic aspects should be moved to a base bean type for 
> > the generic Client, which is then specialized for JAX-WS?
> >
> > Cheers,
> > Eoghan
> >
> >
> > > -----Original Message-----
> > > From: dandiep@apache.org [mailto:dandiep@apache.org]
> > > Sent: 05 April 2007 02:03
> > > To: cxf-commits@incubator.apache.org
> > > Subject: svn commit: r525667 - in /incubator/cxf/trunk:
> > > api/src/main/java/org/apache/cxf/configuration/
> > > common/common/src/main/java/org/apache/cxf/configuration/sprin
> > > g/ common/common/src/main/java/org/apache/cxf/helpers/
> > > integration/jca/src/main/java/org/apache...
> > >
> > > Author: dandiep
> > > Date: Wed Apr  4 18:03:01 2007
> > > New Revision: 525667
> > >
> > > URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> > > Log:
> > > o Make ServiceImpl use the JaxWsClientFactoryBean instead of 
> > > replicating
> > >   the same code in multiple places.
> > > o Enable <jaxws:client> configuration for both Spring-only and 
> > > ServiceImpl
> > >   cases.
> > > o Add support for setting endpointName & serviceName on 
> > > EndpointFactoryBean.
> > >   EndpointFactoryBean still needs to be unified with 
> > > ServerFactoryBean &
> > >   EndpointImpl somehow. Also I need to add in support for 
> > > configuring a
> > >   EndpointImpl via <jaxws:endpoint>. That should come in my next 
> > > commit.
> > > o Remove http/jms namespaces from SoapBindingFactory 
> configurations. 
> > > Properly
> > >   check for these the JAX-WS binding ids inside 
> > > JaxWsServerFactoryBean and map
> > >   them to the appropriate binding configurations. Now if 
> you select 
> > > the
> > >   SOAP12_MTOM_BINDING, you should actually get a binding 
> with soap 
> > > 1.2 and
> > >   MTOM enabled - although this does need some proper tests.
> > >
> > >
> > > Added:
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
> > >  (with props)
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/soapServiceConfig.xml   (with props)
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/clients.xml   (with props)
> > > Modified:
> > >
> > > incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> > > tion/Configurer.java
> > >
> > > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > > /configuration/spring/AbstractBeanDefinitionParser.java
> > >
> > > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > > /helpers/DOMUtils.java
> > >
> > > incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> > > xf/jca/cxf/ManagedConnectionImpl.java
> > >
> > > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > > NF/bus-extensions.xml
> > >
> > > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > > NF/cxf/cxf-extension-soap.xml
> > >
> > > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > > guration/NullConfigurer.java
> > >
> > > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > > guration/spring/ConfigurerImpl.java
> > >
> > > 
> incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/EndpointImpl.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsClientFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsProxyFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/JaxWsServerFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/ServiceImpl.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/EndpointFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > > /cxf/jaxws/spring/NamespaceHandler.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> > > pache/cxf/jaxws/spring/jaxws.xsd
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/CodeFirstTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/ServiceImplTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/SpringBeansTest.java
> > >
> > > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > > /cxf/jaxws/spring/endpoints.xml
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/AbstractEndpointFactory.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/ClientFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/frontend/ClientProxyFactoryBean.java
> > >
> > > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > > e/cxf/service/factory/ReflectionServiceFactoryBean.java
> > >     incubator/cxf/trunk/rt/ws/security/pom.xml
> > >
> > > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > > est/bus/SpringBusFactoryTest.java
> > >
> > > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > > est/jaxws/ClientServerTest.java
> > >
> >
> 
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

Re: Generic client config [WAS: svn commit: r525667]

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya Eoghan,

Yes this could be made more generic. Its been more a time thing than
anything. There is support for specifying interceptors on the
<jaxws:endpoint> bean as well. But a <cxf:bus> bean would be great too.

Just a side note - <jaxws:client/> gets applied to to the
JaxWsProxyFactoryBean, not the Client instance itself.

- Dan

On 4/5/07, Glynn, Eoghan <eo...@iona.com> wrote:
>
>
>
>
> Dan,
>
> Quick question about this commit.
>
> I presume from the namespace that the <jaxws:client> config bean is
> limited to JAX-WS proxies, as opposed to org.apache.cxf.endpoint.Clients
> in general, or?
>
> Could it be made more generic? Which elements/attributes are definitely
> specific to JAX-WS?
>
> In particular I'm thinking the {in|out}[Fault]Interceptors elements
> should be configurable for any Client, whether JAX-WS or simple. As all
> the other client-side InterceptorProviders (Bus, Endpoint, Binding) are
> configurable in this way, whereas the generic Client must seems to be
> the odd-man-out, needing its interceptor chains to be specified
> programmatically.
>
> Maybe these generic aspects should be moved to a base bean type for the
> generic Client, which is then specialized for JAX-WS?
>
> Cheers,
> Eoghan
>
>
> > -----Original Message-----
> > From: dandiep@apache.org [mailto:dandiep@apache.org]
> > Sent: 05 April 2007 02:03
> > To: cxf-commits@incubator.apache.org
> > Subject: svn commit: r525667 - in /incubator/cxf/trunk:
> > api/src/main/java/org/apache/cxf/configuration/
> > common/common/src/main/java/org/apache/cxf/configuration/sprin
> > g/ common/common/src/main/java/org/apache/cxf/helpers/
> > integration/jca/src/main/java/org/apache...
> >
> > Author: dandiep
> > Date: Wed Apr  4 18:03:01 2007
> > New Revision: 525667
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> > Log:
> > o Make ServiceImpl use the JaxWsClientFactoryBean instead of
> > replicating
> >   the same code in multiple places.
> > o Enable <jaxws:client> configuration for both Spring-only
> > and ServiceImpl
> >   cases.
> > o Add support for setting endpointName & serviceName on
> > EndpointFactoryBean.
> >   EndpointFactoryBean still needs to be unified with
> > ServerFactoryBean &
> >   EndpointImpl somehow. Also I need to add in support for
> > configuring a
> >   EndpointImpl via <jaxws:endpoint>. That should come in my
> > next commit.
> > o Remove http/jms namespaces from SoapBindingFactory
> > configurations. Properly
> >   check for these the JAX-WS binding ids inside
> > JaxWsServerFactoryBean and map
> >   them to the appropriate binding configurations. Now if you
> > select the
> >   SOAP12_MTOM_BINDING, you should actually get a binding with
> > soap 1.2 and
> >   MTOM enabled - although this does need some proper tests.
> >
> >
> > Added:
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
> >  (with props)
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/soapServiceConfig.xml   (with props)
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/clients.xml   (with props)
> > Modified:
> >
> > incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> > tion/Configurer.java
> >
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > /configuration/spring/AbstractBeanDefinitionParser.java
> >
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > /helpers/DOMUtils.java
> >
> > incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> > xf/jca/cxf/ManagedConnectionImpl.java
> >
> > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > NF/bus-extensions.xml
> >
> > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > NF/cxf/cxf-extension-soap.xml
> >
> > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > guration/NullConfigurer.java
> >
> > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > guration/spring/ConfigurerImpl.java
> >
> > incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/EndpointImpl.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsClientFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsProxyFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsServerFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/ServiceImpl.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/EndpointFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/NamespaceHandler.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> > pache/cxf/jaxws/spring/jaxws.xsd
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/CodeFirstTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/ServiceImplTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/SpringBeansTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/endpoints.xml
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/AbstractEndpointFactory.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/ClientFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/ClientProxyFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/service/factory/ReflectionServiceFactoryBean.java
> >     incubator/cxf/trunk/rt/ws/security/pom.xml
> >
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > est/bus/SpringBusFactoryTest.java
> >
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > est/jaxws/ClientServerTest.java
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Generic client config [WAS: svn commit: r525667]

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya Eoghan,

Yes this could be made more generic. Its been more a time thing than
anything. There is support for specifying interceptors on the
<jaxws:endpoint> bean as well. But a <cxf:bus> bean would be great too.

Just a side note - <jaxws:client/> gets applied to to the
JaxWsProxyFactoryBean, not the Client instance itself.

- Dan

On 4/5/07, Glynn, Eoghan <eo...@iona.com> wrote:
>
>
>
>
> Dan,
>
> Quick question about this commit.
>
> I presume from the namespace that the <jaxws:client> config bean is
> limited to JAX-WS proxies, as opposed to org.apache.cxf.endpoint.Clients
> in general, or?
>
> Could it be made more generic? Which elements/attributes are definitely
> specific to JAX-WS?
>
> In particular I'm thinking the {in|out}[Fault]Interceptors elements
> should be configurable for any Client, whether JAX-WS or simple. As all
> the other client-side InterceptorProviders (Bus, Endpoint, Binding) are
> configurable in this way, whereas the generic Client must seems to be
> the odd-man-out, needing its interceptor chains to be specified
> programmatically.
>
> Maybe these generic aspects should be moved to a base bean type for the
> generic Client, which is then specialized for JAX-WS?
>
> Cheers,
> Eoghan
>
>
> > -----Original Message-----
> > From: dandiep@apache.org [mailto:dandiep@apache.org]
> > Sent: 05 April 2007 02:03
> > To: cxf-commits@incubator.apache.org
> > Subject: svn commit: r525667 - in /incubator/cxf/trunk:
> > api/src/main/java/org/apache/cxf/configuration/
> > common/common/src/main/java/org/apache/cxf/configuration/sprin
> > g/ common/common/src/main/java/org/apache/cxf/helpers/
> > integration/jca/src/main/java/org/apache...
> >
> > Author: dandiep
> > Date: Wed Apr  4 18:03:01 2007
> > New Revision: 525667
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> > Log:
> > o Make ServiceImpl use the JaxWsClientFactoryBean instead of
> > replicating
> >   the same code in multiple places.
> > o Enable <jaxws:client> configuration for both Spring-only
> > and ServiceImpl
> >   cases.
> > o Add support for setting endpointName & serviceName on
> > EndpointFactoryBean.
> >   EndpointFactoryBean still needs to be unified with
> > ServerFactoryBean &
> >   EndpointImpl somehow. Also I need to add in support for
> > configuring a
> >   EndpointImpl via <jaxws:endpoint>. That should come in my
> > next commit.
> > o Remove http/jms namespaces from SoapBindingFactory
> > configurations. Properly
> >   check for these the JAX-WS binding ids inside
> > JaxWsServerFactoryBean and map
> >   them to the appropriate binding configurations. Now if you
> > select the
> >   SOAP12_MTOM_BINDING, you should actually get a binding with
> > soap 1.2 and
> >   MTOM enabled - although this does need some proper tests.
> >
> >
> > Added:
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
> >  (with props)
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/soapServiceConfig.xml   (with props)
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/clients.xml   (with props)
> > Modified:
> >
> > incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> > tion/Configurer.java
> >
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > /configuration/spring/AbstractBeanDefinitionParser.java
> >
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> > /helpers/DOMUtils.java
> >
> > incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> > xf/jca/cxf/ManagedConnectionImpl.java
> >
> > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > NF/bus-extensions.xml
> >
> > incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> > NF/cxf/cxf-extension-soap.xml
> >
> > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > guration/NullConfigurer.java
> >
> > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> > guration/spring/ConfigurerImpl.java
> >
> > incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/EndpointImpl.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsClientFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsProxyFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/JaxWsServerFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/ServiceImpl.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/EndpointFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> > /cxf/jaxws/spring/NamespaceHandler.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> > pache/cxf/jaxws/spring/jaxws.xsd
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/CodeFirstTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/ServiceImplTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/SpringBeansTest.java
> >
> > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> > /cxf/jaxws/spring/endpoints.xml
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/AbstractEndpointFactory.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/ClientFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/frontend/ClientProxyFactoryBean.java
> >
> > incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> > e/cxf/service/factory/ReflectionServiceFactoryBean.java
> >     incubator/cxf/trunk/rt/ws/security/pom.xml
> >
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > est/bus/SpringBusFactoryTest.java
> >
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> > est/jaxws/ClientServerTest.java
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.


Dan,

Quick question about this commit.

I presume from the namespace that the <jaxws:client> config bean is
limited to JAX-WS proxies, as opposed to org.apache.cxf.endpoint.Clients
in general, or?

Could it be made more generic? Which elements/attributes are definitely
specific to JAX-WS?

In particular I'm thinking the {in|out}[Fault]Interceptors elements
should be configurable for any Client, whether JAX-WS or simple. As all
the other client-side InterceptorProviders (Bus, Endpoint, Binding) are
configurable in this way, whereas the generic Client must seems to be
the odd-man-out, needing its interceptor chains to be specified
programmatically. 

Maybe these generic aspects should be moved to a base bean type for the
generic Client, which is then specialized for JAX-WS?

Cheers,
Eoghan


> -----Original Message-----
> From: dandiep@apache.org [mailto:dandiep@apache.org] 
> Sent: 05 April 2007 02:03
> To: cxf-commits@incubator.apache.org
> Subject: svn commit: r525667 - in /incubator/cxf/trunk: 
> api/src/main/java/org/apache/cxf/configuration/ 
> common/common/src/main/java/org/apache/cxf/configuration/sprin
> g/ common/common/src/main/java/org/apache/cxf/helpers/ 
> integration/jca/src/main/java/org/apache...
> 
> Author: dandiep
> Date: Wed Apr  4 18:03:01 2007
> New Revision: 525667
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> Log:
> o Make ServiceImpl use the JaxWsClientFactoryBean instead of 
> replicating
>   the same code in multiple places.
> o Enable <jaxws:client> configuration for both Spring-only 
> and ServiceImpl
>   cases. 
> o Add support for setting endpointName & serviceName on 
> EndpointFactoryBean.
>   EndpointFactoryBean still needs to be unified with 
> ServerFactoryBean &
>   EndpointImpl somehow. Also I need to add in support for 
> configuring a
>   EndpointImpl via <jaxws:endpoint>. That should come in my 
> next commit.
> o Remove http/jms namespaces from SoapBindingFactory 
> configurations. Properly
>   check for these the JAX-WS binding ids inside 
> JaxWsServerFactoryBean and map
>   them to the appropriate binding configurations. Now if you 
> select the 
>   SOAP12_MTOM_BINDING, you should actually get a binding with 
> soap 1.2 and 
>   MTOM enabled - although this does need some proper tests.
> 
> 
> Added:
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java  
>  (with props)
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/soapServiceConfig.xml   (with props)
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/clients.xml   (with props)
> Modified:
>     
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> tion/Configurer.java
>     
> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> /configuration/spring/AbstractBeanDefinitionParser.java
>     
> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> /helpers/DOMUtils.java
>     
> incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> xf/jca/cxf/ManagedConnectionImpl.java
>     
> incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> NF/bus-extensions.xml
>     
> incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> NF/cxf/cxf-extension-soap.xml
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> guration/NullConfigurer.java
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> guration/spring/ConfigurerImpl.java
>     
> incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsClientFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsProxyFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsServerFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/ServiceImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/EndpointFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/NamespaceHandler.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> pache/cxf/jaxws/spring/jaxws.xsd
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/CodeFirstTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/ServiceImplTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/SpringBeansTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/endpoints.xml
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/AbstractEndpointFactory.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/ClientFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/ClientProxyFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/service/factory/ReflectionServiceFactoryBean.java
>     incubator/cxf/trunk/rt/ws/security/pom.xml
>     
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> est/bus/SpringBusFactoryTest.java
>     
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> est/jaxws/ClientServerTest.java
> 

Generic client config [WAS: svn commit: r525667]

Posted by "Glynn, Eoghan" <eo...@iona.com>.


Dan,

Quick question about this commit.

I presume from the namespace that the <jaxws:client> config bean is
limited to JAX-WS proxies, as opposed to org.apache.cxf.endpoint.Clients
in general, or?

Could it be made more generic? Which elements/attributes are definitely
specific to JAX-WS?

In particular I'm thinking the {in|out}[Fault]Interceptors elements
should be configurable for any Client, whether JAX-WS or simple. As all
the other client-side InterceptorProviders (Bus, Endpoint, Binding) are
configurable in this way, whereas the generic Client must seems to be
the odd-man-out, needing its interceptor chains to be specified
programmatically. 

Maybe these generic aspects should be moved to a base bean type for the
generic Client, which is then specialized for JAX-WS?

Cheers,
Eoghan


> -----Original Message-----
> From: dandiep@apache.org [mailto:dandiep@apache.org] 
> Sent: 05 April 2007 02:03
> To: cxf-commits@incubator.apache.org
> Subject: svn commit: r525667 - in /incubator/cxf/trunk: 
> api/src/main/java/org/apache/cxf/configuration/ 
> common/common/src/main/java/org/apache/cxf/configuration/sprin
> g/ common/common/src/main/java/org/apache/cxf/helpers/ 
> integration/jca/src/main/java/org/apache...
> 
> Author: dandiep
> Date: Wed Apr  4 18:03:01 2007
> New Revision: 525667
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=525667
> Log:
> o Make ServiceImpl use the JaxWsClientFactoryBean instead of 
> replicating
>   the same code in multiple places.
> o Enable <jaxws:client> configuration for both Spring-only 
> and ServiceImpl
>   cases. 
> o Add support for setting endpointName & serviceName on 
> EndpointFactoryBean.
>   EndpointFactoryBean still needs to be unified with 
> ServerFactoryBean &
>   EndpointImpl somehow. Also I need to add in support for 
> configuring a
>   EndpointImpl via <jaxws:endpoint>. That should come in my 
> next commit.
> o Remove http/jms namespaces from SoapBindingFactory 
> configurations. Properly
>   check for these the JAX-WS binding ids inside 
> JaxWsServerFactoryBean and map
>   them to the appropriate binding configurations. Now if you 
> select the 
>   SOAP12_MTOM_BINDING, you should actually get a binding with 
> soap 1.2 and 
>   MTOM enabled - although this does need some proper tests.
> 
> 
> Added:
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java  
>  (with props)
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/soapServiceConfig.xml   (with props)
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/clients.xml   (with props)
> Modified:
>     
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configura
> tion/Configurer.java
>     
> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> /configuration/spring/AbstractBeanDefinitionParser.java
>     
> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf
> /helpers/DOMUtils.java
>     
> incubator/cxf/trunk/integration/jca/src/main/java/org/apache/c
> xf/jca/cxf/ManagedConnectionImpl.java
>     
> incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> NF/bus-extensions.xml
>     
> incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-I
> NF/cxf/cxf-extension-soap.xml
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> guration/NullConfigurer.java
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/confi
> guration/spring/ConfigurerImpl.java
>     
> incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsClientFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsProxyFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/JaxWsServerFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/ServiceImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/EndpointFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/spring/NamespaceHandler.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/a
> pache/cxf/jaxws/spring/jaxws.xsd
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/CodeFirstTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/ServiceImplTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/SpringBeansTest.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache
> /cxf/jaxws/spring/endpoints.xml
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/AbstractEndpointFactory.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/ClientFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/frontend/ClientProxyFactoryBean.java
>     
> incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apach
> e/cxf/service/factory/ReflectionServiceFactoryBean.java
>     incubator/cxf/trunk/rt/ws/security/pom.xml
>     
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> est/bus/SpringBusFactoryTest.java
>     
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/syst
> est/jaxws/ClientServerTest.java
>