cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r540509 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/resources/META-INF/ rt/bindings/soap/src/main/resources/META-INF/cxf/ rt/frontend/jaxws/src/main/java/org/apache/cxf/ja...
Date Tue, 22 May 2007 09:38:54 GMT
Author: ffang
Date: Tue May 22 02:38:53 2007
New Revision: 540509

URL: http://svn.apache.org/viewvc?view=rev&rev=540509
Log:
[CXF-628] Service.addPort(QName, String, String) does not accept binding ID

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.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

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Tue May 22 02:38:53 2007
@@ -92,9 +92,12 @@
         } else {
             config = new SoapBindingConfiguration();
         }
-        
+        if (bindingid.equals(SOAP_12_BINDING) 
+            || "http://www.w3.org/2003/05/soap/bindings/HTTP/".equals(bindingid)) {
+            config.setVersion(Soap12.getInstance());
+        }
         SoapBindingInfo info = new SoapBindingInfo(si,
-                                                   "http://schemas.xmlsoap.org/wsdl/soap/",
+                                                   bindingid,
                                                    config.getVersion());
         
         info.setName(new QName(si.getName().getNamespaceURI(), 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml Tue
May 22 02:38:53 2007
@@ -24,6 +24,7 @@
         <namespace>http://schemas.xmlsoap.org/soap/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap12/</namespace>
+        <namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
     </extension>
     
     <extension class="org.apache.cxf.binding.soap.SoapTransportFactory" 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
Tue May 22 02:38:53 2007
@@ -30,6 +30,7 @@
                 <value>http://schemas.xmlsoap.org/soap/</value>
                 <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
                 <value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
+                <value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
             </set>
         </property>
         <property name="bus" ref="cxf"/>
@@ -40,7 +41,7 @@
             <list>
                 <value>http://schemas.xmlsoap.org/soap/</value>
                 <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
-				<value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
+	        <value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
             </list>
         </property>
         <property name="bus" ref="cxf"/>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
Tue May 22 02:38:53 2007
@@ -72,7 +72,7 @@
         
         if (binding.equals(SOAPBinding.SOAP11HTTP_BINDING) 
             || binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
-            || binding.equals(SOAPBinding.SOAP12HTTP_BINDING) 
+            //|| binding.equals(SOAPBinding.SOAP12HTTP_BINDING) 
             || binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
             binding = "http://schemas.xmlsoap.org/soap/";
             setBindingId(binding);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
Tue May 22 02:38:53 2007
@@ -93,7 +93,7 @@
         assertTrue("server did not launch correctly", launchServer(Server.class));
     }
 
-    
+        
     @Test
     public void testBasicConnection() throws Exception {
 
@@ -134,6 +134,28 @@
         }
 
     }
+    
+    @Test
+    public void testAddPortWithSpecifiedBinding() throws Exception {
+        Service service = Service.create(serviceName);
+        service.addPort(fakePortName, javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING, 
+                        "http://localhost:9009/SoapContext/SoapPort");
+        Greeter greeter = service.getPort(fakePortName, Greeter.class);
+
+        String response = new String("Bonjour");
+        try {
+            greeter.greetMe("test");
+            String reply = greeter.sayHi();
+            assertNotNull("no response received from service", reply);
+            assertEquals(response, reply);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+        
+        
+    }
+
+    
     
     @Test
     public void testAddPort() throws Exception {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/Server.java?view=diff&rev=540509&r1=540508&r2=540509
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/Server.java Tue
May 22 02:38:53 2007
@@ -24,6 +24,7 @@
 import javax.jws.WebService;
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.hello_world_soap_http.DocLitBareGreeterImpl;
 import org.apache.hello_world_soap_http.GreeterImpl;
@@ -50,6 +51,13 @@
         implementor = new GreeterImpl();
         address = "http://localhost:9000/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
+        
+        //publish port with soap12 binding
+        address = "http://localhost:9009/SoapContext/SoapPort";
+        EndpointImpl e = (EndpointImpl) Endpoint.create(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING,

+                                                        implementor);
+        e.publish(address);
+        
         implementor = new DocLitBareGreeterImpl();
         address = "http://localhost:7600/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);



Mime
View raw message