You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ga...@apache.org on 2007/04/13 01:36:57 UTC

svn commit: r528284 - in /incubator/cxf/trunk/rt/frontend/jaxws: ./ src/main/java/org/apache/cxf/jaxws/binding/http/ src/main/java/org/apache/cxf/jaxws/support/ src/test/java/org/apache/cxf/jaxws/ src/test/java/org/apache/cxf/jaxws/dispatch/

Author: gawor
Date: Thu Apr 12 16:36:57 2007
New Revision: 528284

URL: http://svn.apache.org/viewvc?view=rev&rev=528284
Log:
recognize HTTPBinding

Added:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java   (with props)
Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/DispatchTest.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/pom.xml?view=diff&rev=528284&r1=528283&r2=528284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/pom.xml Thu Apr 12 16:36:57 2007
@@ -85,7 +85,6 @@
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-bindings-xml</artifactId>
             <version>${project.version}</version>
-            <scope>test</scope>
         </dependency>
 
         <dependency>

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java?view=auto&rev=528284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java Thu Apr 12 16:36:57 2007
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxws.binding.http;
+
+import javax.xml.ws.http.HTTPBinding;
+
+import org.apache.cxf.jaxws.binding.BindingImpl;
+import org.apache.cxf.service.model.BindingInfo;
+
+public class HTTPBindingImpl extends BindingImpl implements HTTPBinding {
+        
+    public HTTPBindingImpl(BindingInfo sb) {       
+    }
+    
+}

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?view=diff&rev=528284&r1=528283&r2=528284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java Thu Apr 12 16:36:57 2007
@@ -26,11 +26,13 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.SoapBinding;
+import org.apache.cxf.binding.xml.XMLBinding;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.interceptor.ClientFaultConverter;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.jaxws.binding.BindingImpl;
+import org.apache.cxf.jaxws.binding.http.HTTPBindingImpl;
 import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
 import org.apache.cxf.jaxws.handler.LogicalHandlerInterceptor;
 //import org.apache.cxf.jaxws.handler.StreamHandlerInterceptor;
@@ -91,6 +93,8 @@
     final void createJaxwsBinding() {
         if (getBinding() instanceof SoapBinding) {
             binding = new SOAPBindingImpl(getEndpointInfo().getBinding());
+        } else if (getBinding() instanceof XMLBinding) {
+            binding = new HTTPBindingImpl(getEndpointInfo().getBinding());
         } else {
             binding = new BindingImpl();
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java?view=diff&rev=528284&r1=528283&r2=528284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java Thu Apr 12 16:36:57 2007
@@ -45,6 +45,8 @@
 
         bus.getExtension(BindingFactoryManager.class)
             .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
+        bus.getExtension(BindingFactoryManager.class)
+            .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/http", bindingFactory);
 
         DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/DispatchTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/DispatchTest.java?view=diff&rev=528284&r1=528283&r2=528284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/DispatchTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/DispatchTest.java Thu Apr 12 16:36:57 2007
@@ -26,6 +26,8 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.soap.SOAPBinding;
 
 import org.w3c.dom.Document;
 
@@ -94,5 +96,21 @@
         Source res = disp.invoke(source);
         assertNotNull(res);
         
+    }
+    
+    @Test
+    public void testHTTPBinding() throws Exception {
+        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);   
+        service.addPort(portName, HTTPBinding.HTTP_BINDING, "local://foobar");
+        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
+        assertTrue(disp.getBinding() instanceof HTTPBinding);        
+    }
+    
+    @Test
+    public void testSOAPPBinding() throws Exception {
+        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);   
+        service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, "local://foobar");
+        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
+        assertTrue(disp.getBinding() instanceof SOAPBinding);        
     }
 }