cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r780184 - in /cxf/trunk/rt/frontend/jaxws/src: main/java/org/apache/cxf/jaxws/EndpointImpl.java main/resources/schemas/jaxws.xsd test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java test/java/org/apache/cxf/jaxws/spring/endpoints.xml
Date Sat, 30 May 2009 06:05:53 GMT
Author: ningjiang
Date: Sat May 30 06:05:53 2009
New Revision: 780184

URL: http://svn.apache.org/viewvc?rev=780184&view=rev
Log:
CXF-2246 Added the support to configure the transportId from jaxws:endpoint

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/jaxws.xsd
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?rev=780184&r1=780183&r2=780184&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java Sat May
30 06:05:53 2009
@@ -528,6 +528,14 @@
         this.implementorClass = implementorClass;
     }
     
+    public void setTransportId(String transportId) {        
+        serverFactory.setTransportId(transportId);
+    }
+    
+    public String getTransportId() {
+        return serverFactory.getTransportId();
+    }
+    
     public void setBindingConfig(BindingConfiguration config) {
         serverFactory.setBindingConfig(config);
     }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/jaxws.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/jaxws.xsd?rev=780184&r1=780183&r2=780184&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/jaxws.xsd (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/jaxws.xsd Sat May 30 06:05:53 2009
@@ -149,8 +149,13 @@
           <xsd:attribute name="serviceName" type="xsd:QName">
             <xsd:annotation>
               <xsd:documentation>Specifies the value of the service's WSDL service
element's name attribute.</xsd:documentation>
-            </xsd:annotation>
+            </xsd:annotation>            
           </xsd:attribute>
+          <xsd:attribute name="transportId" type="xsd:string">
+        	<xsd:annotation>
+              <xsd:documentation>Specifies the transportId that endpoint will use,
it will override the transport which is defined in the wsdl.</xsd:documentation>
+            </xsd:annotation>
+          </xsd:attribute>  
           <xsd:attribute name="wsdlLocation" type="xsd:string">
             <xsd:annotation>
               <xsd:documentation>Specifies the location of the endpoint's WSDL contract.
The WSDL contract's location is relative to the folder 

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=780184&r1=780183&r2=780184&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
Sat May 30 06:05:53 2009
@@ -87,7 +87,7 @@
             fail("can't get the right implementor object");
         }
         assertEquals("http://localhost:8080/simpleWithAddress",
-                     ep.getServer().getEndpoint().getEndpointInfo().getAddress());
+                     ep.getServer().getEndpoint().getEndpointInfo().getAddress());      
 
 
         ep = getEndpointImplBean("inlineImplementor", ctx);
         if (!(ep.getImplementor() instanceof org.apache.hello_world_soap_http.GreeterImpl))
{
@@ -107,6 +107,8 @@
         assertEquals("get the wrong bindingId",
                      ep.getBindingUri(),
                      "http://cxf.apache.org/bindings/xformat");
+        assertEquals("get a wrong transportId",
+                     "http://cxf.apache.org/transports/local", ep.getTransportId());
 
         ep = getEndpointImplBean("simpleWithBinding", ctx);
         BindingConfiguration bc = ep.getBindingConfig();

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml?rev=780184&r1=780183&r2=780184&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml Sat
May 30 06:05:53 2009
@@ -36,7 +36,7 @@
               <value>http://cxf.apache.org/transports/local</value>
               <value>http://schemas.xmlsoap.org/soap/http</value>
               <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
-              <value>http://schemas.xmlsoap.org/wsdl/http/</value>
+              <value>http://schemas.xmlsoap.org/wsdl/http/</value>          
   
           </list>
       </property>
   </bean>
@@ -50,7 +50,8 @@
   
     <jaxws:endpoint id="simpleWithBindingUri" 
     implementor="#greeter" address="http://localhost:8080/simpeWithHttpBinding"
-    bindingUri="http://cxf.apache.org/bindings/xformat"/>
+    bindingUri="http://cxf.apache.org/bindings/xformat"
+    transportId="http://cxf.apache.org/transports/local"/>
     
   <jaxws:endpoint id="inlineImplementor" address="http://localhost:8080/simpleWithAddress2">
     <jaxws:implementor>



Mime
View raw message