Repository: cxf Updated Branches: refs/heads/master 92ad85893 -> 0f335bac5
Fix the blueprint test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0f335bac Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0f335bac Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0f335bac Branch: refs/heads/master Commit: 0f335bac5bb23fd085fe991de99b1faf47839858 Parents: 92ad858 Author: Daniel Kulp <[email protected]> Authored: Fri May 15 12:31:36 2015 -0400 Committer: Daniel Kulp <[email protected]> Committed: Fri May 15 12:31:36 2015 -0400 ---------------------------------------------------------------------- .../cxf/systest/jaxrs/JAXRSBlueprintContextListener.java | 3 ++- .../apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java | 4 +++- .../java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java | 6 +++++- .../org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java | 6 ++++++ .../src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/0f335bac/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSBlueprintContextListener.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSBlueprintContextListener.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSBlueprintContextListener.java index 035cac6..91d1a16 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSBlueprintContextListener.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSBlueprintContextListener.java @@ -25,6 +25,7 @@ import org.apache.aries.blueprint.parser.NamespaceHandlerSet; import org.apache.aries.blueprint.web.BlueprintContextListener; import org.apache.cxf.internal.CXFAPINamespaceHandler; import org.apache.cxf.jaxrs.blueprint.JAXRSBPNamespaceHandler; +import org.apache.cxf.jaxws.blueprint.JAXWSBPNamespaceHandler; public class JAXRSBlueprintContextListener extends BlueprintContextListener { @Override @@ -39,7 +40,7 @@ public class JAXRSBlueprintContextListener extends BlueprintContextListener { new JAXRSBPNamespaceHandler()); set.addNamespace(URI.create("http://cxf.apache.org/blueprint/jaxws"), getClass().getResource("/schemas/blueprint/jaxws.xsd"), - new JAXRSBPNamespaceHandler()); + new JAXWSBPNamespaceHandler()); return set; } } http://git-wip-us.apache.org/repos/asf/cxf/blob/0f335bac/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java index 071ab17..8d2de8c 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapRestBlueprintTest.java @@ -59,7 +59,6 @@ public class JAXRSSoapRestBlueprintTest extends AbstractClientServerTestBase { } @Test - @Ignore public void testHelloSoap() throws Exception { final QName serviceName = new QName("http://hello.com", "HelloWorld"); final QName portName = new QName("http://hello.com", "HelloWorldPort"); @@ -83,6 +82,9 @@ public class JAXRSSoapRestBlueprintTest extends AbstractClientServerTestBase { users = service.echoUsers(users); assertEquals(1, users.size()); assertEquals("Fred", users.entrySet().iterator().next().getValue().getName()); + + assertEquals(1, service.clearUsers()); + assertEquals(0, service.clearUsers()); } } http://git-wip-us.apache.org/repos/asf/cxf/blob/0f335bac/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java index 7b1263d..a99ba7e 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java @@ -34,7 +34,11 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @WebService(targetNamespace = "http://hello.com") @Path("/") public interface HelloWorld { - + @GET + @Path("/clear") + @Produces("text/plain") + int clearUsers(); + @GET @Produces("text/plain") String sayHi(@QueryParam("text") String text); http://git-wip-us.apache.org/repos/asf/cxf/blob/0f335bac/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java index aefe8a6..6001dab 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java @@ -29,6 +29,12 @@ import javax.jws.WebService; public class HelloWorldImpl implements HelloWorld { Map<Integer, User> users = new LinkedHashMap<Integer, User>(); + public int clearUsers() { + int i = users.size(); + users.clear(); + return i; + } + public String sayHi(String text) { return "Hello " + text; http://git-wip-us.apache.org/repos/asf/cxf/blob/0f335bac/systests/jaxrs/src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml b/systests/jaxrs/src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml index 691607c..1d9becf 100644 --- a/systests/jaxrs/src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml +++ b/systests/jaxrs/src/test/resources/jaxrs_soap_blueprint/WEB-INF/beans.xml @@ -23,7 +23,7 @@ xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd - http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxws.xsd + http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd "> <cxf:bus/>
