geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r508298 - in /geronimo/server/trunk: ./ configs/cxf-deployer/src/plan/ modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/ modules/geronimo-cxf/src/test/resources/ modules/...
Date Fri, 16 Feb 2007 03:25:07 GMT
Author: dims
Date: Thu Feb 15 19:25:05 2007
New Revision: 508298

URL: http://svn.apache.org/viewvc?view=rev&rev=508298
Log:
Fix for GERONIMO-2825 - CXF and spring version update
Fix for GERONIMO-2826 - Test case to test invocations using service-ref
Fix for GERONIMO-2830 - Updated dependencies for ejb-based tests
Fix for GERONIMO-2836 - Improvements for CXF integration
Fix for GERONIMO-2840 - Minor fixes



Added:
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/JAXWSClient.jsp
Modified:
    geronimo/server/trunk/configs/cxf-deployer/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainerFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoHandlerChainBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/CXFHandlerResolverTest.java
    geronimo/server/trunk/modules/geronimo-cxf/src/test/resources/handlers_bindings.xml
    geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSUtils.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
    geronimo/server/trunk/pom.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxb-tests/jaxb-ejb/pom.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxr-tests/jaxr-ejb/pom.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
    geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
    geronimo/server/trunk/testsuite/webservices-testsuite/stax-tests/stax-ejb/pom.xml

Modified: geronimo/server/trunk/configs/cxf-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/cxf-deployer/src/plan/plan.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/configs/cxf-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/cxf-deployer/src/plan/plan.xml Thu Feb 15 19:25:05 2007
@@ -62,6 +62,91 @@
                         <artifactId>geronimo-cxf</artifactId>
                         <type>jar</type>
                     </dependency>
+                    <dependency>
+                        <groupId>org.apache.geronimo.modules</groupId>
+                        <artifactId>geronimo-jaxws</artifactId>
+                        <version>${version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-api</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-metacode</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-common-utilities</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-bindings-soap</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-bindings-xml</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-core</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-databinding-jaxb</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-frontend-jaxws</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-frontend-simple</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-rt-transports-http</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-tools-common</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.ws.commons</groupId>
+                        <artifactId>XmlSchema</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-core</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-beans</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-context</artifactId>
+                        <type>jar</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.geronimo.configs</groupId>
+                        <artifactId>client-security</artifactId>
+                        <type>car</type>
+                    </dependency>
                 </dependencies>
             </environment>
         </xml-attribute>

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
Thu Feb 15 19:25:05 2007
@@ -42,6 +42,7 @@
 import org.apache.cxf.jaxws.ProviderChainObserver;
 import org.apache.cxf.jaxws.ProviderInvoker;
 import org.apache.cxf.jaxws.binding.soap.JaxWsSoapBindingInfoFactoryBean;
+import org.apache.cxf.jaxws.handler.PortInfoImpl;
 import org.apache.cxf.jaxws.javaee.HandlerChainsType;
 import org.apache.cxf.jaxws.support.AbstractJaxWsServiceFactoryBean;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
@@ -53,6 +54,7 @@
 import org.apache.cxf.service.factory.AbstractBindingInfoFactoryBean;
 import org.apache.geronimo.jaxws.annotations.AnnotationException;
 import org.apache.geronimo.jaxws.annotations.AnnotationProcessor;
+import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.JNDIResolver;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
 import org.apache.geronimo.jaxws.PortInfo;
@@ -83,14 +85,13 @@
 
     public CXFEndpoint(Bus bus,
                        URL configurationBaseUrl,
-                       Object instance,
-                       String bindingURI) {
+                       Object instance) {
         this.bus = bus;
         this.implementor = instance;
-        this.bindingURI = bindingURI;
 
         this.portInfo = (PortInfo) bus.getExtension(PortInfo.class);
-
+        this.bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
+        
         implInfo = new JaxWsImplementorInfo(implementor.getClass());
 
         if (implInfo.isWebServiceProvider()) {
@@ -222,15 +223,14 @@
         // FIXME: setServiceClass() or setSerivceBean() ?
         svrFactory.setServiceClass(implementor.getClass());
         // svrFactory.setServiceBean(implementor);
-
-        // TODO: Replace with discovery mechanism!!
+        
         AbstractBindingInfoFactoryBean bindingFactory = null;
         if (XMLConstants.NS_XML_FORMAT.equals(bindingURI)
-                || HTTPBinding.HTTP_BINDING.equals(bindingURI)) {
+            || HTTPBinding.HTTP_BINDING.equals(bindingURI)) {
             bindingFactory = new XMLBindingInfoFactoryBean();
         } else {
             // Just assume soap otherwise...
-            bindingFactory = new JaxWsSoapBindingInfoFactoryBean();            
+            bindingFactory = new JaxWsSoapBindingInfoFactoryBean();
         }
 
         svrFactory.setBindingFactory(bindingFactory);
@@ -285,10 +285,11 @@
                                    this.implementor.getClass(),
                                    handlerChains, 
                                    this.annotationProcessor);
+                
+        PortInfoImpl portInfo = 
+            new PortInfoImpl(this.bindingURI, serviceFactory.getEndpointName(), service.getName());
         
-        
-        // TODO: pass non-null PortInfo to get the right handlers
-        List<Handler> chain = handlerResolver.getHandlerChain(null);
+        List<Handler> chain = handlerResolver.getHandlerChain(portInfo);
 
         getBinding().setHandlerChain(chain);
     }

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
Thu Feb 15 19:25:05 2007
@@ -41,6 +41,8 @@
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLWriter;
 
+import java.io.PrintWriter;
+import java.net.URI;
 import java.net.URL;
 import java.util.List;
 import java.util.ArrayList;
@@ -85,8 +87,6 @@
         destinationFactoryManager.registerDestinationFactory(
                 "http://schemas.xmlsoap.org/wsdl/http/", factory);
         destinationFactoryManager.registerDestinationFactory(
-                "http://schemas.xmlsoap.org/wsdl/soap/", factory);
-        destinationFactoryManager.registerDestinationFactory(
                 "http://schemas.xmlsoap.org/wsdl/soap/http", factory);
         destinationFactoryManager.registerDestinationFactory(
                 XMLConstants.NS_XML_FORMAT, factory);
@@ -97,7 +97,17 @@
     }
 
     public void invoke(Request request, Response response) throws Exception {
-        destination.invoke(request, response);
+        if (request.getMethod() == Request.GET) {
+            EndpointInfo ei = this.destination.getEndpointInfo();
+            response.setContentType("text/html");
+            PrintWriter pw = new PrintWriter(response.getOutputStream());
+            pw.write("<html><title>Web Service</title><body>");
+            pw.write("Hi, this is '" + ei.getService().getName().getLocalPart() + "' web
service.");
+            pw.write("</body></html>");
+            pw.flush();
+        } else {
+            destination.invoke(request, response);
+        }
     }
 
     public void getWsdl(Request request, Response response) throws Exception {
@@ -114,14 +124,18 @@
         } else {
             List<?> exts = port.getExtensibilityElements();
             if (exts != null && exts.size() > 0) {
+                URI requestURI = request.getURI();
+                URI serviceURI = new URI(requestURI.getScheme(), null, 
+                                         requestURI.getHost(), requestURI.getPort(), 
+                                         requestURI.getPath(), null, null);
                 ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
                 if (SOAPBindingUtil.isSOAPAddress(el)) {
                     SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
-                    add.setLocationURI(request.getURI().toString());
+                    add.setLocationURI(serviceURI.toString());
                 }
                 if (el instanceof AddressType) {
                     AddressType add = (AddressType) el;
-                    add.setLocation(request.getURI().toString());
+                    add.setLocation(serviceURI.toString());
                 }
             }
         }
@@ -138,8 +152,7 @@
     private CXFEndpoint publishEndpoint(Object target) {
         assert target != null : "null target received";
 
-        CXFEndpoint ep = new CXFEndpoint(bus, configurationBaseUrl, target,
-                (String) null);
+        CXFEndpoint ep = new CXFEndpoint(bus, configurationBaseUrl, target);
         ep.publish("http://nopath");
         return ep;
     }

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainerFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainerFactoryGBean.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainerFactoryGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainerFactoryGBean.java
Thu Feb 15 19:25:05 2007
@@ -27,7 +27,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.Bus;
-import org.apache.cxf.bus.cxf.CXFBusFactory;
+import org.apache.cxf.bus.CXFBusFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoHandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoHandlerChainBuilder.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoHandlerChainBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoHandlerChainBuilder.java
Thu Feb 15 19:25:05 2007
@@ -25,6 +25,7 @@
 
 import org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder;
 import org.apache.cxf.jaxws.javaee.HandlerChainType;
+import org.apache.geronimo.jaxws.JAXWSUtils;
 
 public class GeronimoHandlerChainBuilder extends AnnotationHandlerChainBuilder {
 
@@ -63,15 +64,26 @@
         return match((info == null ? null : info.getPortName()), namePattern);
     }
 
-    private boolean matchBinding(PortInfo info, List bindings) {
+    private boolean matchBinding(PortInfo info, List<String> bindings) {
         return match((info == null ? null : info.getBindingID()), bindings);
     }
 
-    private boolean match(String binding, List bindings) {
+    private boolean match(String binding, List<String> bindings) {
         if (binding == null) {
             return (bindings == null || bindings.isEmpty());
         } else {
-            return (bindings == null || bindings.isEmpty()) ? true : bindings.contains(binding);
+            if (bindings == null || bindings.isEmpty()) {
+                return true;
+            } else {
+                String actualBindingURI = JAXWSUtils.getBindingURI(binding);
+                for (String bindingToken : bindings) {
+                    String bindingURI = JAXWSUtils.getBindingURI(bindingToken);
+                    if (actualBindingURI.equals(bindingURI)) {
+                        return true;
+                    }
+                }
+                return false;               
+            }
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/CXFHandlerResolverTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/CXFHandlerResolverTest.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/CXFHandlerResolverTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/test/java/org/apache/geronimo/cxf/CXFHandlerResolverTest.java
Thu Feb 15 19:25:05 2007
@@ -27,7 +27,8 @@
 import javax.xml.transform.stream.StreamSource;
 
 import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.PortInfo;
+
+import org.apache.cxf.jaxws.handler.PortInfoImpl;
 import org.apache.cxf.jaxws.javaee.HandlerChainsType;
 
 import org.apache.geronimo.testsupport.TestSupport;
@@ -45,7 +46,7 @@
         
         List<Handler> handlers = null;
         
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null));  
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, null));  
         assertEquals(3, handlers.size());
     }
 
@@ -60,23 +61,23 @@
         
         List<Handler> handlers = null;
         
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, null)); 
         assertEquals(0, handlers.size());
         
         QName serviceName1 = new QName("http://foo", "Bar");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, serviceName1));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, serviceName1));

         assertEquals(1, handlers.size());
         
         QName serviceName2 = new QName("http://foo", "Foo");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, serviceName2));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, serviceName2));

         assertEquals(2, handlers.size());
         
         QName serviceName3 = new QName("http://foo", "FooBar");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, serviceName3));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, serviceName3));

         assertEquals(1, handlers.size());
         
         QName serviceName4 = new QName("http://foo", "BarFoo");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, serviceName4));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, serviceName4));

         assertEquals(0, handlers.size());
     }
     
@@ -84,24 +85,30 @@
         InputStream in = getClass().getResourceAsStream("/handlers_bindings.xml");
         assertTrue(in != null);
         HandlerChainsType handlerChains = toHandlerChains(in); 
-        assertEquals(3, handlerChains.getHandlerChain().size());
+        assertEquals(4, handlerChains.getHandlerChain().size());
         
         CXFHandlerResolver resolver = 
             new CXFHandlerResolver(getClass().getClassLoader(), getClass(), handlerChains,
null);
         
         List<Handler> handlers = null;
         
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, null)); 
         assertEquals(0, handlers.size());
         
-        handlers = resolver.getHandlerChain(new TestPortInfo("##FOO_BAR", null, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl("http://foobar", null, null));

         assertEquals(0, handlers.size());
         
-        handlers = resolver.getHandlerChain(new TestPortInfo("##SOAP11_HTTP", null, null));

+        handlers = resolver.getHandlerChain(new PortInfoImpl("##SOAP11_HTTP", null, null));

+        assertEquals(2, handlers.size());
+        
+        handlers = resolver.getHandlerChain(new PortInfoImpl("http://schemas.xmlsoap.org/wsdl/soap/http",
null, null)); 
         assertEquals(2, handlers.size());
         
-        handlers = resolver.getHandlerChain(new TestPortInfo("##SOAP11_HTTP_MTOM", null,
null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl("##SOAP11_HTTP_MTOM", null,
null)); 
         assertEquals(1, handlers.size());
+        
+        handlers = resolver.getHandlerChain(new PortInfoImpl("##XML_HTTP", null, null));

+        assertEquals(2, handlers.size());
     }
     
     public void testPortMatching() throws Exception {
@@ -115,23 +122,23 @@
         
         List<Handler> handlers = null;
         
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, null)); 
         assertEquals(0, handlers.size());
         
         QName portName1 = new QName("http://foo", "Bar");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, portName1, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, portName1, null)); 
         assertEquals(1, handlers.size());
         
         QName portName2 = new QName("http://foo", "Foo");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, portName2, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, portName2, null)); 
         assertEquals(2, handlers.size());
         
         QName portName3 = new QName("http://foo", "FooBar");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, portName3, null));
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, portName3, null));
         assertEquals(1, handlers.size());
         
         QName portName4 = new QName("http://foo", "BarFoo");
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, portName4, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, portName4, null)); 
         assertEquals(0, handlers.size());
     }
     
@@ -146,22 +153,22 @@
         
         List<Handler> handlers = null;
         
-        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null)); 
+        handlers = resolver.getHandlerChain(new PortInfoImpl(null, null, null)); 
         assertEquals(0, handlers.size());
         
         QName serviceName1 = new QName("http:/foo", "Bar");
         QName portName1 = new QName("http://foo", "FooBar");
         String binding1 = "##XML_HTTP";
-        handlers = resolver.getHandlerChain(new TestPortInfo(binding1, portName1, serviceName1));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(binding1, portName1, serviceName1));

         assertEquals(3, handlers.size());
         
         String binding2 = "##SOAP11_HTTP";
-        handlers = resolver.getHandlerChain(new TestPortInfo(binding2, portName1, serviceName1));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(binding2, portName1, serviceName1));

         assertEquals(2, handlers.size());
         
         QName serviceName2 = new QName("http://foo", "Baaz");
         QName portName2 = new QName("http://foo", "Baaz");
-        handlers = resolver.getHandlerChain(new TestPortInfo(binding1, portName2, serviceName2));

+        handlers = resolver.getHandlerChain(new PortInfoImpl(binding1, portName2, serviceName2));

         assertEquals(1, handlers.size());
     }
     
@@ -175,31 +182,5 @@
 
         return (HandlerChainsType) handlerElement.getValue();
     }
-    
-    private static class TestPortInfo implements PortInfo {
-
-        private String bindingID;
-        private QName portName;
-        private QName serviceName;
-
-        public TestPortInfo(String bindingID, QName portName, QName serviceName) {
-            this.bindingID = bindingID;
-            this.portName = portName;
-            this.serviceName = serviceName;
-        }
-        
-        public String getBindingID() {
-            return this.bindingID;
-        }
-
-        public QName getPortName() {
-            return this.portName;
-        }
-
-        public QName getServiceName() {
-            return this.serviceName;
-        }
-        
-    }
-    
+            
 }

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/test/resources/handlers_bindings.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/test/resources/handlers_bindings.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/test/resources/handlers_bindings.xml (original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/test/resources/handlers_bindings.xml Thu
Feb 15 19:25:05 2007
@@ -7,6 +7,13 @@
       <jws:handler-class>org.apache.geronimo.cxf.TestHandler</jws:handler-class>
     </jws:handler>
   </jws:handler-chain>
+    <jws:handler-chain>
+    <jws:protocol-bindings>http://www.w3.org/2004/08/wsdl/http</jws:protocol-bindings>
+    <jws:handler>
+      <jws:handler-name>GreeterHandler</jws:handler-name>
+      <jws:handler-class>org.apache.geronimo.cxf.TestHandler</jws:handler-class>
+    </jws:handler>
+  </jws:handler-chain>
   <jws:handler-chain>
     <jws:protocol-bindings>##SOAP11_HTTP</jws:protocol-bindings>
     <jws:handler>

Modified: geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSUtils.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSUtils.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSUtils.java
Thu Feb 15 19:25:05 2007
@@ -16,11 +16,25 @@
  */
 package org.apache.geronimo.jaxws;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
 
 public class JAXWSUtils {
-
+    
+    private static final Map<String, String> BINDING_MAP = 
+        new HashMap<String, String>();
+    
+    static {
+        BINDING_MAP.put("##SOAP11_HTTP", "http://schemas.xmlsoap.org/wsdl/soap/http");
+        BINDING_MAP.put("##SOAP12_HTTP", "http://www.w3.org/2003/05/soap/bindings/HTTP/");
+        BINDING_MAP.put("##SOAP11_HTTP_MTOM", "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true");
+        BINDING_MAP.put("##SOAP12_HTTP_MTOM", "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true");
+        BINDING_MAP.put("##XML_HTTP", "http://www.w3.org/2004/08/wsdl/http");
+    }
+    
     private JAXWSUtils() {
     }
 
@@ -37,4 +51,18 @@
         return null;
     }
 
+    public static String getBindingURI(String token) {
+        if (token == null) {
+            // return the default
+            return BINDING_MAP.get("##SOAP11_HTTP");
+        } else if (token.startsWith("##")) {
+            String uri = BINDING_MAP.get(token);
+            if (uri == null) {
+                throw new IllegalArgumentException("Unsupported binding token: " + token);
+            }
+            return uri;
+        } else {
+            return token;            
+        }
+    }
 }

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java
Thu Feb 15 19:25:05 2007
@@ -145,7 +145,7 @@
         if (req.getParameter("wsdl") != null) {
             try {
                 webServiceContainer.getWsdl(request, response);
-                //WHO IS RESPONSIBLE FOR CLOSING OUT?
+                jettyRequest.setHandled(true);
             } catch (IOException e) {
                 throw e;
             } catch (Exception e) {
@@ -221,7 +221,7 @@
         public java.net.URI getURI() {
             if (uri == null) {
                 try {
-                    String uriString = request.getScheme() + "://" + request.getRemoteHost()
+ ":" + request.getRemotePort() + request.getRequestURI();
+                    String uriString = request.getScheme() + "://" + request.getServerName()
+ ":" + request.getServerPort() + request.getRequestURI();
                     //return new java.net.URI(uri.getScheme(),uri.getHost(),uri.getPath(),uri.);
                     uri = new java.net.URI(uriString);
                 } catch (URISyntaxException e) {

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Thu Feb 15 19:25:05 2007
@@ -245,7 +245,7 @@
 
         for (ModuleBuilderExtension builder : moduleBuilderExtensions) {
             try {
-                builder.createModule(module, plan, moduleFile, targetPath, specDDUrl, earEnvironment,
null, earName, naming, idBuilder);
+                builder.createModule(module, plan, moduleFile, targetPath, specDDUrl, environment,
null, earName, naming, idBuilder);
             } catch (Throwable t) {
                 String builderName = builder.getClass().getSimpleName();
                 log.error(builderName+".createModule() failed: "+t.getMessage(), t);

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Thu Feb 15 19:25:05 2007
@@ -64,6 +64,11 @@
 
     private Context javaCompSubContext;
 
+    public EjbDeployment() {
+        this(null, null, null, null, null, null, null, null, null, null, 
+             null, null, null, null, null, null, null);
+    }
+
     public EjbDeployment(String objectName,
                          String deploymentId,
                          String ejbName,

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Thu Feb 15 19:25:05 2007
@@ -82,7 +82,7 @@
         -->
         <tranqlVendorsVersion>1.3-SNAPSHOT</tranqlVendorsVersion>
 
-        <cxfVersion>2.0-incubator-M1</cxfVersion>
+        <cxfVersion>2.0-incubator-RC-SNAPSHOT</cxfVersion>
     </properties>
 
     <dependencyManagement>
@@ -1191,19 +1191,19 @@
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
-                <version>2.0-rc2</version>
+                <version>2.0</version>
             </dependency>
             
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-beans</artifactId>
-                <version>2.0-rc2</version>
+                <version>2.0</version>
             </dependency>
             
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-context</artifactId>
-                <version>2.0-rc2</version>
+                <version>2.0</version>
             </dependency>
             
             <dependency>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxb-tests/jaxb-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxb-tests/jaxb-ejb/pom.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxb-tests/jaxb-ejb/pom.xml (original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxb-tests/jaxb-ejb/pom.xml Thu
Feb 15 19:25:05 2007
@@ -48,6 +48,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-client</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${version}</version>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxr-tests/jaxr-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxr-tests/jaxr-ejb/pom.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxr-tests/jaxr-ejb/pom.xml (original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxr-tests/jaxr-ejb/pom.xml Thu
Feb 15 19:25:05 2007
@@ -48,6 +48,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-client</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${version}</version>

Added: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/JAXWSClient.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/JAXWSClient.jsp?view=auto&rev=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/JAXWSClient.jsp
(added)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/JAXWSClient.jsp
Thu Feb 15 19:25:05 2007
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!--
+    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.
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
+<jsp:directive.page contentType="text/html"/>
+
+<jsp:directive.page import="java.io.IOException"/>
+<jsp:directive.page import="javax.naming.InitialContext"/>
+<jsp:directive.page import="javax.xml.ws.Service"/>
+<jsp:directive.page import="org.apache.greeter_control.Greeter"/>
+
+<html><head><title>JAX-WS Client JSP</title></head>
+<body>
+
+<jsp:scriptlet>
+        try {
+            String name = request.getParameter("name");
+            if (name == null) {
+                name = "Unknown";
+            }
+            System.out.println(name);
+            InitialContext ctx = new InitialContext();
+            Service service = (Service)ctx.lookup("java:comp/env/services/Greeter");
+            Greeter greeter = service.getPort(Greeter.class);
+            out.println("WebService returned: " + greeter.greetMe(name));
+        } catch (Exception e) {
+            e.printStackTrace();
+            IOException exception = new IOException("Error");
+            exception.initCause(e);
+            throw exception;
+        }
+</jsp:scriptlet>
+
+</body></html>
+</jsp:root>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/geronimo-web.xml
Thu Feb 15 19:25:05 2007
@@ -24,4 +24,16 @@
       <dep:type>car</dep:type>
     </dep:moduleId>
   </dep:environment>
+
+ <service-ref>
+   <service-ref-name>services/Greeter</service-ref-name>
+   <port>
+      <port-name>GreeterPort</port-name>
+      <protocol>http</protocol>
+      <host>localhost</host>
+      <port>8080</port>
+      <uri>/jaxws-war-2.0-SNAPSHOT/servlet</uri>
+   </port>
+ </service-ref>
+
 </web-app>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/main/webapp/WEB-INF/web.xml
Thu Feb 15 19:25:05 2007
@@ -43,4 +43,10 @@
         <env-entry-value>Hello</env-entry-value>
    </env-entry>
 
+   <service-ref>
+       <service-ref-name>services/Greeter</service-ref-name>
+       <service-interface>javax.xml.ws.Service</service-interface>
+       <wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>
+   </service-ref>
+
 </web-app>

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
(original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/jaxws-tests/jaxws-war/src/test/java/org/apache/geronimo/testsuite/testset/JaxWSTest.java
Thu Feb 15 19:25:05 2007
@@ -174,4 +174,39 @@
 
     }
 
+    @Test
+    public void testClientInvocation() throws Exception {
+        String expected = null; // should be "Hello Tester"; - CXF bugs or something
+
+        String warName = System.getProperty("webAppName");
+        assertNotNull(warName);
+        URL url = new URL(baseURL + warName + "/JAXWSClient.jsp?name=Tester");
+        HttpURLConnection connection = (HttpURLConnection)url.openConnection();
+        try {
+            BufferedReader reader = 
+                new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
+            BufferedReader in = 
+                new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            String inputLine;
+            boolean found = false;
+            while ((inputLine = in.readLine()) != null) {
+                System.out.println(inputLine);
+
+                if (found == false &&
+                    inputLine.indexOf("WebService returned: " + expected) != -1) {
+                    found = true;
+                }
+            }
+            in.close();
+
+            assertTrue("Reply", found);
+
+        } finally {
+            connection.disconnect();
+        }
+    }
+
+
+
 }

Modified: geronimo/server/trunk/testsuite/webservices-testsuite/stax-tests/stax-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/webservices-testsuite/stax-tests/stax-ejb/pom.xml?view=diff&rev=508298&r1=508297&r2=508298
==============================================================================
--- geronimo/server/trunk/testsuite/webservices-testsuite/stax-tests/stax-ejb/pom.xml (original)
+++ geronimo/server/trunk/testsuite/webservices-testsuite/stax-tests/stax-ejb/pom.xml Thu
Feb 15 19:25:05 2007
@@ -47,6 +47,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-client</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${version}</version>



Mime
View raw message