This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new d2814e3  [CXF-7653]add a testcase to expose a failure
     new 7a68aa1  Merge branch 'master' of github.com:apache/cxf
d2814e3 is described below

commit d2814e391f1d651e7d09774e02e6f4a0ec809ef3
Author: Freeman Fang <freeman.f...@gmail.com>
AuthorDate: Tue Mar 6 21:18:25 2018 +0800

    [CXF-7653]add a testcase to expose a failure
---
 .../basicDOCBare/DOCBareClientServerTest.java      | 13 +++++++++++
 .../apache/cxf/systest/basicDOCBare/Server.java    | 25 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
index 0b19483..f04853a 100644
--- 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
+++ 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
@@ -30,6 +30,8 @@ import javax.jws.WebParam;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Holder;
 
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.hello_world_doc_lit_bare.PutLastTradedPricePortType;
 import org.apache.hello_world_doc_lit_bare.SOAPService;
@@ -37,6 +39,7 @@ import 
org.apache.hello_world_doc_lit_bare.types.TradePriceData;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class DOCBareClientServerTest extends AbstractBusClientServerTestBase {
@@ -123,5 +126,15 @@ public class DOCBareClientServerTest extends 
AbstractBusClientServerTestBase {
     }
 
 
+    @Ignore("this test failed with the commit for CXF-7653")
+    public void testBare() throws Exception {
+        ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
+        factory.setServiceClass(Server.BareSoapService.class);
+        factory.setAddress("http://localhost:"; + Server.PORT + 
"/SOAPDocLitBareService/SoapPort1");
+        factory.setBus(BusFactory.newInstance().createBus());
+        Server.BareSoapService client = (Server.BareSoapService) 
factory.create();
+
+        client.doSomething();
+    }
 }
 
diff --git 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
index bb95324..a7bcd01 100644
--- 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
+++ 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
@@ -23,7 +23,11 @@ package org.apache.cxf.systest.basicDOCBare;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
 
@@ -44,6 +48,10 @@ public class Server extends AbstractBusTestServerBase {
         props.put(Endpoint.WSDL_PORT, new 
QName("http://apache.org/hello_world_doc_lit_bare";, "SoapPort"));
         ep.setProperties(props);
         ep.publish(address);
+        implementor = new BareSoapServiceImpl();
+        address = "http://localhost:"; + PORT + 
"/SOAPDocLitBareService/SoapPort1";
+        ep = Endpoint.create(implementor);
+        ep.publish(address);
     }
 
     public void tearDown() {
@@ -62,4 +70,21 @@ public class Server extends AbstractBusTestServerBase {
             System.out.println("done!");
         }
     }
+    
+    @WebService(targetNamespace = 
"http://apache.org/hello_world_doc_lit_bare";, name = "BareSoapService")
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public interface BareSoapService {
+
+        @WebMethod
+        void doSomething();
+    }
+
+
+    public static class BareSoapServiceImpl implements BareSoapService {
+        private AtomicInteger invocations = new AtomicInteger(0);
+
+        public void doSomething() {
+            invocations.incrementAndGet();
+        }
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
ff...@apache.org.

Reply via email to