You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2018/03/06 15:04:32 UTC
[cxf] branch master updated: [CXF-7653] Update test to show it works
This is an automated email from the ASF dual-hosted git repository.
dkulp 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 6ee608d [CXF-7653] Update test to show it works
6ee608d is described below
commit 6ee608d2a5be91da61c5636ab4a398fb2362dac2
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Tue Mar 6 10:04:13 2018 -0500
[CXF-7653] Update test to show it works
---
.../cxf/systest/sts/deployment/CustomClaimsHandler.java | 1 +
.../systest/basicDOCBare/DOCBareClientServerTest.java | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsHandler.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsHandler.java
index e7a717e..bd46f0f 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsHandler.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsHandler.java
@@ -68,6 +68,7 @@ public class CustomClaimsHandler implements ClaimsHandler {
OpenSAMLUtil.initSamlEngine();
XMLObjectBuilderFactory builderFactory = XMLObjectProviderRegistrySupport.getBuilderFactory();
+ @SuppressWarnings("unchecked")
XMLObjectBuilder<XSInteger> xsIntegerBuilder =
(XMLObjectBuilder<XSInteger>)builderFactory.getBuilder(XSInteger.TYPE_NAME);
XSInteger attributeValue =
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 f04853a..02ce470 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
@@ -32,6 +32,7 @@ import javax.xml.ws.Holder;
import org.apache.cxf.BusFactory;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
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;
@@ -39,7 +40,6 @@ 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 {
@@ -126,7 +126,7 @@ public class DOCBareClientServerTest extends AbstractBusClientServerTestBase {
}
- @Ignore("this test failed with the commit for CXF-7653")
+ @Test
public void testBare() throws Exception {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(Server.BareSoapService.class);
@@ -134,6 +134,18 @@ public class DOCBareClientServerTest extends AbstractBusClientServerTestBase {
factory.setBus(BusFactory.newInstance().createBus());
Server.BareSoapService client = (Server.BareSoapService) factory.create();
+ try {
+ client.doSomething();
+ fail("This should fail, ClientProxyFactoryBean doesn't support @SOAPBinding annotation");
+ } catch (IllegalStateException t) {
+ //expected
+ }
+
+ factory = new JaxWsProxyFactoryBean();
+ factory.setServiceClass(Server.BareSoapService.class);
+ factory.setAddress("http://localhost:" + Server.PORT + "/SOAPDocLitBareService/SoapPort1");
+ factory.setBus(BusFactory.newInstance().createBus());
+ client = (Server.BareSoapService) factory.create();
client.doSomething();
}
}
--
To stop receiving notification emails like this one, please contact
dkulp@apache.org.