cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r517214 - in /incubator/cxf/trunk/rt/ws/rm: ./ src/main/java/org/apache/cxf/ws/rm/ src/test/java/org/apache/cxf/ws/rm/
Date Mon, 12 Mar 2007 13:50:15 GMT
Author: andreasmyth
Date: Mon Mar 12 06:50:14 2007
New Revision: 517214

URL: http://svn.apache.org/viewvc?view=rev&rev=517214
Log:
[JIRA CXF-397] Wrapped the application endpoint's endpoint and service instead of creating
new endpoint and service objects.
This also removes the dependency of the cxf-rt-ws-rm module on cxf-rt-frontend-jaxws.

Added:
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java 
 (with props)
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java  
(with props)
Modified:
    incubator/cxf/trunk/rt/ws/rm/pom.xml
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java

Modified: incubator/cxf/trunk/rt/ws/rm/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/pom.xml?view=diff&rev=517214&r1=517213&r2=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/pom.xml (original)
+++ incubator/cxf/trunk/rt/ws/rm/pom.xml Mon Mar 12 06:50:14 2007
@@ -61,16 +61,6 @@
             <artifactId>cxf-common-utilities</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-simple</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-jaxws</artifactId>
-            <version>${project.version}</version>
-        </dependency>
 
         <dependency>
             <groupId>junit</groupId>
@@ -80,17 +70,6 @@
         <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymockclassextension</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-jaxws</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http</artifactId>
-            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java?view=diff&rev=517214&r1=517213&r2=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java Mon Mar 12
06:50:14 2007
@@ -33,7 +33,6 @@
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.InterfaceInfo;
@@ -220,7 +219,7 @@
         Endpoint endpoint = reliableEndpoint.getEndpoint();
         BindingInfo bi = reliableEndpoint.getBindingInfo();
         
-        Client client = new RMClient(bus, endpoint);
+        Client client = new RMClient(bus, endpoint, reliableEndpoint.getConduit());
         
         BindingOperationInfo boi = bi.getOperation(oi);
         try {
@@ -239,36 +238,8 @@
     
     class RMClient extends ClientImpl {
         
-        RMClient(Bus bus, Endpoint endpoint) {
-            super(bus, endpoint);    
-        }
-        
-        @Override
-        protected PhaseInterceptorChain setupInterceptorChain() {
-            Endpoint originalEndpoint = getEndpoint();
-            setEndpoint(Proxy.this.reliableEndpoint.getApplicationEndpoint());
-            PhaseInterceptorChain chain = super.setupInterceptorChain();
-            setEndpoint(originalEndpoint);
-            return chain;
-        }
-        
-        @Override
-        public synchronized Conduit getConduit() {
-            Conduit c = null;
-            
-            if (null != Proxy.this.reliableEndpoint.getApplicationReplyTo()) {
-                String address = Proxy.this.reliableEndpoint.getApplicationReplyTo()
-                    .getAddress().getValue();
-                getEndpoint().getEndpointInfo().setAddress(address);
-                c = super.getConduit();
-            } else {
-                Endpoint oe = getEndpoint();
-                setEndpoint(Proxy.this.reliableEndpoint.getApplicationEndpoint());
-                c = super.getConduit();
-                setEndpoint(oe);
-            }
-           
-            return c;
+        RMClient(Bus bus, Endpoint endpoint, Conduit conduit) {
+            super(bus, endpoint, conduit);  
         }
 
         @Override
@@ -276,9 +247,7 @@
             // TODO Auto-generated method stub
             m.getExchange().put(Endpoint.class, Proxy.this.reliableEndpoint.getApplicationEndpoint());
             super.onMessage(m);
-        }
-        
-        
+        }    
     }
     
 

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?view=diff&rev=517214&r1=517213&r2=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java Mon Mar
12 06:50:14 2007
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.rm;
 
 import java.util.List;
+import java.util.logging.Logger;
 
 import javax.wsdl.extensions.ExtensibilityElement;
 import javax.xml.bind.JAXBException;
@@ -27,14 +28,11 @@
 
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapOperationInfo;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.endpoint.EndpointException;
-import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.jaxb.JAXBDataBinding;
-import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.ServiceImpl;
 import org.apache.cxf.service.factory.ServiceConstructionException;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -45,10 +43,13 @@
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.service.model.UnwrappedOperationInfo;
+import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.ws.addressing.Names;
 
 public class RMEndpoint {
     
+    private static final Logger LOG = LogUtils.getL7dLogger(RMEndpoint.class);
+    
     private static final QName SERVICE_NAME = 
         new QName(RMConstants.getWsdlNamespace(), "SequenceAbstractService");
     private static final QName INTERFACE_NAME = 
@@ -66,10 +67,10 @@
         
     private final RMManager manager;
     private final Endpoint applicationEndpoint;
-    private org.apache.cxf.ws.addressing.EndpointReferenceType applicationReplyTo;
+    private Conduit conduit;
     private Source source;
     private Destination destination;
-    private Service service;
+    private WrappedService service;
     private Endpoint endpoint;
     private Proxy proxy;
     private Servant servant;
@@ -166,30 +167,25 @@
         this.source = source;
     } 
     
-    /**
-     * Returns the adress to which to send CreateSequenceResponse, TerminateSequence
-     * and LastMessage requests (i.e. the replyTo address for twaoway application
-     * messages).
-     * 
-     * @return the replyToAddress
-     */
-    org.apache.cxf.ws.addressing.EndpointReferenceType getApplicationReplyTo() {
-        return applicationReplyTo;
-    }
-  
-    void initialise(org.apache.cxf.ws.addressing.EndpointReferenceType replyTo) {  
-        applicationReplyTo = replyTo;
-        createService();
-        createEndpoint();
+    /** 
+     * @return Returns the conduit.
+     */
+    public Conduit getConduit() {
+        return conduit;
     }
     
+    void initialise(Conduit c, org.apache.cxf.ws.addressing.EndpointReferenceType replyTo)
{  
+        conduit = c;
+        createService();
+        createEndpoint(replyTo);
+    }
     
     void createService() {
         ServiceInfo si = new ServiceInfo();
         si.setName(SERVICE_NAME);
         buildInterfaceInfo(si);
-        buildBindingInfo(si);
-        service = new ServiceImpl(si);
+        
+        service = new WrappedService(applicationEndpoint.getService(), SERVICE_NAME, si);
         
         DataBinding dataBinding = null;
         try {
@@ -204,12 +200,19 @@
         service.setInvoker(servant);
     }
 
-    void createEndpoint() {
+    void createEndpoint(org.apache.cxf.ws.addressing.EndpointReferenceType replyTo) {
         ServiceInfo si = service.getServiceInfo();
         buildBindingInfo(si);
         String transportId = applicationEndpoint.getEndpointInfo().getTransportId();
         EndpointInfo ei = new EndpointInfo(si, transportId);
-        ei.setAddress(applicationEndpoint.getEndpointInfo().getAddress());
+        
+        if (null == replyTo) {
+            ei.setAddress(applicationEndpoint.getEndpointInfo().getAddress());
+        } else {
+            ei.setAddress(replyTo.getAddress().getValue());
+        }
+        LOG.fine("Created endpoint info with address: " + ei.getAddress());
+        
         ei.setName(PORT_NAME);
         ei.setBinding(si.getBinding(BINDING_NAME));
 
@@ -219,34 +222,10 @@
         if (null != ua) {
             ei.addExtensor(ua);
         } 
-        
         si.addEndpoint(ei);
-    
-        try {
-            // REVISIT: asmyth
-            // Using a JAX-WS endpoint here because the presence of the JAX-WS interceptors
-            // on the outbound chain of the partial response to a oneway RM protocol message
-            // seems to requires this (in their absence the output stream is flushed twice,

-            // with predictably devastating effect).
-            // What we really should do here is on use the same interceptors on the outbound
-            // path that would be used by the application endpoint without presuming any
knowledge
-            // of the applications endpoint's frontend.
-            EndpointImpl e = new JaxWsEndpointImpl(manager.getBus(), service, ei);
-            
-
-            // use same endpoint specific interceptor as for the application endpoint
-            e.setOutInterceptors(applicationEndpoint.getOutInterceptors());
-            e.setOutFaultInterceptors(applicationEndpoint.getOutFaultInterceptors());
-            e.setInInterceptors(applicationEndpoint.getInInterceptors());
-            e.setInFaultInterceptors(applicationEndpoint.getInFaultInterceptors());
-
-            endpoint = e;
-
-
-        } catch (EndpointException ex) {
-            throw new RuntimeException(ex);
-        }
-        service.setExecutor(applicationEndpoint.getService().getExecutor());
+        
+        endpoint = new WrappedEndpoint(applicationEndpoint, ei, service);
+        service.setEndpoint(endpoint);
     }
 
     void buildInterfaceInfo(ServiceInfo si) {

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?view=diff&rev=517214&r1=517213&r2=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Mon Mar
12 06:50:14 2007
@@ -24,12 +24,16 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Timer;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
+import javax.xml.namespace.QName;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.addressing.AddressingProperties;
@@ -51,6 +55,8 @@
  */
 public class RMManager extends RMManagerConfigBean {
 
+    private static final Logger LOG = LogUtils.getL7dLogger(RMManager.class);
+    
     private Bus bus;
     private RMStore store;
     private RetransmissionQueue retransmissionQueue;
@@ -96,6 +102,14 @@
     
     public synchronized RMEndpoint getReliableEndpoint(Message message) {
         Endpoint endpoint = RMContextUtils.getEndpoint(message);
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Getting RMEndpoint for endpoint with info: " + endpoint.getEndpointInfo().getName());
+        }
+        if (endpoint.getEndpointInfo().getName().equals(
+            new QName(RMConstants.getWsdlNamespace(), "SequenceAbstractSoapPort"))) {
+            WrappedEndpoint wrappedEndpoint = (WrappedEndpoint)endpoint;
+            endpoint = wrappedEndpoint.getWrappedEndpoint();
+        }
         RMEndpoint rme = reliableEndpoints.get(endpoint);
         if (null == rme) {
             rme = new RMEndpoint(this, endpoint);
@@ -104,11 +118,10 @@
             if (null != destination) {
                 AddressingPropertiesImpl maps = RMContextUtils.retrieveMAPs(message, false,
false);
                 replyTo = maps.getReplyTo();
-            }
-            
-            rme.initialise(replyTo);
-            
-            reliableEndpoints.put(endpoint, rme);
+            } 
+            rme.initialise(message.getExchange().getConduit(), replyTo);
+            reliableEndpoints.put(endpoint, rme); 
+            LOG.fine("Created new RMEndpoint.");
         }
         return rme;
     }

Added: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java?view=auto&rev=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java (added)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java Mon
Mar 12 06:50:14 2007
@@ -0,0 +1,159 @@
+/**
+ * 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.ws.rm;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Executor;
+
+import org.apache.cxf.binding.Binding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.MessageObserver;
+
+public class WrappedEndpoint implements Endpoint {
+
+    private Endpoint wrappedEndpoint;
+    private EndpointInfo endpointInfo;
+    private Service service;
+    
+    WrappedEndpoint(Endpoint wrapped, EndpointInfo info, Service s) {
+        wrappedEndpoint = wrapped;
+        endpointInfo = info;
+        service = s;
+    }
+    
+    public Endpoint getWrappedEndpoint() {
+        return wrappedEndpoint;
+    }
+    
+    public EndpointInfo getEndpointInfo() {
+        return endpointInfo;
+    }  
+    
+    public Service getService() {
+        return service;
+    }
+
+    public Binding getBinding() {
+        return wrappedEndpoint.getBinding();
+    }
+
+    public boolean getEnableSchemaValidation() {
+        return wrappedEndpoint.getEnableSchemaValidation();
+    }
+
+    public Executor getExecutor() {
+        return wrappedEndpoint.getExecutor();
+    }
+
+    public MessageObserver getInFaultObserver() {
+        return wrappedEndpoint.getInFaultObserver();
+    }
+
+    public MessageObserver getOutFaultObserver() {
+        return wrappedEndpoint.getOutFaultObserver();
+    }
+
+    public void setEnableSchemaValidation(boolean arg0) {
+        wrappedEndpoint.setEnableSchemaValidation(arg0);
+    }
+
+    public void setExecutor(Executor arg0) {
+        wrappedEndpoint.setExecutor(arg0);
+    }
+
+    public void setInFaultObserver(MessageObserver arg0) {
+        wrappedEndpoint.setInFaultObserver(arg0);
+    }
+
+    public void setOutFaultObserver(MessageObserver arg0) {
+        wrappedEndpoint.setOutFaultObserver(arg0);
+    }
+
+    public List<Interceptor> getInFaultInterceptors() {
+        return wrappedEndpoint.getInFaultInterceptors();
+    }
+
+    public List<Interceptor> getInInterceptors() {
+        return wrappedEndpoint.getInInterceptors();        
+    }
+
+    public List<Interceptor> getOutFaultInterceptors() {
+        return wrappedEndpoint.getOutFaultInterceptors();
+    }
+
+    public List<Interceptor> getOutInterceptors() {
+        return wrappedEndpoint.getOutInterceptors();
+    }
+
+    public void clear() {
+        wrappedEndpoint.clear();
+    }
+
+    public boolean containsKey(Object key) {
+        return wrappedEndpoint.containsKey(key);
+    }
+
+    public boolean containsValue(Object value) {
+        return wrappedEndpoint.containsValue(value);
+    }
+
+    public Set<Entry<String, Object>> entrySet() {
+        return wrappedEndpoint.entrySet();
+    }
+
+    public Object get(Object key) {
+        return wrappedEndpoint.get(key);
+    }
+
+    public boolean isEmpty() {
+        return wrappedEndpoint.isEmpty();
+    }
+
+    public Set<String> keySet() {
+        return wrappedEndpoint.keySet();
+    }
+
+    public Object put(String key, Object value) {
+        return wrappedEndpoint.put(key, value);
+    }
+
+    public void putAll(Map<? extends String, ? extends Object> t) {
+        wrappedEndpoint.putAll(t);
+    }
+    
+    public Object remove(Object key) {
+        return wrappedEndpoint.remove(key);
+    }
+
+    public int size() {
+        return wrappedEndpoint.size();
+    }
+
+    public Collection<Object> values() {
+        return wrappedEndpoint.values();
+    }
+    
+}

Propchange: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java?view=auto&rev=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java (added)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java Mon
Mar 12 06:50:14 2007
@@ -0,0 +1,170 @@
+/**
+ * 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.ws.rm;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Executor;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.ServiceInfo;
+
+/**
+ * 
+ */
+public class WrappedService implements Service {
+
+    private Service wrappedService;
+    private DataBinding dataBinding;
+    private QName name;
+    private ServiceInfo serviceInfo;
+    private Map<QName, Endpoint> endpoints;
+    private Invoker invoker;
+    
+    WrappedService(Service wrapped, QName n, ServiceInfo info) {
+        wrappedService = wrapped;
+        name = n;
+        serviceInfo = info;
+    }
+    
+    public DataBinding getDataBinding() {
+        return dataBinding;
+    }
+    
+    public QName getName() {
+        return name;
+    }
+
+    public ServiceInfo getServiceInfo() {
+        return serviceInfo;
+    }
+
+    public void setDataBinding(DataBinding arg0) {
+        dataBinding = arg0;
+    }
+    
+    public Map<QName, Endpoint> getEndpoints() {
+        return endpoints;
+    }
+    
+    public Invoker getInvoker() {
+        return invoker;
+    }
+    
+    public void setInvoker(Invoker arg0) {
+        invoker = arg0;
+    }
+    
+    // remaining APIs all wrapped
+
+    public boolean getEnableSchemaValidationForAllPort() {
+        return wrappedService.getEnableSchemaValidationForAllPort();
+    }
+
+    public Executor getExecutor() {
+        return wrappedService.getExecutor();
+    }
+
+    public void setEnableSchemaValidationForAllPort(boolean arg0) {
+        wrappedService.setEnableSchemaValidationForAllPort(arg0);
+    }
+
+    public void setExecutor(Executor arg0) {
+        wrappedService.setExecutor(arg0);
+    }
+
+    public List<Interceptor> getInFaultInterceptors() {
+        return wrappedService.getInFaultInterceptors();
+    }
+
+    public List<Interceptor> getInInterceptors() {
+        return wrappedService.getInInterceptors();
+    }
+
+    public List<Interceptor> getOutFaultInterceptors() {
+        return wrappedService.getOutFaultInterceptors();
+    }
+
+    public List<Interceptor> getOutInterceptors() {
+        return wrappedService.getOutInterceptors();
+    }
+
+    public void clear() {
+        wrappedService.clear();
+    }
+
+    public boolean containsKey(Object key) {
+        return wrappedService.containsKey(key);
+    }
+
+    public boolean containsValue(Object value) {
+        return wrappedService.containsValue(value);
+    }
+
+    public Set<java.util.Map.Entry<String, Object>> entrySet() {
+        return wrappedService.entrySet();
+    }
+
+    public Object get(Object key) {
+        return wrappedService.get(key);
+    }
+
+    public boolean isEmpty() {
+        return wrappedService.isEmpty();
+    }
+
+    public Set<String> keySet() {
+        return wrappedService.keySet();
+    }
+
+    public Object put(String key, Object value) {
+        return wrappedService.put(key, value);
+    }
+
+    public void putAll(Map<? extends String, ? extends Object> t) {
+        wrappedService.putAll(t);
+    }
+
+    public Object remove(Object key) {
+        return wrappedService.remove(key);
+    }
+
+    public int size() {
+        return wrappedService.size();
+    }
+
+    public Collection<Object> values() {
+        return wrappedService.values();
+    }
+    
+    void setEndpoint(Endpoint e) {
+        endpoints = Collections.singletonMap(e.getEndpointInfo().getName(), e);
+    }
+
+}

Propchange: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java?view=diff&rev=517214&r1=517213&r2=517214
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java Mon
Mar 12 06:50:14 2007
@@ -23,15 +23,33 @@
 
 import junit.framework.TestCase;
 
+import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.easymock.classextension.EasyMock;
+import org.easymock.classextension.IMocksControl;
 
 public class RMEndpointTest extends TestCase {
     
+    private IMocksControl control;
+    
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+    }
+    
+    public void tearDown() {
+        control.verify();
+    }
+      
     public void testCreateService() throws NoSuchMethodException {
-        RMEndpoint rme = new RMEndpoint(null, null);
+        Service appService = control.createMock(Service.class);
+        Endpoint appEndpoint = control.createMock(Endpoint.class);
+        EasyMock.expect(appEndpoint.getService()).andReturn(appService);
+        control.replay();
+        
+        RMEndpoint rme = new RMEndpoint(null, appEndpoint);
         rme.createService();
         
         Service service = rme.getService();



Mime
View raw message