cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r528260 [1/2] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/ api/src/main/java/org/apache/cxf/service/model/ rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ rt/bindings/http/src/main/java/org/apache/cxf/b...
Date Thu, 12 Apr 2007 22:22:55 GMT
Author: dkulp
Date: Thu Apr 12 15:22:52 2007
New Revision: 528260

URL: http://svn.apache.org/viewvc?view=rev&rev=528260
Log:
CXF-403 Runtime support for WSDL's where ports in the same service have different portTypes


Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/Service.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
    incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
    incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
    incubator/cxf/trunk/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java
    incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
    incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/ServiceInvokerInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.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/support/JaxWsServiceFactoryBean.java
    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/CodeFirstWSDLTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/HeaderTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceModelUtilsTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
    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/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ClientFactoryBeanTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
    incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
    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/WrappedService.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/Server.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/Server.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilder.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/Service.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/Service.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/Service.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/Service.java Thu Apr 12 15:22:52 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.service;
 
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executor;
 
@@ -28,14 +29,17 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 
 public interface Service extends Map<String, Object>, InterceptorProvider {
     
     QName getName();
     
-    ServiceInfo getServiceInfo();
+    List<ServiceInfo> getServiceInfos();
 
+    EndpointInfo getEndpointInfo(QName endpoint);
+    
     DataBinding getDataBinding();
 
     void setDataBinding(DataBinding dataBinding);

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java Thu Apr 12 15:22:52 2007
@@ -42,7 +42,8 @@
     }
     
     public static String getTargetNamespace(Exchange exchange) {
-        return getService(exchange).getServiceInfo().getTargetNamespace();
+        //all ServiceInfo's will have the same target namespace
+        return getService(exchange).getServiceInfos().get(0).getTargetNamespace();
     }
     
     public static BindingOperationInfo getOperation(Exchange exchange, String opName) {

Modified: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java Thu Apr 12 15:22:52 2007
@@ -41,7 +41,7 @@
     public void handleMessage(Message message) throws Fault {
         Exception ex = message.getContent(Exception.class);
         if (ex != null) {
-            message.put(Message.RESPONSE_CODE, new Integer(500));
+            message.put(Message.RESPONSE_CODE, Integer.valueOf(500));
         }
         
         if (ex instanceof Fault) {

Modified: incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java Thu Apr 12 15:22:52 2007
@@ -90,7 +90,7 @@
     public BindingInfo createBindingInfo(Service service, String namespace, Object obj) {
         URIMapper mapper = new URIMapper();
         
-        ServiceInfo si = service.getServiceInfo();
+        ServiceInfo si = service.getServiceInfos().get(0);
         BindingInfo info = new BindingInfo(si, 
                                            HttpBindingFactory.HTTP_BINDING_ID);
         info.setName(new QName(si.getName().getNamespaceURI(), 

Modified: incubator/cxf/trunk/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java Thu Apr 12 15:22:52 2007
@@ -58,7 +58,7 @@
         if (bindingName == null) {
             binding = ep.getEndpointInfo().getBinding(); 
         } else {
-            binding = ep.getService().getServiceInfo().getBinding(bindingName);
+            binding = ep.getEndpointInfo().getService().getBinding(bindingName);
         }
         
         BindingOperationInfo bop = binding.getOperation(opName);

Modified: incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java Thu Apr 12 15:22:52 2007
@@ -63,7 +63,7 @@
         List<Object> content = new ArrayList<Object>();
         content.add("Hello");
 
-        ServiceInfo serviceInfo = server.getEndpoint().getService().getServiceInfo();
+        ServiceInfo serviceInfo = server.getEndpoint().getEndpointInfo().getService();
         BindingInfo bi = serviceInfo.getBindings().iterator().next();
         BindingOperationInfo bop = bi.getOperations().iterator().next();
 

Modified: incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java Thu Apr 12 15:22:52 2007
@@ -61,7 +61,7 @@
         List<Object> content = new ArrayList<Object>();
         content.add("Hello");
 
-        ServiceInfo serviceInfo = server.getEndpoint().getService().getServiceInfo();
+        ServiceInfo serviceInfo = server.getEndpoint().getEndpointInfo().getService();
         BindingInfo bi = serviceInfo.getBindings().iterator().next();
         BindingOperationInfo bop = bi.getOperations().iterator().next();
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java Thu Apr 12 15:22:52 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.binding.soap;
 
+import java.util.Arrays;
 import java.util.List;
 
 import javax.xml.namespace.QName;
@@ -61,8 +62,9 @@
         JAXBDataBinding dataBinding = new JAXBDataBinding(MyComplexStruct.class);
         service.getDataBinding();
         EasyMock.expectLastCall().andReturn(dataBinding).anyTimes();
-        service.getServiceInfo();
-        EasyMock.expectLastCall().andReturn(si).anyTimes();
+        service.getServiceInfos();
+        List<ServiceInfo> list = Arrays.asList(si);
+        EasyMock.expectLastCall().andReturn(list).anyTimes();
         
         soapMessage.getExchange().put(Service.class, service);
         soapMessage.getExchange().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE);

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java Thu Apr 12 15:22:52 2007
@@ -22,6 +22,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import javax.xml.namespace.QName;
@@ -66,8 +67,9 @@
         JAXBDataBinding dataBinding = new JAXBDataBinding(MyComplexStruct.class);
         service.getDataBinding();
         EasyMock.expectLastCall().andReturn(dataBinding).anyTimes();
-        service.getServiceInfo();
-        EasyMock.expectLastCall().andReturn(si).anyTimes();
+        service.getServiceInfos();
+        List<ServiceInfo> list = Arrays.asList(si);
+        EasyMock.expectLastCall().andReturn(list).anyTimes();
 
         soapMessage.getExchange().put(Service.class, service);
         soapMessage.getExchange().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE);

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java Thu Apr 12 15:22:52 2007
@@ -130,9 +130,8 @@
 
         org.apache.cxf.service.Service service = factory.create();
 
-        serviceInfo = service.getServiceInfo();
-        
-        EndpointInfo epi = service.getServiceInfo().getEndpoint(portName);
+        EndpointInfo epi = service.getEndpointInfo(portName);
+        serviceInfo = epi.getService();
         assertNotNull(epi);
         Binding xmlBinding = new XMLBindingFactory().createBinding(epi.getBinding());
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java Thu Apr 12 15:22:52 2007
@@ -60,7 +60,7 @@
     
     /**
      * Creates a "default" BindingInfo object for the service.  Called by 
-     * createBindingInfo(ServiceInfo service, Binding binding) to actually 
+     * createBindingInfo(Service service, String binding, Object config) to actually 
      * create the BindingInfo.  Can return a subclass which can then process
      * the extensors within the subclass.
      * @param service
@@ -70,8 +70,13 @@
         return new BindingInfo(service, namespace);
     }
     
+    /**
+     * Creates a "default" BindingInfo object for the service.  Can return a subclass 
+     * which can then process the extensors within the subclass.   By default, just 
+     * creates it for the first ServiceInfo in the service
+     */    
     public BindingInfo createBindingInfo(Service service, String namespace, Object config) {
-        return createBindingInfo(service.getServiceInfo(), namespace, config);
+        return createBindingInfo(service.getServiceInfos().get(0), namespace, config);
     }
     
     

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Thu Apr 12 15:22:52 2007
@@ -103,7 +103,7 @@
             ? (new WSDLServiceFactory(bus, wsdlUrl)) : (new WSDLServiceFactory(bus, wsdlUrl, service));
         Service svc = sf.create();
     
-        EndpointInfo epfo = findEndpoint(svc.getServiceInfo(), port);
+        EndpointInfo epfo = findEndpoint(svc, port);
 
         try {
             endpoint = new EndpointImpl(bus, svc, epfo);
@@ -113,30 +113,32 @@
     }
     
 
-    private EndpointInfo findEndpoint(ServiceInfo svcfo, QName port) {
+    private EndpointInfo findEndpoint(Service svc, QName port) {
         EndpointInfo epfo;
         if (port != null) {
-            epfo = svcfo.getEndpoint(port);
+            epfo = svc.getEndpointInfo(port);
             if (epfo == null) {
-                throw new IllegalArgumentException("The service " + svcfo.getName()
+                throw new IllegalArgumentException("The service " + svc.getName()
                                                    + " does not have an endpoint " + port + ".");
             }
         } else {
             epfo = null;
-            for (EndpointInfo e : svcfo.getEndpoints()) {
-                BindingInfo bfo = e.getBinding();
-
-                if (bfo.getBindingId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) {
-                    for (Object o : bfo.getExtensors().get()) {
-                        if (o instanceof SOAPBindingImpl) {
-                            SOAPBindingImpl soapB = (SOAPBindingImpl)o;
-                            if (soapB.getTransportURI().equals("http://schemas.xmlsoap.org/soap/http")) {
-                                epfo = e;
-                                break;
+            for (ServiceInfo svcfo : svc.getServiceInfos()) {
+                for (EndpointInfo e : svcfo.getEndpoints()) {
+                    BindingInfo bfo = e.getBinding();
+    
+                    if (bfo.getBindingId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) {
+                        for (Object o : bfo.getExtensors().get()) {
+                            if (o instanceof SOAPBindingImpl) {
+                                SOAPBindingImpl soapB = (SOAPBindingImpl)o;
+                                if (soapB.getTransportURI().equals("http://schemas.xmlsoap.org/soap/http")) {
+                                    epfo = e;
+                                    break;
+                                }
                             }
                         }
+    
                     }
-
                 }
             }
             if (epfo == null) {
@@ -399,8 +401,8 @@
        
         exchange.put(Service.class, endpoint.getService());
         exchange.put(Endpoint.class, endpoint);
-        exchange.put(ServiceInfo.class, endpoint.getService().getServiceInfo());
-        exchange.put(InterfaceInfo.class, endpoint.getService().getServiceInfo().getInterface());
+        exchange.put(ServiceInfo.class, endpoint.getEndpointInfo().getService());
+        exchange.put(InterfaceInfo.class, endpoint.getEndpointInfo().getService().getInterface());
         exchange.put(Binding.class, endpoint.getBinding());
         exchange.put(BindingInfo.class, endpoint.getEndpointInfo().getBinding());
         exchange.put(BindingOperationInfo.class, boi);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java Thu Apr 12 15:22:52 2007
@@ -58,7 +58,7 @@
     private MessageObserver outFaultObserver;
 
     public EndpointImpl(Bus bus, Service s, QName endpointName) throws EndpointException {
-        this(bus, s, s.getServiceInfo().getEndpoint(endpointName));
+        this(bus, s, s.getEndpointInfo(endpointName));
     }
     
     public EndpointImpl(Bus bus, Service s, EndpointInfo ei) throws EndpointException {

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java Thu Apr 12 15:22:52 2007
@@ -80,7 +80,8 @@
     private void setSchemaInMessage(Service service, Message message, DataReader<?> reader) {
         Object en = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED);
         if (Boolean.TRUE.equals(en) || "true".equals(en)) {
-            Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfo());
+            //all serviceInfos have the same schemas
+            Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0));
             reader.setSchema(schema);
         }
     }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java Thu Apr 12 15:22:52 2007
@@ -59,7 +59,7 @@
     private void setSchemaOutMessage(Service service, Message message, DataWriter<?> writer) {
         Object en = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED);
         if (Boolean.TRUE.equals(en) || "true".equals(en)) {
-            Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfo());
+            Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0));
             writer.setSchema(schema);
         }
     }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java Thu Apr 12 15:22:52 2007
@@ -36,12 +36,12 @@
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -75,8 +75,8 @@
         List<Object> parameters = new ArrayList<Object>();
 
         Endpoint ep = exchange.get(Endpoint.class);
-        Service service = ep.getService();
         BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
+        ServiceInfo si = ep.getEndpointInfo().getService();
         // XXX - Should the BindingMessageInfo.class be put on
         // the message?
         //MessageInfo msgInfo = message.get(MessageInfo.class);
@@ -87,7 +87,7 @@
         Collection<OperationInfo> ops = null;
         if (bop == null) {
             ops = new ArrayList<OperationInfo>();
-            ops.addAll(service.getServiceInfo().getInterface().getOperations());
+            ops.addAll(si.getInterface().getOperations());
             if (xmlReader.getEventType() == XMLStreamReader.END_ELEMENT && !client) {
                 //empty input
                 //TO DO : check duplicate operation with no input

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java Thu Apr 12 15:22:52 2007
@@ -38,13 +38,13 @@
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -91,8 +91,9 @@
         }
 
         if (bop != null && bop.isUnwrappedCapable()) {
+            ServiceInfo si = bop.getBinding().getService();
             // Wrapped case
-            MessageInfo msgInfo = setMessage(message, bop, client);
+            MessageInfo msgInfo = setMessage(message, bop, client, si);
 
             // Determine if there is a wrapper class
             if (msgInfo.getMessageParts().get(0).getTypeClass() != null) {
@@ -104,7 +105,7 @@
 
                 bop = bop.getUnwrappedOperation();
 
-                msgInfo = setMessage(message, bop, client);
+                msgInfo = setMessage(message, bop, client, si);
                 List<MessagePartInfo> messageParts = msgInfo.getMessageParts();
                 Iterator<MessagePartInfo> itr = messageParts.iterator();
 
@@ -137,8 +138,8 @@
             Collection<OperationInfo> operations = null;
             operations = new ArrayList<OperationInfo>();
             Endpoint ep = exchange.get(Endpoint.class);
-            Service service = ep.getService();
-            operations.addAll(service.getServiceInfo().getInterface().getOperations());
+            ServiceInfo si = ep.getEndpointInfo().getService();
+            operations.addAll(si.getInterface().getOperations());
 
             if (!StaxUtils.toNextElement(xmlReader)) {
                 // empty input
@@ -194,7 +195,8 @@
         }
     }
 
-    private MessageInfo setMessage(Message message, BindingOperationInfo operation, boolean requestor) {
+    private MessageInfo setMessage(Message message, BindingOperationInfo operation,
+                                   boolean requestor, ServiceInfo si) {
         MessageInfo msgInfo = getMessageInfo(message, operation, requestor);
         message.put(MessageInfo.class, msgInfo);
 
@@ -205,11 +207,10 @@
         //Set standard MessageContext properties required by JAX_WS, but not specific to JAX_WS.
         message.put(Message.WSDL_OPERATION, operation.getName());
 
-        Service service = message.getExchange().get(Service.class);
-        QName serviceQName = service.getServiceInfo().getName();
+        QName serviceQName = si.getName();
         message.put(Message.WSDL_SERVICE, serviceQName);
 
-        QName interfaceQName = service.getServiceInfo().getInterface().getName();
+        QName interfaceQName = si.getInterface().getName();
         message.put(Message.WSDL_INTERFACE, interfaceQName);
 
         EndpointInfo endpointInfo = message.getExchange().get(Endpoint.class).getEndpointInfo();

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java Thu Apr 12 15:22:52 2007
@@ -36,12 +36,12 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -87,10 +87,12 @@
 
         }
 
+        ServiceInfo si = operation.getBinding().getService();
+
         DataReader<XMLStreamReader> dr = getDataReader(message);
         List<Object> objects;
 
-        MessageInfo msgInfo = setMessage(message, operation, requestor);
+        MessageInfo msgInfo = setMessage(message, operation, requestor, si);
         
         // Determine if there is a wrapper class
         if (operation.isUnwrappedCapable()
@@ -107,7 +109,7 @@
                 operation = operation.getUnwrappedOperation();
             }
 
-            msgInfo = setMessage(message, operation, requestor);
+            msgInfo = setMessage(message, operation, requestor, si);
             List<MessagePartInfo> messageParts = msgInfo.getMessageParts();
             Iterator<MessagePartInfo> itr = messageParts.iterator();
 
@@ -126,7 +128,8 @@
         message.setContent(List.class, objects);
     }
 
-    private MessageInfo setMessage(Message message, BindingOperationInfo operation, boolean requestor) {
+    private MessageInfo setMessage(Message message, BindingOperationInfo operation,
+                                   boolean requestor, ServiceInfo si) {
         MessageInfo msgInfo = getMessageInfo(message, operation, requestor);
         message.put(MessageInfo.class, msgInfo);
 
@@ -137,11 +140,10 @@
         //Set standard MessageContext properties required by JAX_WS, but not specific to JAX_WS.
         message.put(Message.WSDL_OPERATION, operation.getName());
         
-        Service service = message.getExchange().get(Service.class);
-        QName serviceQName = service.getServiceInfo().getName();
+        QName serviceQName = si.getName();
         message.put(Message.WSDL_SERVICE, serviceQName);
 
-        QName interfaceQName = service.getServiceInfo().getInterface().getName();
+        QName interfaceQName = si.getInterface().getName();
         message.put(Message.WSDL_INTERFACE, interfaceQName);
 
         EndpointInfo endpointInfo = message.getExchange().get(Endpoint.class).getEndpointInfo();

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java Thu Apr 12 15:22:52 2007
@@ -19,7 +19,9 @@
 
 package org.apache.cxf.service;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executor;
 
@@ -30,22 +32,30 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.interceptor.AbstractAttributedInterceptorProvider;
 import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.workqueue.SynchronousExecutor;
 
 public class ServiceImpl extends AbstractAttributedInterceptorProvider implements Service, Configurable {
-    private ServiceInfo serviceInfo;
+    private List<ServiceInfo> serviceInfos;
     private DataBinding dataBinding;
     private Executor executor;
     private Invoker invoker;
     private Map<QName, Endpoint> endpoints = new HashMap<QName, Endpoint>();
     
     public ServiceImpl() {
-        this(null);
+        this((ServiceInfo)null);
     }
     
     public ServiceImpl(ServiceInfo si) {
-        serviceInfo = si;
+        serviceInfos = new ArrayList<ServiceInfo>();
+        if (si != null) {
+            serviceInfos.add(si);
+        }
+        executor = SynchronousExecutor.getInstance();    
+    }
+    public ServiceImpl(List<ServiceInfo> si) {
+        serviceInfos = si;
         executor = SynchronousExecutor.getInstance();    
     }
     
@@ -54,12 +64,23 @@
     }
 
     public QName getName() {
-        return serviceInfo.getName();
+        return serviceInfos.get(0).getName();
     }
 
-    public ServiceInfo getServiceInfo() {
-        return serviceInfo;
+    public List<ServiceInfo> getServiceInfos() {
+        return serviceInfos;
     }
+    
+    public EndpointInfo getEndpointInfo(QName endpoint) {
+        for (ServiceInfo inf : serviceInfos) {
+            EndpointInfo ef = inf.getEndpoint(endpoint);
+            if (ef != null) {
+                return ef;
+            }
+        }
+        return null;
+    }
+    
 
     public Executor getExecutor() {
         return executor;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java Thu Apr 12 15:22:52 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.wsdl11;
 
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -71,17 +72,22 @@
     private Map<String, String> prefix2ns;
     private Map<String, String> ns2prefix;
     private Definition definition;
-    private ServiceInfo service;
+    private List<ServiceInfo> services;
     
-    public ServiceWSDLBuilder(ServiceInfo service) {
-        this.service = service;
+    public ServiceWSDLBuilder(List<ServiceInfo> services) {
+        this.services = services;
+        prefix2ns = new HashMap<String, String>();
+        ns2prefix = new HashMap<String, String>();
+    }
+    public ServiceWSDLBuilder(ServiceInfo ... services) {
+        this.services = Arrays.asList(services);
         prefix2ns = new HashMap<String, String>();
         ns2prefix = new HashMap<String, String>();
     }
 
     public Definition build() throws WSDLException {
         try {
-            definition = service.getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class);
+            definition = services.get(0).getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class);
         } catch (ClassCastException e) {
             //ignore
         }
@@ -95,15 +101,18 @@
             addNamespace("soap", "http://schemas.xmlsoap.org/soap/");
             addNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
             
-            definition.setQName(service.getName());
-            definition.setTargetNamespace(service.getTargetNamespace());
-            addExtensibiltyElements(definition, getWSDL11Extensors(service));
-            if (service.getSchemas() != null && service.getSchemas().size() > 0) {
-                buildTypes(service.getSchemas());
+            ServiceInfo si = services.get(0);
+            definition.setQName(si.getName());
+            definition.setTargetNamespace(si.getTargetNamespace());
+            addExtensibiltyElements(definition, getWSDL11Extensors(si));
+            if (si.getSchemas() != null && si.getSchemas().size() > 0) {
+                buildTypes(si.getSchemas());
+            }
+            for (ServiceInfo service : services) {
+                buildPortType(service.getInterface());
+                buildBinding(service.getBindings());
+                buildService(service);
             }
-            buildPortType(service.getInterface());
-            buildBinding(service.getBindings());
-            buildService(service);
         }
         return definition;
     }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java Thu Apr 12 15:22:52 2007
@@ -20,6 +20,7 @@
 package org.apache.cxf.wsdl11;
 
 import java.net.URL;
+import java.util.Iterator;
 import java.util.List;
 import java.util.logging.Logger;
 
@@ -86,9 +87,9 @@
     }
     
     public Service create() {
-        ServiceInfo serviceInfo;
+        
+        List<ServiceInfo> services;
         if (serviceName == null) {
-            List<ServiceInfo> services = null;
             try {
                 services = new WSDLServiceBuilder(getBus()).buildServices(definition);
             } catch (XmlSchemaException ex) {
@@ -98,8 +99,14 @@
                 throw new ServiceConstructionException(new Message("NO_SERVICE_EXC", LOG));
             } else {
                 //@@TODO  - this isn't good, need to return all the services
-                serviceInfo = services.get(0);
-                serviceName = serviceInfo.getName();
+                serviceName = services.get(0).getName();
+                //get all the service info's that match that first one.
+                Iterator<ServiceInfo> it = services.iterator();
+                while (it.hasNext()) {
+                    if (!it.next().getName().equals(serviceName)) {
+                        it.remove();
+                    }
+                }
             }
         } else {
             javax.wsdl.Service wsdlService = definition.getService(serviceName);
@@ -107,12 +114,12 @@
                 throw new ServiceConstructionException(new Message("NO_SUCH_SERVICE_EXC", LOG, serviceName));
             }
             try {
-                serviceInfo = new WSDLServiceBuilder(getBus()).buildServices(definition, wsdlService).get(0);
+                services = new WSDLServiceBuilder(getBus()).buildServices(definition, wsdlService);
             } catch (XmlSchemaException ex) {
                 throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
             }
         }
-        ServiceImpl service = new ServiceImpl(serviceInfo);
+        ServiceImpl service = new ServiceImpl(services);
         setService(service);
         return service;
     }

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/ServiceInvokerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/ServiceInvokerInterceptorTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/ServiceInvokerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/ServiceInvokerInterceptorTest.java Thu Apr 12 15:22:52 2007
@@ -31,6 +31,7 @@
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.ServiceImpl;
 import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.ServiceInfo;
 import org.easymock.IMocksControl;
 
 import static org.easymock.EasyMock.createNiceControl;
@@ -67,7 +68,7 @@
         IMocksControl control = createNiceControl();
         Endpoint endpoint = control.createMock(Endpoint.class);
 
-        ServiceImpl service = new ServiceImpl(null);
+        ServiceImpl service = new ServiceImpl((ServiceInfo)null);
         service.setInvoker(i);
         service.setExecutor(new SimpleExecutor());
         expect(endpoint.getService()).andReturn(service).anyTimes();

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java Thu Apr 12 15:22:52 2007
@@ -112,19 +112,21 @@
     }
 
     public void initialize(Service service) {
-        ServiceInfo endpoint = service.getServiceInfo();
+        QName serviceName = service.getServiceInfos().get(0).getName();
         TypeMapping serviceTM = typeMappingRegistry.createTypeMapping(XmlConstants.XSD, true);
-        typeMappingRegistry.register(endpoint.getName().getNamespaceURI(), serviceTM);
+        typeMappingRegistry.register(serviceName.getNamespaceURI(), serviceTM);
 
         service.put(TypeMapping.class.getName(), serviceTM);
 
         Set<Type> deps = new HashSet<Type>();
 
-        for (OperationInfo opInfo : endpoint.getInterface().getOperations()) {
-            if (opInfo.isUnwrappedCapable()) {
-                initializeOperation(service, serviceTM, opInfo.getUnwrappedOperation(), deps);
-            } else {
-                initializeOperation(service, serviceTM, opInfo, deps);
+        for (ServiceInfo info : service.getServiceInfos()) {
+            for (OperationInfo opInfo : info.getInterface().getOperations()) {
+                if (opInfo.isUnwrappedCapable()) {
+                    initializeOperation(service, serviceTM, opInfo.getUnwrappedOperation(), deps);
+                } else {
+                    initializeOperation(service, serviceTM, opInfo, deps);
+                }
             }
         }
 
@@ -251,12 +253,14 @@
             try {
                 org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e));
 
-                SchemaInfo info = new SchemaInfo(service.getServiceInfo(), entry.getKey());
+                for (ServiceInfo si : service.getServiceInfos()) {
+                    SchemaInfo info = new SchemaInfo(si, entry.getKey());
 
-                info.setElement(schema.getDocumentElement());
-                info.setSystemId(entry.getKey());
-
-                service.getServiceInfo().addSchema(info);
+                    info.setElement(schema.getDocumentElement());
+                    info.setSystemId(entry.getKey());
+    
+                    si.addSchema(info);
+                }
             } catch (JDOMException e1) {
                 throw new ServiceConstructionException(e1);
             }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java Thu Apr 12 15:22:52 2007
@@ -135,7 +135,7 @@
         for (Server s : svrMan.getServers()) {
             Service svc = s.getEndpoint().getService();
             if (svc.getName().getLocalPart().equals(string)) {
-                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(svc.getServiceInfo());
+                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(svc.getServiceInfos());
                 Definition definition = builder.build();
                 
                 WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java Thu Apr 12 15:22:52 2007
@@ -148,7 +148,8 @@
         ClientImpl client = new ClientImpl(bus, u, service, port);
 
         Service svc = client.getEndpoint().getService();
-        Collection<SchemaInfo> schemas = svc.getServiceInfo().getSchemas();
+        //all SI's should have the same schemas
+        Collection<SchemaInfo> schemas = svc.getServiceInfos().get(0).getSchemas();
 
         SchemaCompiler compiler = XJC.createSchemaCompiler();
         ErrorListener elForRun = new InnerErrorListener(wsdlUrl);
@@ -228,7 +229,7 @@
         databinding.setContext(context);
         svc.setDataBinding(databinding);
 
-        ServiceInfo svcfo = svc.getServiceInfo();
+        ServiceInfo svcfo = client.getEndpoint().getEndpointInfo().getService();
 
         // Setup the new classloader!
         Thread.currentThread().setContextClassLoader(cl);

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Thu Apr 12 15:22:52 2007
@@ -236,79 +236,81 @@
     }
 
     public void initialize(Service service) {
-        ServiceInfo serviceInfo = service.getServiceInfo();
         Set<Class<?>> classes = new HashSet<Class<?>>();
-        JAXBContextInitializer initializer = 
-            new JAXBContextInitializer(serviceInfo, classes);
-        initializer.walk();
-
+        for (ServiceInfo serviceInfo : service.getServiceInfos()) {
+            JAXBContextInitializer initializer = 
+                new JAXBContextInitializer(serviceInfo, classes);
+            initializer.walk();
+    
+        }
         try {
             setContext(createJAXBContext(classes));
         } catch (JAXBException e1) {
             throw new ServiceConstructionException(e1);
         }
-        
-        XmlSchemaCollection col = (XmlSchemaCollection)serviceInfo
-            .getProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST);
-
-        if (col != null) {
-            // someone has already filled in the types
-            return;
-        }
-
-        col = new XmlSchemaCollection();
-
-        try {
-            for (DOMResult r : generateJaxbSchemas()) {
-                Document d = (Document)r.getNode();
-                String ns = d.getDocumentElement().getAttribute("targetNamespace");
-                if (ns == null) {
-                    ns = "";
-                }
-
-                NodeList nodes = d.getDocumentElement().getChildNodes();
-                for (int i = 0; i < nodes.getLength(); i++) {
-                    Node n = nodes.item(i);
-                    if (n instanceof Element) {
-                        Element e = (Element) n;
-                        if (e.getLocalName().equals("import")) {
-                            d.getDocumentElement().removeChild(e);
+            
+        for (ServiceInfo serviceInfo : service.getServiceInfos()) {
+            XmlSchemaCollection col = (XmlSchemaCollection)serviceInfo
+                .getProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST);
+    
+            if (col != null) {
+                // someone has already filled in the types
+                continue;
+            }
+    
+            col = new XmlSchemaCollection();
+    
+            try {
+                for (DOMResult r : generateJaxbSchemas()) {
+                    Document d = (Document)r.getNode();
+                    String ns = d.getDocumentElement().getAttribute("targetNamespace");
+                    if (ns == null) {
+                        ns = "";
+                    }
+    
+                    NodeList nodes = d.getDocumentElement().getChildNodes();
+                    for (int i = 0; i < nodes.getLength(); i++) {
+                        Node n = nodes.item(i);
+                        if (n instanceof Element) {
+                            Element e = (Element) n;
+                            if (e.getLocalName().equals("import")) {
+                                d.getDocumentElement().removeChild(e);
+                            }
                         }
                     }
+                    
+                    // Don't include WS-Addressing bits
+                    if ("http://www.w3.org/2005/08/addressing/wsdl".equals(ns)) {
+                        continue;
+                    }
+    
+                    SchemaInfo schema = new SchemaInfo(serviceInfo, ns);
+                    schema.setElement(d.getDocumentElement());
+                    schema.setSystemId(r.getSystemId());
+                    serviceInfo.addSchema(schema);
+                    col.read(d.getDocumentElement());
                 }
-                
-                // Don't include WS-Addressing bits
-                if ("http://www.w3.org/2005/08/addressing/wsdl".equals(ns)) {
-                    continue;
-                }
-
-                SchemaInfo schema = new SchemaInfo(serviceInfo, ns);
-                schema.setElement(d.getDocumentElement());
-                schema.setSystemId(r.getSystemId());
-                serviceInfo.addSchema(schema);
-                col.read(d.getDocumentElement());
+            } catch (IOException e) {
+                throw new ServiceConstructionException(new Message("SCHEMA_GEN_EXC", BUNDLE), e);
             }
-        } catch (IOException e) {
-            throw new ServiceConstructionException(new Message("SCHEMA_GEN_EXC", BUNDLE), e);
-        }
-
-        serviceInfo.setProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST, col);
-        JAXBContextImpl riContext;
-        if (context instanceof JAXBContextImpl) {
-            riContext = (JAXBContextImpl) context;
-        } else {
-            // fall back if we're using another jaxb implementation
-            try {
-                riContext = (JAXBContextImpl)
-                    ContextFactory.createContext(classes.toArray(new Class[classes.size()]), null);
-            } catch (JAXBException e) {
-                throw new ServiceConstructionException(e);
+    
+            serviceInfo.setProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST, col);
+            JAXBContextImpl riContext;
+            if (context instanceof JAXBContextImpl) {
+                riContext = (JAXBContextImpl) context;
+            } else {
+                // fall back if we're using another jaxb implementation
+                try {
+                    riContext = (JAXBContextImpl)
+                        ContextFactory.createContext(classes.toArray(new Class[classes.size()]), null);
+                } catch (JAXBException e) {
+                    throw new ServiceConstructionException(e);
+                }
             }
+            
+            JAXBSchemaInitializer schemaInit = new JAXBSchemaInitializer(serviceInfo, col, riContext);
+            schemaInit.walk();
         }
-        
-        JAXBSchemaInitializer schemaInit = new JAXBSchemaInitializer(serviceInfo, col, riContext);
-        schemaInit.walk();
-
     }
 
     private List<DOMResult> generateJaxbSchemas() throws IOException {
@@ -352,7 +354,7 @@
             // context?
         }
        
-        return  JAXBContext.newInstance(classes.toArray(new Class[classes.size()]));
+        return JAXBContext.newInstance(classes.toArray(new Class[classes.size()]));
     }
 
 }

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java Thu Apr 12 15:22:52 2007
@@ -186,7 +186,7 @@
                                                             new QName(ns, "SOAPService"));
 
         service = factory.create();
-        endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPort"));
+        endpointInfo = service.getServiceInfos().get(0).getEndpoint(new QName(ns, "SoapPort"));
         endpoint = new EndpointImpl(bus, service, endpointInfo);
         JAXBDataBinding db = new JAXBDataBinding();
         db.setContext(JAXBContext.newInstance(new Class[] {
@@ -216,7 +216,7 @@
                                                             new QName(ns, "SOAPService"));
 
         service = factory.create();
-        endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPort"));
+        endpointInfo = service.getServiceInfos().get(0).getEndpoint(new QName(ns, "SoapPort"));
         endpoint = new EndpointImpl(bus, service, endpointInfo);
         JAXBDataBinding db = new JAXBDataBinding();
         db.setContext(JAXBContext.newInstance(new Class[] {

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java Thu Apr 12 15:22:52 2007
@@ -170,7 +170,7 @@
             .getResource("/wsdl/hello_world.wsdl"), new QName(ns, "SOAPService"));
 
         service = factory.create();
-        endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPort"));
+        endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPort"));
         endpoint = new EndpointImpl(bus, service, endpointInfo);
         JAXBDataBinding db = new JAXBDataBinding();
         db.setContext(JAXBContext.newInstance(new Class[] {GreetMe.class, GreetMeResponse.class}));
@@ -195,7 +195,7 @@
             .getResource("/wsdl/doc_lit_bare.wsdl"), new QName(ns, "SOAPService"));
 
         service = factory.create();
-        endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPort"));
+        endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPort"));
         endpoint = new EndpointImpl(bus, service, endpointInfo);
         JAXBDataBinding db = new JAXBDataBinding();
         db.setContext(JAXBContext.newInstance(new Class[] {TradePriceData.class}));

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java Thu Apr 12 15:22:52 2007
@@ -89,7 +89,7 @@
                                                             new QName(ns, "SOAPService"));
 
         service = factory.create();
-        endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPort"));
+        endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPort"));
         endpoint = new EndpointImpl(bus, service, endpointInfo);
         JAXBDataBinding db = new JAXBDataBinding();
         db.setContext(JAXBContext.newInstance(new Class[] {

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=528260&r1=528259&r2=528260
==============================================================================
--- 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 Thu Apr 12 15:22:52 2007
@@ -103,9 +103,10 @@
     private void initializePorts() {        
         WSDLServiceFactory sf = new WSDLServiceFactory(bus, wsdlURL, serviceName);
         Service service = sf.create();
-        ServiceInfo si = service.getServiceInfo();
-        for (EndpointInfo ei : si.getEndpoints()) {
-            this.ports.add(ei.getName());
+        for (ServiceInfo si : service.getServiceInfos()) { 
+            for (EndpointInfo ei : si.getEndpoints()) {
+                this.ports.add(ei.getName());
+            }
         }
     }
 
@@ -117,10 +118,9 @@
 
     private Endpoint getJaxwsEndpoint(QName portName, AbstractServiceFactoryBean sf) {
         Service service = sf.getService();
-        ServiceInfo si = service.getServiceInfo();
         EndpointInfo ei = null;
         if (portName == null) {
-            ei = si.getEndpoints().iterator().next();
+            ei = service.getServiceInfos().get(0).getEndpoints().iterator().next();
         } else {
             PortInfoImpl portInfo = getPortInfo(portName);
             if (null != portInfo) {
@@ -130,7 +130,7 @@
                     throw new WebServiceException(e);
                 }
             } else {
-                ei = si.getEndpoint(portName);
+                ei = service.getEndpointInfo(portName);
             }
         }
 
@@ -333,15 +333,15 @@
 
 
         Service service = serviceFactory.getService();
-        service.getServiceInfo().addBinding(bindingInfo);
+        service.getServiceInfos().get(0).addBinding(bindingInfo);
 
         // TODO we may need to get the transportURI from Address
-        ei = new EndpointInfo(service.getServiceInfo(), transportId);
+        ei = new EndpointInfo(service.getServiceInfos().get(0), transportId);
         ei.setName(portName);
         ei.setAddress(address);
         ei.setBinding(bindingInfo);
 
-        service.getServiceInfo().addEndpoint(ei);
+        service.getServiceInfos().get(0).addEndpoint(ei);
         return ei;
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Thu Apr 12 15:22:52 2007
@@ -128,10 +128,12 @@
             }
 
             boolean messageMode = implInfo.getServiceMode().equals(javax.xml.ws.Service.Mode.MESSAGE);
-            for (BindingInfo bi : getService().getServiceInfo().getBindings()) {
-                if ((bi instanceof SoapBindingInfo) 
-                    && messageMode && !type.equals(SOAPMessage.class)) {
-                    bi.setProperty(SoapBindingFactory.MESSAGE_PROCESSING_DISABLED, Boolean.TRUE);
+            if (getEndpointInfo() != null) {
+                for (BindingInfo bi : getEndpointInfo().getService().getBindings()) {
+                    if ((bi instanceof SoapBindingInfo) 
+                        && messageMode && !type.equals(SOAPMessage.class)) {
+                        bi.setProperty(SoapBindingFactory.MESSAGE_PROCESSING_DISABLED, Boolean.TRUE);
+                    }
                 }
             }
         }
@@ -197,7 +199,7 @@
             Method invoke = getServiceClass().getMethod("invoke", c);
 
             // Bind each operation to the invoke method.
-            for (OperationInfo o : getService().getServiceInfo().getInterface().getOperations()) {
+            for (OperationInfo o : getEndpointInfo().getService().getInterface().getOperations()) {
                 getMethodDispatcher().bind(o, invoke);
             }
 
@@ -207,7 +209,7 @@
             throw new ServiceConstructionException(e);
         }
 
-        for (BindingInfo bi : getService().getServiceInfo().getBindings()) {
+        for (BindingInfo bi : getEndpointInfo().getService().getBindings()) {
             bi.setProperty(AbstractBindingFactory.DATABINDING_DISABLED, Boolean.TRUE);
         }
     }

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=528260&r1=528259&r2=528260
==============================================================================
--- 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 Thu Apr 12 15:22:52 2007
@@ -91,7 +91,7 @@
         
         Service service = bean.create();
 
-        InterfaceInfo i = service.getServiceInfo().getInterface();
+        InterfaceInfo i = service.getServiceInfos().get(0).getInterface();
         assertEquals(2, i.getOperations().size());
 
         ServerFactoryBean svrFactory = new ServerFactoryBean();
@@ -100,11 +100,11 @@
         svrFactory.setAddress(address);
         svrFactory.create();
         
-        Collection<BindingInfo> bindings = service.getServiceInfo().getBindings();
+        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
         assertEquals(1, bindings.size());
         
         ServiceWSDLBuilder wsdlBuilder = 
-            new ServiceWSDLBuilder(service.getServiceInfo());
+            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
         return wsdlBuilder.build();
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java Thu Apr 12 15:22:52 2007
@@ -49,7 +49,7 @@
         
         Service service = bean.create();
 
-        InterfaceInfo i = service.getServiceInfo().getInterface();
+        InterfaceInfo i = service.getServiceInfos().get(0).getInterface();
         assertEquals(2, i.getOperations().size());
 
         ServerFactoryBean svrFactory = new ServerFactoryBean();
@@ -58,11 +58,11 @@
         svrFactory.setAddress(address);
         svrFactory.create();
         
-        Collection<BindingInfo> bindings = service.getServiceInfo().getBindings();
+        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
         assertEquals(1, bindings.size());
         
         ServiceWSDLBuilder wsdlBuilder = 
-            new ServiceWSDLBuilder(service.getServiceInfo());
+            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
         return wsdlBuilder.build();
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/HeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/HeaderTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/HeaderTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/HeaderTest.java Thu Apr 12 15:22:52 2007
@@ -49,7 +49,7 @@
         
         Service service = bean.create();
         
-        OperationInfo op = service.getServiceInfo().getInterface().getOperation(
+        OperationInfo op = service.getServiceInfos().get(0).getInterface().getOperation(
             new QName(service.getName().getNamespaceURI(), "testHeader5"));
         assertNotNull(op);
         List<MessagePartInfo> parts = op.getInput().getMessageParts();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Thu Apr 12 15:22:52 2007
@@ -120,7 +120,7 @@
         Service service = bean.create();
 
         String namespace = "http://apache.org/hello_world_soap_http";
-        EndpointInfo ei = service.getServiceInfo().getEndpoint(new QName(namespace, "SoapPort"));
+        EndpointInfo ei = service.getServiceInfos().get(0).getEndpoint(new QName(namespace, "SoapPort"));
         JaxWsEndpointImpl endpoint = new JaxWsEndpointImpl(getBus(), service, ei);
 
         ClientImpl client = new ClientImpl(getBus(), endpoint);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceModelUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceModelUtilsTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceModelUtilsTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ServiceModelUtilsTest.java Thu Apr 12 15:22:52 2007
@@ -66,7 +66,7 @@
         bean.setWsdlURL(wsdl.toString());
         bean.setServiceClass(implClz);
         Service service = bean.create();
-        EndpointInfo endpointInfo = service.getServiceInfo().getEndpoint(port);
+        EndpointInfo endpointInfo = service.getServiceInfos().get(0).getEndpoint(port);
         Endpoint endpoint = new EndpointImpl(getBus(), service, endpointInfo);
         exchange.put(Service.class, service);
         exchange.put(Endpoint.class, endpoint);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java Thu Apr 12 15:22:52 2007
@@ -77,7 +77,7 @@
 
         Service service = bean.create();
         
-        EndpointInfo endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "CalculatorPort"));
+        EndpointInfo endpointInfo = service.getEndpointInfo(new QName(ns, "CalculatorPort"));
         Endpoint endpoint = new EndpointImpl(getBus(), service, endpointInfo);
         exchange.put(Service.class, service);
         exchange.put(Endpoint.class, endpoint);        

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java Thu Apr 12 15:22:52 2007
@@ -76,7 +76,7 @@
 
         Service service = bean.create();
         
-        EndpointInfo endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "SoapPortRPCLit"));
+        EndpointInfo endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPortRPCLit"));
         Endpoint endpoint = new EndpointImpl(getBus(), service, endpointInfo);
         exchange.put(Service.class, service);
         exchange.put(Endpoint.class, endpoint);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java Thu Apr 12 15:22:52 2007
@@ -60,7 +60,7 @@
         assertEquals("SOAPService", service.getName().getLocalPart());
         assertEquals("http://apache.org/hello_world_soap_http", service.getName().getNamespaceURI());
 
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         assertNotNull(intf);
 
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
@@ -88,7 +88,7 @@
 
         assertEquals("DOMSourcePayloadProviderService", service.getName().getLocalPart());
 
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         assertNotNull(intf);
 
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
@@ -99,7 +99,7 @@
 
         ServerImpl server = (ServerImpl)svrFactory.create();
 
-        assertEquals(1, service.getServiceInfo().getEndpoints().size());
+        assertEquals(1, service.getServiceInfos().get(0).getEndpoints().size());
 
         Endpoint endpoint = server.getEndpoint();
         Binding binding = endpoint.getBinding();
@@ -123,7 +123,7 @@
 
         assertEquals("SOAPSourcePayloadProviderService", service.getName().getLocalPart());
 
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         assertNotNull(intf);
         assertEquals(1, intf.getOperations().size());
 
@@ -136,7 +136,7 @@
         ServerImpl server = (ServerImpl)svrFactory.create();
 
         // See if our endpoint was created correctly
-        assertEquals(1, service.getServiceInfo().getEndpoints().size());
+        assertEquals(1, service.getServiceInfos().get(0).getEndpoints().size());
 
         Endpoint endpoint = server.getEndpoint();
         Binding binding = endpoint.getBinding();
@@ -165,7 +165,7 @@
 
         assertEquals("SAAJProviderService", service.getName().getLocalPart());
 
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         assertNotNull(intf);
         assertEquals(1, intf.getOperations().size());
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java Thu Apr 12 15:22:52 2007
@@ -60,7 +60,7 @@
         assertEquals("SOAPService", service.getName().getLocalPart());
         assertEquals(ns, service.getName().getNamespaceURI());
         
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         
         OperationInfo op = intf.getOperation(new QName(ns, "sayHi"));
         
@@ -95,7 +95,7 @@
         bean.setServiceClass(TestMtomImpl.class);
 
         Service service = bean.create();
-        InterfaceInfo intf = service.getServiceInfo().getInterface();
+        InterfaceInfo intf = service.getServiceInfos().get(0).getInterface();
         
         OperationInfo op = intf.getOperation(
             new QName("http://cxf.apache.org/mime", "testXop"));

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=528260&r1=528259&r2=528260
==============================================================================
--- 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 Thu Apr 12 15:22:52 2007
@@ -77,17 +77,16 @@
             endpointName = serviceFactory.getEndpointName();
         }
         
-        EndpointInfo ei = service.getServiceInfo().getEndpoint(endpointName);
+        EndpointInfo ei = service.getEndpointInfo(endpointName);
         if (ei != null
             && transportId != null
             && !ei.getTransportId().equals(transportId)) {
             ei = null;
         }
         
-        Endpoint ep = null;
         if (ei == null) {
             if (getAddress() == null) {
-                ei = findBestEndpointInfo(service.getServiceInfo());
+                ei = findBestEndpointInfo(service.getServiceInfos());
             }
             if (ei == null) {
                 ei = createEndpointInfo();
@@ -96,7 +95,7 @@
             ei.setAddress(getAddress()); 
         }                        
 
-        ep = service.getEndpoints().get(ei.getName());
+        Endpoint ep = service.getEndpoints().get(ei.getName());
         
         if (ep == null) {
             ep = serviceFactory.createEndpoint(ei);
@@ -123,23 +122,21 @@
         return ep;
     }
 
-    protected EndpointInfo findBestEndpointInfo(ServiceInfo serviceInfo) {
-        Collection<EndpointInfo> eps = serviceInfo.getEndpoints();
-        if (eps.size() == 1) {
-            return eps.iterator().next();
-        } else {
+    protected EndpointInfo findBestEndpointInfo(List<ServiceInfo> serviceInfos) {
+        EndpointInfo best = null;
+        for (ServiceInfo serviceInfo : serviceInfos) {
+            Collection<EndpointInfo> eps = serviceInfo.getEndpoints();
             for (EndpointInfo ep : eps) {
+                if (best == null) {
+                    best = ep;
+                }
                 if (ep.getTransportId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) {
                     return ep;
                 }
             }
-        } 
-        
-        if (eps.size() > 0) {
-            return eps.iterator().next();
         }
         
-        return null;
+        return best;
     }
 
     protected EndpointInfo createEndpointInfo() throws BusException {
@@ -175,7 +172,7 @@
             transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
         }
         
-        service.getServiceInfo().addBinding(bindingInfo);
+        service.getServiceInfos().get(0).addBinding(bindingInfo);
 
         setTransportId(transportId);
         
@@ -184,9 +181,9 @@
             destinationFactory = dfm.getDestinationFactory(transportId);
         }
         
-        EndpointInfo ei = new EndpointInfo(service.getServiceInfo(), transportId);
+        EndpointInfo ei = new EndpointInfo(service.getServiceInfos().get(0), transportId);
         int count = 1;
-        while (service.getServiceInfo().getEndpoint(endpointName) != null) {
+        while (service.getEndpointInfo(endpointName) != null) {
             endpointName = new QName(endpointName.getNamespaceURI(), 
                                      endpointName.getLocalPart() + count);
             count++;
@@ -202,7 +199,7 @@
         } else {
             // ?
         }
-        service.getServiceInfo().addEndpoint(ei);
+        service.getServiceInfos().get(0).addEndpoint(ei);
         return ei;
     }
 

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=528260&r1=528259&r2=528260
==============================================================================
--- 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 Thu Apr 12 15:22:52 2007
@@ -27,6 +27,7 @@
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -152,13 +153,15 @@
     protected void createEndpoints() {
         Service service = getService();
 
-        for (EndpointInfo ei : service.getServiceInfo().getEndpoints()) {
-            try {
-                Endpoint ep = createEndpoint(ei);
-
-                service.getEndpoints().put(ei.getName(), ep);
-            } catch (EndpointException e) {
-                throw new ServiceConstructionException(e);
+        for (ServiceInfo inf : service.getServiceInfos()) {
+            for (EndpointInfo ei : inf.getEndpoints()) {
+                try {
+                    Endpoint ep = createEndpoint(ei);
+    
+                    service.getEndpoints().put(ei.getName(), ep);
+                } catch (EndpointException e) {
+                    throw new ServiceConstructionException(e);
+                }
             }
         }
     }
@@ -241,20 +244,31 @@
         Method[] methods = serviceClass.getMethods();
         Arrays.sort(methods, new MethodComparator());
 
-        InterfaceInfo intf = getService().getServiceInfo().getInterface();
+        InterfaceInfo intf;
+        if (getEndpointInfo() != null) {
+            intf = getEndpointInfo().getInterface();
+        } else {
+            intf = getService().getServiceInfos().get(0).getInterface();
+        }
 
+        Map<QName, Method> validMethods = new HashMap<QName, Method>();
+        for (Method m : methods) {
+            if (isValidMethod(m)) {
+                QName opName = getOperationName(intf, m);
+                validMethods.put(opName, m);
+            }
+        }
+            
+        
         for (OperationInfo o : intf.getOperations()) {
             Method selected = null;
-            for (Method m : methods) {
-                if (isValidMethod(m)) {
-                    QName opName = getOperationName(intf, m);
-
-                    if (o.getName().getNamespaceURI().equals(opName.getNamespaceURI())
-                        && isMatchOperation(o.getName().getLocalPart(), opName.getLocalPart())) {
-                    //if (o.getName().equals(opName)) {
-                        selected = m;
-                        break;
-                    }
+            for (Map.Entry<QName, Method> m : validMethods.entrySet()) {
+                QName opName = m.getKey();
+
+                if (o.getName().getNamespaceURI().equals(opName.getNamespaceURI())
+                    && isMatchOperation(o.getName().getLocalPart(), opName.getLocalPart())) {
+                    selected = m.getValue();
+                    break;
                 }
             }
 
@@ -544,6 +558,10 @@
         throw new IllegalStateException("ServiceConfiguration must provide a value!");
     }
 
+    public EndpointInfo getEndpointInfo() {
+        return getService().getEndpointInfo(getEndpointName());
+    }
+    
     public void setEndpointName(QName en) {
         this.endpointName = en;
     }

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ClientFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ClientFactoryBeanTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ClientFactoryBeanTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ClientFactoryBeanTest.java Thu Apr 12 15:22:52 2007
@@ -58,7 +58,7 @@
         SOAPAddress soapAddress = endpointInfo.getExtensor(SOAPAddress.class);
         assertNotNull(soapAddress);
         
-        BindingInfo b = service.getServiceInfo().getBindings().iterator().next();
+        BindingInfo b = endpointInfo.getService().getBindings().iterator().next();
         
         assertTrue(b instanceof SoapBindingInfo);
         

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java?view=diff&rev=528260&r1=528259&r2=528260
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java Thu Apr 12 15:22:52 2007
@@ -48,7 +48,7 @@
     public void testUnwrappedBuild() throws Exception {
         Service service = createService(false);
         
-        ServiceInfo si = service.getServiceInfo();
+        ServiceInfo si = service.getServiceInfos().get(0);
         InterfaceInfo intf = si.getInterface();
         
         assertEquals(4, intf.getOperations().size());
@@ -80,7 +80,7 @@
     public void testWrappedBuild() throws Exception {
         Service service = createService(true);
         
-        ServiceInfo si = service.getServiceInfo();
+        ServiceInfo si = service.getServiceInfos().get(0);
         InterfaceInfo intf = si.getInterface();
         
         assertEquals(4, intf.getOperations().size());
@@ -159,7 +159,7 @@
         SOAPAddress soapAddress = endpointInfo.getExtensor(SOAPAddress.class);
         assertNotNull(soapAddress);
         
-        BindingInfo b = service.getServiceInfo().getBindings().iterator().next();
+        BindingInfo b = endpointInfo.getService().getBindings().iterator().next();
         
         assertTrue(b instanceof SoapBindingInfo);
         



Mime
View raw message