cxf git commit: CXF-6744: throwing from @Suspended method does not result in response.
Repository: cxf Updated Branches: refs/heads/master 273e294c8 -> fa0eea884 CXF-6744: throwing from @Suspended method does not result in response. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fa0eea88 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fa0eea88 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fa0eea88 Branch: refs/heads/master Commit: fa0eea884adf49a0a6f990e15a0e69d17800156e Parents: 273e294 Author: Benson MarguliesAuthored: Tue Jan 12 13:20:15 2016 -0500 Committer: Benson Margulies Committed: Tue Jan 12 13:20:15 2016 -0500 -- .../java/org/apache/cxf/systest/jaxrs/AsyncResource.java | 7 +++ .../systest/jaxrs/JAXRSContinuationsServlet3Test.java| 11 +++ 2 files changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/fa0eea88/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java index c5b9530..13856c4 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java @@ -25,6 +25,7 @@ import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; +import javax.ws.rs.WebApplicationException; import javax.ws.rs.container.AsyncResponse; import javax.ws.rs.container.Suspended; import javax.ws.rs.core.Response; @@ -46,6 +47,12 @@ public class AsyncResource { public void suspend(@Suspended AsyncResponse asyncResponse) { ASYNC_RESPONSES[0].add(asyncResponse); } + +@GET +@Path("suspendthrow") +public void suspendthrow(@Suspended AsyncResponse asyncResponse) { +throw new WebApplicationException("Oh Dear", 502); +} @GET @Path("cancelvoid") http://git-wip-us.apache.org/repos/asf/cxf/blob/fa0eea88/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java index a8f5641..283a3e0 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java @@ -19,6 +19,7 @@ package org.apache.cxf.systest.jaxrs; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import javax.ws.rs.client.AsyncInvoker; import javax.ws.rs.client.ClientBuilder; @@ -81,6 +82,16 @@ public class JAXRSContinuationsServlet3Test extends AbstractJAXRSContinuationsTe Future cancel = invokeRequest(base + "cancelvoid?stage=1"); assertString(cancel, AsyncResource.FALSE); } + +@org.junit.Ignore +@Test +public void testLostThrowFromSuspendedCall() throws Exception { +String base = "http://localhost:; + getPort() + "/async/resource/"; +Future suspend = invokeRequest(base + "suspendthrow"); +Response response = suspend.get(10, TimeUnit.SECONDS); +assertEquals(502, response.getStatus()); +} + @Test public void testSuspendSetTimeoutt() throws Exception { final String base = "http://localhost:; + getPort() + "/async/resource2/";
[1/2] cxf git commit: [CXF-6706]: use current versions of all things hibernate-validator to make this work. Improve generic signatures in BeanValidationProvider.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes b0ff0ff0b -> 60e98931d [CXF-6706]: use current versions of all things hibernate-validator to make this work. Improve generic signatures in BeanValidationProvider. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/08246e10 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/08246e10 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/08246e10 Branch: refs/heads/3.1.x-fixes Commit: 08246e10e00396811bddf64a3e131b580afb12db Parents: 96cfaac Author: Benson MarguliesAuthored: Thu Dec 17 21:26:22 2015 +0200 Committer: Benson Margulies Committed: Thu Dec 17 21:26:22 2015 +0200 -- .../cxf/validation/BeanValidationProvider.java | 31 -- .../apache/cxf/osgi/itests/jaxrs/BookStore.java | 34 ++-- .../features/src/main/resources/features.xml| 7 +--- parent/pom.xml | 6 ++-- 4 files changed, 28 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/08246e10/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java -- diff --git a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java index 31e12e1..da285a0 100644 --- a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java +++ b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java @@ -32,6 +32,7 @@ import javax.validation.ValidationException; import javax.validation.ValidationProviderResolver; import javax.validation.ValidatorFactory; import javax.validation.executable.ExecutableValidator; +import javax.validation.spi.ValidationProvider; import org.apache.cxf.common.logging.LogUtils; @@ -39,8 +40,7 @@ public class BeanValidationProvider { private static final Logger LOG = LogUtils.getL7dLogger(BeanValidationProvider.class); private final ValidatorFactory factory; -private ClassLoader validateContextClassloader; - + public BeanValidationProvider() { try { factory = Validation.buildDefaultValidatorFactory(); @@ -76,15 +76,15 @@ public class BeanValidationProvider { this(resolver, null); } -public > BeanValidationProvider( +public , U extends ValidationProvider> BeanValidationProvider( ValidationProviderResolver resolver, -Class providerType) { +Class providerType) { this(resolver, providerType, null); } -public > BeanValidationProvider( +public , U extends ValidationProvider> BeanValidationProvider( ValidationProviderResolver resolver, -Class providerType, +Class providerType, ValidationConfiguration cfg) { try { Configuration factoryCfg = providerType != null @@ -98,14 +98,6 @@ public class BeanValidationProvider { } } -public ClassLoader getValidateContextClassloader() { -return validateContextClassloader; -} - -public void setValidateContextClassloader(ClassLoader validateContextClassloader) { -this.validateContextClassloader = validateContextClassloader; -} - private static void initFactoryConfig(Configuration factoryCfg, ValidationConfiguration cfg) { if (cfg != null) { factoryCfg.parameterNameProvider(cfg.getParameterNameProvider()); @@ -154,16 +146,7 @@ public class BeanValidationProvider { } private< T > Set > doValidateBean(final T bean) { -ClassLoader oldTccl = Thread.currentThread().getContextClassLoader(); -try { -// In OSGi, hibernate's hunt for an EL provided can fail without this. -if (validateContextClassloader != null) { - Thread.currentThread().setContextClassLoader(validateContextClassloader); -} -return factory.getValidator().validate(bean); -} finally { -Thread.currentThread().setContextClassLoader(oldTccl); -} +return factory.getValidator().validate(bean); } private ExecutableValidator getExecutableValidator() { http://git-wip-us.apache.org/repos/asf/cxf/blob/08246e10/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java index ebe3a02..07a55bb 100644 ---
[2/2] cxf git commit: Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes
Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/60e98931 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/60e98931 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/60e98931 Branch: refs/heads/3.1.x-fixes Commit: 60e98931d41d04eafa324deb7170d443e1205a12 Parents: 08246e1 b0ff0ff Author: Benson MarguliesAuthored: Tue Dec 22 07:36:36 2015 -0500 Committer: Benson Margulies Committed: Tue Dec 22 07:36:36 2015 -0500 -- .../java/demo/jaxrs/server/BigQueryService.java | 2 +- .../cxf/jaxrs/json/basic/JsonMapObject.java | 4 +- .../rs/security/jose/common/JoseHeaders.java| 2 + .../cxf/rs/security/jose/jwe/JweHeaders.java| 1 + .../cxf/rs/security/jose/jwk/JsonWebKey.java| 2 + .../cxf/rs/security/jose/jwk/JsonWebKeys.java | 2 + .../cxf/rs/security/jose/jws/JwsHeaders.java| 1 + .../cxf/rs/security/jose/jwt/JwtClaims.java | 2 + .../cxf/rs/security/jose/jwt/JwtToken.java | 6 +- .../security/oidc/common/AbstractUserInfo.java | 2 + .../cxf/rs/security/oidc/common/IdToken.java| 2 + .../rs/security/oidc/common/UserAddress.java| 1 + .../cxf/rs/security/oidc/common/UserInfo.java | 1 + .../saml/sso/SAMLProtocolResponseValidator.java | 132 ++- .../transport/http/auth/DigestAuthSupplier.java | 16 ++- 15 files changed, 105 insertions(+), 71 deletions(-) --
cxf git commit: Make the osgi test bookstore a good example of launching a service in OSGi.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 60e98931d -> 18d64577e Make the osgi test bookstore a good example of launching a service in OSGi. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/18d64577 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/18d64577 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/18d64577 Branch: refs/heads/3.1.x-fixes Commit: 18d64577e5ef1ef3ce26e82db1821b894bd43578 Parents: 60e9893 Author: Benson MarguliesAuthored: Tue Dec 22 08:27:31 2015 -0500 Committer: Benson Margulies Committed: Tue Dec 22 08:27:31 2015 -0500 -- .../java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java | 1 - .../org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java| 5 + 2 files changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/18d64577/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java index dab117b..dcc 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java @@ -73,7 +73,6 @@ public class JaxRsServiceTest extends CXFOSGiTestSupport { Assert.assertNotNull(response.getLocation()); } -//@Ignore("this passes with Karaf 4, but not with the test rig here.") @Test public void postWithValidation() throws Exception { Book book = new Book(); http://git-wip-us.apache.org/repos/asf/cxf/blob/18d64577/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java index 8613f1d..15349be 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java @@ -18,6 +18,8 @@ */ package org.apache.cxf.osgi.itests.jaxrs; +import org.apache.cxf.Bus; +import org.apache.cxf.BusFactory; import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.osgi.framework.BundleActivator; @@ -29,7 +31,10 @@ public class JaxRsTestActivator implements BundleActivator { @Override public void start(BundleContext arg0) throws Exception { +Bus bus = BusFactory.newInstance().createBus(); +bus.setExtension(JaxRsTestActivator.class.getClassLoader(), ClassLoader.class); JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); +sf.setBus(bus); sf.setResourceClasses(BookStore.class); sf.setAddress("/jaxrs"); server = sf.create();
cxf git commit: Make the osgi test bookstore a good example of launching a service in OSGi.
Repository: cxf Updated Branches: refs/heads/master f811aead6 -> d7b2e2e16 Make the osgi test bookstore a good example of launching a service in OSGi. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d7b2e2e1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d7b2e2e1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d7b2e2e1 Branch: refs/heads/master Commit: d7b2e2e16a6d13026abebf6886e532111429a734 Parents: f811aea Author: Benson MarguliesAuthored: Tue Dec 22 08:27:31 2015 -0500 Committer: Benson Margulies Committed: Tue Dec 22 08:28:58 2015 -0500 -- .../java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java | 1 - .../org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java| 5 + 2 files changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/d7b2e2e1/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java index dab117b..dcc 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java @@ -73,7 +73,6 @@ public class JaxRsServiceTest extends CXFOSGiTestSupport { Assert.assertNotNull(response.getLocation()); } -//@Ignore("this passes with Karaf 4, but not with the test rig here.") @Test public void postWithValidation() throws Exception { Book book = new Book(); http://git-wip-us.apache.org/repos/asf/cxf/blob/d7b2e2e1/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java index 8613f1d..15349be 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java @@ -18,6 +18,8 @@ */ package org.apache.cxf.osgi.itests.jaxrs; +import org.apache.cxf.Bus; +import org.apache.cxf.BusFactory; import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.osgi.framework.BundleActivator; @@ -29,7 +31,10 @@ public class JaxRsTestActivator implements BundleActivator { @Override public void start(BundleContext arg0) throws Exception { +Bus bus = BusFactory.newInstance().createBus(); +bus.setExtension(JaxRsTestActivator.class.getClassLoader(), ClassLoader.class); JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); +sf.setBus(bus); sf.setResourceClasses(BookStore.class); sf.setAddress("/jaxrs"); server = sf.create();
[1/3] cxf git commit: Fix another bad import version for javax.validation.
Repository: cxf Updated Branches: refs/heads/master 9c00297ef -> 40dc07cea Fix another bad import version for javax.validation. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/22bc8517 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/22bc8517 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/22bc8517 Branch: refs/heads/master Commit: 22bc851780264cfe30f3fc5eef52aaad1e578e91 Parents: dd76961 Author: Benson MarguliesAuthored: Tue Dec 15 20:55:34 2015 +0200 Committer: Benson Margulies Committed: Tue Dec 15 20:56:18 2015 +0200 -- rt/frontend/jaxrs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/22bc8517/rt/frontend/jaxrs/pom.xml -- diff --git a/rt/frontend/jaxrs/pom.xml b/rt/frontend/jaxrs/pom.xml index 44f9bf6..7f81332 100644 --- a/rt/frontend/jaxrs/pom.xml +++ b/rt/frontend/jaxrs/pom.xml @@ -35,7 +35,7 @@ javax.servlet*;version="${cxf.osgi.javax.servlet.version}", org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional, org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}", - javax.validation*;resolution:=optional;version="${cxf.validation.api.version}", + javax.validation*;resolution:=optional;version="${cxf.validation.api.package.version}", javax.ws.rs.client;version="[2.0,3)", javax.ws.rs*;version="[1.0,3)",
[3/3] cxf git commit: [CXF-6706]: use current versions of all things hibernate-validator to make this work. Improve generic signatures in BeanValidationProvider.
[CXF-6706]: use current versions of all things hibernate-validator to make this work. Improve generic signatures in BeanValidationProvider. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/40dc07ce Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40dc07ce Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40dc07ce Branch: refs/heads/master Commit: 40dc07cea0667abbcc120f4424449776f252e7c1 Parents: 7264f54 Author: Benson MarguliesAuthored: Thu Dec 17 21:26:22 2015 +0200 Committer: Benson Margulies Committed: Thu Dec 17 21:27:39 2015 +0200 -- .../cxf/validation/BeanValidationProvider.java | 31 -- .../apache/cxf/osgi/itests/jaxrs/BookStore.java | 34 ++-- .../features/src/main/resources/features.xml| 7 +--- parent/pom.xml | 6 ++-- 4 files changed, 28 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/40dc07ce/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java -- diff --git a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java index 31e12e1..da285a0 100644 --- a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java +++ b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java @@ -32,6 +32,7 @@ import javax.validation.ValidationException; import javax.validation.ValidationProviderResolver; import javax.validation.ValidatorFactory; import javax.validation.executable.ExecutableValidator; +import javax.validation.spi.ValidationProvider; import org.apache.cxf.common.logging.LogUtils; @@ -39,8 +40,7 @@ public class BeanValidationProvider { private static final Logger LOG = LogUtils.getL7dLogger(BeanValidationProvider.class); private final ValidatorFactory factory; -private ClassLoader validateContextClassloader; - + public BeanValidationProvider() { try { factory = Validation.buildDefaultValidatorFactory(); @@ -76,15 +76,15 @@ public class BeanValidationProvider { this(resolver, null); } -public > BeanValidationProvider( +public , U extends ValidationProvider> BeanValidationProvider( ValidationProviderResolver resolver, -Class providerType) { +Class providerType) { this(resolver, providerType, null); } -public > BeanValidationProvider( +public , U extends ValidationProvider> BeanValidationProvider( ValidationProviderResolver resolver, -Class providerType, +Class providerType, ValidationConfiguration cfg) { try { Configuration factoryCfg = providerType != null @@ -98,14 +98,6 @@ public class BeanValidationProvider { } } -public ClassLoader getValidateContextClassloader() { -return validateContextClassloader; -} - -public void setValidateContextClassloader(ClassLoader validateContextClassloader) { -this.validateContextClassloader = validateContextClassloader; -} - private static void initFactoryConfig(Configuration factoryCfg, ValidationConfiguration cfg) { if (cfg != null) { factoryCfg.parameterNameProvider(cfg.getParameterNameProvider()); @@ -154,16 +146,7 @@ public class BeanValidationProvider { } private< T > Set > doValidateBean(final T bean) { -ClassLoader oldTccl = Thread.currentThread().getContextClassLoader(); -try { -// In OSGi, hibernate's hunt for an EL provided can fail without this. -if (validateContextClassloader != null) { - Thread.currentThread().setContextClassLoader(validateContextClassloader); -} -return factory.getValidator().validate(bean); -} finally { -Thread.currentThread().setContextClassLoader(oldTccl); -} +return factory.getValidator().validate(bean); } private ExecutableValidator getExecutableValidator() { http://git-wip-us.apache.org/repos/asf/cxf/blob/40dc07ce/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java -- diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java index ebe3a02..07a55bb 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/BookStore.java +++
[2/3] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7264f54a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7264f54a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7264f54a Branch: refs/heads/master Commit: 7264f54ab647e0315962bb189a79087bb87c0232 Parents: 22bc851 9c00297 Author: Benson MarguliesAuthored: Thu Dec 17 21:27:27 2015 +0200 Committer: Benson Margulies Committed: Thu Dec 17 21:27:27 2015 +0200 -- .../java/demo/jaxrs/server/IdTokenService.java | 10 ++--- .../src/main/webapp/forms/idToken.jsp | 8 ++-- .../java/demo/jaxrs/server/BigQueryService.java | 12 +++-- .../javatowadl/ParseJavaDocMojo.java| 12 + parent/pom.xml | 2 +- .../apache/cxf/aegis/type/basic/ObjectType.java | 46 .../cxf/aegis/type/encoded/TrailingBlocks.java | 1 - .../support/JaxWsServiceConfiguration.java | 17 +++- .../cxf/rs/security/jose/jws/JwsUtils.java | 2 + .../oidc/rp/OidcRpAuthenticationService.java| 5 +-- .../factory/AbstractServiceConfiguration.java | 4 ++ .../wsdl/service/factory/Messages.properties| 3 ++ .../factory/ReflectionServiceFactoryBean.java | 22 -- .../cxf/systest/ws/addressing/spring/spring.xml | 2 +- 14 files changed, 73 insertions(+), 73 deletions(-) --
[1/2] cxf git commit: Trivial .gitignore change, mostly so that I can type:
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes bbfe35e46 -> 9f746c97a Trivial .gitignore change, mostly so that I can type: Closes #102. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6e2c3553 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6e2c3553 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6e2c3553 Branch: refs/heads/3.1.x-fixes Commit: 6e2c3553816cecfa1fa009910b6cea0aabb3331a Parents: 1dea643 Author: Benson MarguliesAuthored: Mon Dec 14 13:00:06 2015 -0500 Committer: Benson Margulies Committed: Mon Dec 14 13:00:06 2015 -0500 -- .gitignore | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/6e2c3553/.gitignore -- diff --git a/.gitignore b/.gitignore index 9329527..51c4cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ target/ velocity.log bin/ +*~
[2/2] cxf git commit: Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes
Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9f746c97 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9f746c97 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9f746c97 Branch: refs/heads/3.1.x-fixes Commit: 9f746c97ad9566f5c9410c9d600df237c97beae0 Parents: 6e2c355 bbfe35e Author: Benson MarguliesAuthored: Tue Dec 15 18:26:17 2015 +0200 Committer: Benson Margulies Committed: Tue Dec 15 18:26:17 2015 +0200 -- .../cxf/rs/security/oidc/common/UserInfo.java | 7 --- .../cxf/rs/security/oidc/rp/IdTokenContext.java | 25 + .../oidc/rp/IdTokenContextProvider.java | 35 - .../oidc/rp/OidcClientTokenContext.java | 7 +-- .../security/oidc/rp/OidcIdTokenProvider.java | 19 +-- .../oidc/rp/OidcIdTokenRequestFilter.java | 3 ++ .../oidc/rp/OidcRpAuthenticationFilter.java | 8 ++- .../security/oidc/rp/OidcUserInfoProvider.java | 55 .../rs/security/oidc/rp/UserInfoContext.java| 25 + .../oidc/rp/UserInfoContextProvider.java| 39 -- 10 files changed, 131 insertions(+), 92 deletions(-) --
[1/2] cxf git commit: Fix another bad import version for javax.validation.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 015d7a6dd -> 601c0060e Fix another bad import version for javax.validation. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e3edee61 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e3edee61 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e3edee61 Branch: refs/heads/3.1.x-fixes Commit: e3edee617edfef541385cd0043ca88ab2e6456d7 Parents: 9f746c9 Author: Benson MarguliesAuthored: Tue Dec 15 20:55:34 2015 +0200 Committer: Benson Margulies Committed: Tue Dec 15 20:55:34 2015 +0200 -- rt/frontend/jaxrs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e3edee61/rt/frontend/jaxrs/pom.xml -- diff --git a/rt/frontend/jaxrs/pom.xml b/rt/frontend/jaxrs/pom.xml index 4d78cd6..bbca8a4 100644 --- a/rt/frontend/jaxrs/pom.xml +++ b/rt/frontend/jaxrs/pom.xml @@ -35,7 +35,7 @@ javax.servlet*;version="${cxf.osgi.javax.servlet.version}", org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional, org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}", - javax.validation*;resolution:=optional;version="${cxf.validation.api.version}", + javax.validation*;resolution:=optional;version="${cxf.validation.api.package.version}", javax.ws.rs.client;version="[2.0,3)", javax.ws.rs*;version="[1.0,3)",
[2/2] cxf git commit: Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes
Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/601c0060 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/601c0060 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/601c0060 Branch: refs/heads/3.1.x-fixes Commit: 601c0060eef8c5792133c0c5a6561eb399fb28d0 Parents: e3edee6 015d7a6 Author: Benson MarguliesAuthored: Tue Dec 15 20:55:50 2015 +0200 Committer: Benson Margulies Committed: Tue Dec 15 20:55:50 2015 +0200 -- .../oidc/rp/AbstractTokenValidator.java | 34 ++-- .../cxf/rs/security/oidc/rp/UserInfoClient.java | 3 +- .../cxf/rs/security/oidc/utils/OidcUtils.java | 5 +-- 3 files changed, 30 insertions(+), 12 deletions(-) --
cxf git commit: [CXF-6706] Make use of the support code in the ServiceMix hibernate bundle, plus add some tccl management to the BeanValidationProvider, to get BeanValidation to work with OSGi.
Repository: cxf Updated Branches: refs/heads/master d05a928ae -> 670ba1f4d [CXF-6706] Make use of the support code in the ServiceMix hibernate bundle, plus add some tccl management to the BeanValidationProvider, to get BeanValidation to work with OSGi. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/670ba1f4 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/670ba1f4 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/670ba1f4 Branch: refs/heads/master Commit: 670ba1f4d832690258b73ea55bf251a830303e19 Parents: d05a928 Author: Benson MarguliesAuthored: Mon Dec 14 12:58:47 2015 -0500 Committer: Benson Margulies Committed: Mon Dec 14 13:01:24 2015 -0500 -- .../cxf/validation/BeanValidationProvider.java | 24 ++-- osgi/itests/pom.xml | 12 ++ .../cxf/osgi/itests/CXFOSGiTestSupport.java | 7 ++-- .../org/apache/cxf/osgi/itests/jaxrs/Book.java | 4 ++ .../apache/cxf/osgi/itests/jaxrs/BookStore.java | 40 .../cxf/osgi/itests/jaxrs/JaxRsServiceTest.java | 22 ++- .../features/src/main/resources/features.xml| 4 ++ parent/pom.xml | 2 +- 8 files changed, 107 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/670ba1f4/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java -- diff --git a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java index 2efc7a1..31e12e1 100644 --- a/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java +++ b/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java @@ -39,6 +39,7 @@ public class BeanValidationProvider { private static final Logger LOG = LogUtils.getL7dLogger(BeanValidationProvider.class); private final ValidatorFactory factory; +private ClassLoader validateContextClassloader; public BeanValidationProvider() { try { @@ -80,7 +81,7 @@ public class BeanValidationProvider { Class providerType) { this(resolver, providerType, null); } - + public > BeanValidationProvider( ValidationProviderResolver resolver, Class providerType, @@ -96,7 +97,15 @@ public class BeanValidationProvider { throw ex; } } - + +public ClassLoader getValidateContextClassloader() { +return validateContextClassloader; +} + +public void setValidateContextClassloader(ClassLoader validateContextClassloader) { +this.validateContextClassloader = validateContextClassloader; +} + private static void initFactoryConfig(Configuration factoryCfg, ValidationConfiguration cfg) { if (cfg != null) { factoryCfg.parameterNameProvider(cfg.getParameterNameProvider()); @@ -145,7 +154,16 @@ public class BeanValidationProvider { } private< T > Set > doValidateBean(final T bean) { -return factory.getValidator().validate(bean); +ClassLoader oldTccl = Thread.currentThread().getContextClassLoader(); +try { +// In OSGi, hibernate's hunt for an EL provided can fail without this. +if (validateContextClassloader != null) { + Thread.currentThread().setContextClassLoader(validateContextClassloader); +} +return factory.getValidator().validate(bean); +} finally { +Thread.currentThread().setContextClassLoader(oldTccl); +} } private ExecutableValidator getExecutableValidator() { http://git-wip-us.apache.org/repos/asf/cxf/blob/670ba1f4/osgi/itests/pom.xml -- diff --git a/osgi/itests/pom.xml b/osgi/itests/pom.xml index 3b4f7ab..a1143fe 100644 --- a/osgi/itests/pom.xml +++ b/osgi/itests/pom.xml @@ -91,6 +91,18 @@ ${cxf.karaf.version} +org.apache.servicemix.specs + org.apache.servicemix.specs.jsr303-api-1.1.0 +${cxf.servicemix.specs.version} +provided + + +org.apache.servicemix.bundles + org.apache.servicemix.bundles.hibernate-validator +5.0.2.Final_1 +provided + + org.osgi org.osgi.core http://git-wip-us.apache.org/repos/asf/cxf/blob/670ba1f4/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java
cxf git commit: cxf-6705: Fix versions used to import javax.validation packages.
Repository: cxf Updated Branches: refs/heads/master 974280aae -> e5fa40503 cxf-6705: Fix versions used to import javax.validation packages. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e5fa4050 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e5fa4050 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e5fa4050 Branch: refs/heads/master Commit: e5fa40503b793514708fdc6289671dd9718670ef Parents: 974280a Author: Benson MarguliesAuthored: Fri Dec 11 09:02:36 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 09:02:36 2015 -0500 -- core/pom.xml | 2 +- parent/pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e5fa4050/core/pom.xml -- diff --git a/core/pom.xml b/core/pom.xml index ab6ccbd..cda420d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -56,7 +56,7 @@ javax.annotation;version="${cxf.osgi.javax.annotation.version}", javax.xml.bind*;version="${cxf.osgi.javax.bind.version}", javax.xml.stream*;version="${cxf.osgi.javax.stream.version}", - javax.validation*;resolution:=optional;version="${cxf.validation.api.version}", + javax.validation*;resolution:=optional;version="${cxf.validation.api.package.version}", com.sun.xml.bind.api;resolution:=optional, com.sun.xml.bind.api.impl;resolution:=optional, com.sun.xml.internal.bind.api;resolution:=optional, http://git-wip-us.apache.org/repos/asf/cxf/blob/e5fa4050/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 3df4832..ee45d8a 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -156,6 +156,9 @@ 2.2.1 1.1.4c_6 1.1.0.Final + + 1.0.0 1.1 1.0 2.1.2.Final
cxf git commit: cxf-6705: Fix versions used to import javax.validation packages.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 0dfe3a614 -> 358589c33 cxf-6705: Fix versions used to import javax.validation packages. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/358589c3 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/358589c3 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/358589c3 Branch: refs/heads/3.1.x-fixes Commit: 358589c33f44d747f5a924f0b1cdedfcb7018a22 Parents: 0dfe3a6 Author: Benson MarguliesAuthored: Fri Dec 11 09:02:36 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 09:06:00 2015 -0500 -- core/pom.xml | 2 +- parent/pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/358589c3/core/pom.xml -- diff --git a/core/pom.xml b/core/pom.xml index 3cebe9f..8bc295e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -56,7 +56,7 @@ javax.annotation;version="${cxf.osgi.javax.annotation.version}", javax.xml.bind*;version="${cxf.osgi.javax.bind.version}", javax.xml.stream*;version="${cxf.osgi.javax.stream.version}", - javax.validation*;resolution:=optional;version="${cxf.validation.api.version}", + javax.validation*;resolution:=optional;version="${cxf.validation.api.package.version}", com.sun.xml.bind.api;resolution:=optional, com.sun.xml.bind.api.impl;resolution:=optional, com.sun.xml.internal.bind.api;resolution:=optional, http://git-wip-us.apache.org/repos/asf/cxf/blob/358589c3/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 8ca9fdb..7e62766 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -156,6 +156,9 @@ 2.2.1 1.1.4c_6 1.1.0.Final + + 1.0.0 1.1 1.0 2.1.2.Final
[2/2] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/af717517 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/af717517 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/af717517 Branch: refs/heads/master Commit: af7175171ade0017e77a8deb17ee90849b9ace1b Parents: 4bb552c 08068c8 Author: Benson MarguliesAuthored: Fri Dec 11 11:14:27 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 11:14:27 2015 -0500 -- .../oauth2/client/OAuthClientUtils.java | 11 +-- .../oauth2/common/ServerAccessToken.java| 9 +++ .../oauth2/grants/AbstractGrantHandler.java | 66 .../grants/code/AbstractCodeDataProvider.java | 1 + .../code/AuthorizationCodeGrantHandler.java | 38 +++-- .../code/ServerAuthorizationCodeGrant.java | 9 +++ .../provider/AbstractOAuthDataProvider.java | 1 + .../oauth2/services/AbstractOAuthService.java | 9 ++- .../oauth2/services/AbstractTokenService.java | 81 .../oauth2/services/AccessTokenService.java | 3 +- .../services/DirectAuthorizationService.java| 41 ++ .../services/RedirectionBasedGrantService.java | 79 ++- .../oauth2/services/TokenRevocationService.java | 3 +- .../oidc/idp/IdTokenResponseFilter.java | 3 + 14 files changed, 222 insertions(+), 132 deletions(-) --
[1/2] cxf git commit: CXF-6705: supply hibernate with all of its dependencies.
Repository: cxf Updated Branches: refs/heads/master 08068c8a6 -> af7175171 CXF-6705: supply hibernate with all of its dependencies. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4bb552ce Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4bb552ce Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4bb552ce Branch: refs/heads/master Commit: 4bb552ce8b079c7553881e6ad7fd009d4732052f Parents: e5fa405 Author: Benson MarguliesAuthored: Fri Dec 11 11:13:38 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 11:14:08 2015 -0500 -- .../features/src/main/resources/features.xml | 19 ++- parent/pom.xml | 7 --- 2 files changed, 22 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb552ce/osgi/karaf/features/src/main/resources/features.xml -- diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml index dafdbea..0f39e10 100644 --- a/osgi/karaf/features/src/main/resources/features.xml +++ b/osgi/karaf/features/src/main/resources/features.xml @@ -442,7 +442,24 @@ mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-${cxf.osgi.validation.api.version}/${cxf.servicemix.specs.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} + +mvn:javax.validation/validation-api/1.1.0.Final + +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/2.3_1 + +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/1.5.2_2 + +mvn:org.jboss.logging/jboss-logging/3.1.3.GA + +mvn:com.fasterxml/classmate/1.1.0 + +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/2.4.0 +mvn:org.codehaus.woodstox/stax2-api/4.0.0 +mvn:org.codehaus.woodstox/woodstox/5.0.2 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.0_1 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.8.7_2 http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb552ce/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index ee45d8a..1e6b9f5 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -156,9 +156,10 @@ 2.2.1 1.1.4c_6 1.1.0.Final - - 1.0.0 + + [1.0.0,2) 1.1 1.0 2.1.2.Final
[1/2] cxf git commit: CXF-6705: supply hibernate with all of its dependencies.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 6a328a5c0 -> 2ec0130e0 CXF-6705: supply hibernate with all of its dependencies. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c87aa760 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c87aa760 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c87aa760 Branch: refs/heads/3.1.x-fixes Commit: c87aa76033ddec5a738851117191da098706e494 Parents: 358589c Author: Benson MarguliesAuthored: Fri Dec 11 11:13:38 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 11:13:38 2015 -0500 -- .../features/src/main/resources/features.xml | 19 ++- parent/pom.xml | 7 --- 2 files changed, 22 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/c87aa760/osgi/karaf/features/src/main/resources/features.xml -- diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml index dafdbea..0f39e10 100644 --- a/osgi/karaf/features/src/main/resources/features.xml +++ b/osgi/karaf/features/src/main/resources/features.xml @@ -442,7 +442,24 @@ mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-${cxf.osgi.validation.api.version}/${cxf.servicemix.specs.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} + +mvn:javax.validation/validation-api/1.1.0.Final + +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/2.3_1 + +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/1.5.2_2 + +mvn:org.jboss.logging/jboss-logging/3.1.3.GA + +mvn:com.fasterxml/classmate/1.1.0 + +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/2.4.0 +mvn:org.codehaus.woodstox/stax2-api/4.0.0 +mvn:org.codehaus.woodstox/woodstox/5.0.2 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.0_1 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.8.7_2 http://git-wip-us.apache.org/repos/asf/cxf/blob/c87aa760/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 7e62766..e0666c4 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -156,9 +156,10 @@ 2.2.1 1.1.4c_6 1.1.0.Final - - 1.0.0 + + [1.0.0,2) 1.1 1.0 2.1.2.Final
[2/2] cxf git commit: Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes
Merge branch '3.1.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.1.x-fixes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2ec0130e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2ec0130e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2ec0130e Branch: refs/heads/3.1.x-fixes Commit: 2ec0130e033f59c1e5e36529a9cfb4a0b1c82b12 Parents: c87aa76 6a328a5 Author: Benson MarguliesAuthored: Fri Dec 11 11:14:58 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 11:14:58 2015 -0500 -- .../oauth2/client/OAuthClientUtils.java | 11 +-- .../oauth2/common/ServerAccessToken.java| 9 +++ .../oauth2/grants/AbstractGrantHandler.java | 67 .../grants/code/AbstractCodeDataProvider.java | 1 + .../code/AuthorizationCodeGrantHandler.java | 40 -- .../code/ServerAuthorizationCodeGrant.java | 9 +++ .../provider/AbstractOAuthDataProvider.java | 1 + .../oauth2/services/AbstractOAuthService.java | 9 ++- .../oauth2/services/AbstractTokenService.java | 81 .../oauth2/services/AccessTokenService.java | 3 +- .../services/DirectAuthorizationService.java| 41 ++ .../services/RedirectionBasedGrantService.java | 79 ++- .../oauth2/services/TokenRevocationService.java | 3 +- .../oidc/idp/IdTokenResponseFilter.java | 3 + 14 files changed, 225 insertions(+), 132 deletions(-) --
cxf git commit: neaten up version numbers in hibernate features.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 706ddbcb9 -> 7b4c14f1a neaten up version numbers in hibernate features. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7b4c14f1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7b4c14f1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7b4c14f1 Branch: refs/heads/3.1.x-fixes Commit: 7b4c14f1aadb810d5b91fa0adfa2a6bc70e45a76 Parents: 706ddbc Author: Benson MarguliesAuthored: Fri Dec 11 14:53:19 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 14:53:19 2015 -0500 -- .../features/src/main/resources/features.xml| 20 ++-- parent/pom.xml | 6 ++ 2 files changed, 16 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/7b4c14f1/osgi/karaf/features/src/main/resources/features.xml -- diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml index 0f39e10..ebd32d1 100644 --- a/osgi/karaf/features/src/main/resources/features.xml +++ b/osgi/karaf/features/src/main/resources/features.xml @@ -445,21 +445,21 @@ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} -mvn:javax.validation/validation-api/1.1.0.Final +mvn:javax.validation/validation-api/${cxf.validation.api.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/2.3_1 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/${cxf.servicemix.jodatime.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/1.5.2_2 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/${cxf.servicemix.jsoup.version} -mvn:org.jboss.logging/jboss-logging/3.1.3.GA +mvn:org.jboss.logging/jboss-logging/${cxf.jboss.logging.version} -mvn:com.fasterxml/classmate/1.1.0 +mvn:com.fasterxml/classmate/${cxf.classmate.version} -mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/2.4.0 -mvn:org.codehaus.woodstox/stax2-api/4.0.0 -mvn:org.codehaus.woodstox/woodstox/5.0.2 -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.0_1 -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.8.7_2 +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/${cxf.servicemix.specs.version} +mvn:org.codehaus.woodstox/stax2-api/${cxf.woodstox.stax2-api.version} +mvn:org.codehaus.woodstox/woodstox-core-asl/${cxf.woodstox.core.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cxf.servicemix.cglib.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${cxf.servicemix.aspectj.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/7b4c14f1/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index e0666c4..f417940 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -75,6 +75,7 @@ 1.53 2.2_2 [2.1.3,3.0.0) +1.1.0 1.10 3.2.2 2.6 @@ -163,6 +164,7 @@ 1.1 1.0 2.1.2.Final +3.1.3.GA 1.1.0 5.0.2.Final 1.0.4 @@ -179,6 +181,10 @@ 2.0.5 1.2.4 2.6.0_2 + 1.8.7_2 +3.2.0_1 + 2.3_1 +1.5.2_2 2.4.0 2.4.0 1.4.4
cxf git commit: neaten up version numbers in hibernate features.
Repository: cxf Updated Branches: refs/heads/master aa729bc6c -> a8553871e neaten up version numbers in hibernate features. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a8553871 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a8553871 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a8553871 Branch: refs/heads/master Commit: a8553871e0d6663efdac08503c49b14a4b685393 Parents: aa729bc Author: Benson MarguliesAuthored: Fri Dec 11 14:53:19 2015 -0500 Committer: Benson Margulies Committed: Fri Dec 11 14:54:28 2015 -0500 -- .../features/src/main/resources/features.xml| 20 ++-- parent/pom.xml | 6 ++ 2 files changed, 16 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/a8553871/osgi/karaf/features/src/main/resources/features.xml -- diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml index 0f39e10..ebd32d1 100644 --- a/osgi/karaf/features/src/main/resources/features.xml +++ b/osgi/karaf/features/src/main/resources/features.xml @@ -445,21 +445,21 @@ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hibernate-validator/${cxf.hibernate-validator.bundle.version} -mvn:javax.validation/validation-api/1.1.0.Final +mvn:javax.validation/validation-api/${cxf.validation.api.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/2.3_1 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/${cxf.servicemix.jodatime.version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/1.5.2_2 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/${cxf.servicemix.jsoup.version} -mvn:org.jboss.logging/jboss-logging/3.1.3.GA +mvn:org.jboss.logging/jboss-logging/${cxf.jboss.logging.version} -mvn:com.fasterxml/classmate/1.1.0 +mvn:com.fasterxml/classmate/${cxf.classmate.version} -mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/2.4.0 -mvn:org.codehaus.woodstox/stax2-api/4.0.0 -mvn:org.codehaus.woodstox/woodstox/5.0.2 -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.0_1 -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.8.7_2 +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/${cxf.servicemix.specs.version} +mvn:org.codehaus.woodstox/stax2-api/${cxf.woodstox.stax2-api.version} +mvn:org.codehaus.woodstox/woodstox-core-asl/${cxf.woodstox.core.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cxf.servicemix.cglib.version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${cxf.servicemix.aspectj.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/a8553871/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 4b5504e..eb783ae 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -75,6 +75,7 @@ 1.53 2.2_2 [2.1.3,3.0.0) +1.1.0 1.10 3.2.2 2.6 @@ -163,6 +164,7 @@ 1.1 1.0 2.1.2.Final +3.1.3.GA 1.1.0 5.0.2.Final 1.0.4 @@ -179,6 +181,10 @@ 2.0.5 1.2.4 2.6.0_2 + 1.8.7_2 +3.2.0_1 + 2.3_1 +1.5.2_2 2.4.0 2.4.0 1.4.4
svn commit: r1443973 - in /cxf/trunk: ./ api/src/main/java/org/apache/cxf/phase/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/src/test/java/org/apache/cxf/b
Author: bimargulies Date: Fri Feb 8 12:10:36 2013 New Revision: 1443973 URL: http://svn.apache.org/r1443973 Log: CXF-4805: insist on GET or POST in soap messages. Modified: cxf/trunk/.gitignore cxf/trunk/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java Modified: cxf/trunk/.gitignore URL: http://svn.apache.org/viewvc/cxf/trunk/.gitignore?rev=1443973r1=1443972r2=1443973view=diff == --- cxf/trunk/.gitignore (original) +++ cxf/trunk/.gitignore Fri Feb 8 12:10:36 2013 @@ -1,3 +1,4 @@ +.idea/ *.iml *.ipr *.iws Modified: cxf/trunk/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java?rev=1443973r1=1443972r2=1443973view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java Fri Feb 8 12:10:36 2013 @@ -33,7 +33,7 @@ import org.apache.cxf.message.MessageUti * participate in phased message processing. Developers should extend from * this class when implementing custom interceptors. * Developers need to provide an implementation for handleMessage() and - * can overide the handleFault() implementation. They should not overide + * can override the handleFault() implementation. They should not override * the other methods. */ public abstract class AbstractPhaseInterceptorT extends Message implements PhaseInterceptorT { Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java?rev=1443973r1=1443972r2=1443973view=diff == --- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java (original) +++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java Fri Feb 8 12:10:36 2013 @@ -126,6 +126,16 @@ public class ReadHeadersInterceptor exte LOG.fine(ReadHeadersInterceptor skipped in HTTP GET method); return; } + +/* + * Reject OPTIONS, and any other noise that is not allowed in SOAP. + */ +if (!POST.equals((String)message.get(org.apache.cxf.message.Message.HTTP_REQUEST_METHOD))) { +Fault formula405 = new Fault(HTTP verb was not GET or POST, LOG); +formula405.setStatusCode(405); +throw formula405; +} + XMLStreamReader xmlReader = message.getContent(XMLStreamReader.class); boolean closeNeeded = false; if (xmlReader == null) { Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java?rev=1443973r1=1443972r2=1443973view=diff == --- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java (original) +++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java Fri Feb 8 12:10:36 2013 @@ -29,6 +29,7 @@ import javax.activation.DataHandler; import javax.mail.util.ByteArrayDataSource; import javax.xml.stream.XMLStreamReader; +import org.apache.cxf.interceptor.Fault; import org.w3c.dom.Element; import org.apache.cxf.BusFactory; @@ -66,6 +67,19 @@ public class ReadHeaderInterceptorTest e } @Test +public void testBadHttpVerb() throws Exception { +prepareSoapMessage(test-soap-header.xml); +soapMessage.put(Message.HTTP_REQUEST_METHOD, OPTIONS); +ReadHeadersInterceptor r = new ReadHeadersInterceptor(BusFactory.getDefaultBus()); +try { +r.handleMessage(soapMessage); +fail(Did not throw exception); +} catch (Fault f) { +assertEquals(405, f.getStatusCode()); +} +} + +@Test public void testBadSOAPEnvelopeNamespace() throws Exception { soapMessage
svn commit: r1443974 - in /cxf/trunk/rt/bindings/soap/src: main/java/org/apache/cxf/binding/soap/interceptor/ test/java/org/apache/cxf/binding/soap/ test/java/org/apache/cxf/binding/soap/interceptor/
Author: bimargulies Date: Fri Feb 8 12:10:50 2013 New Revision: 1443974 URL: http://svn.apache.org/r1443974 Log: CXF-4805: fix checkstyle, tolerate no verb at all. Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java?rev=1443974r1=1443973r2=1443974view=diff == --- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java (original) +++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java Fri Feb 8 12:10:50 2013 @@ -130,7 +130,8 @@ public class ReadHeadersInterceptor exte /* * Reject OPTIONS, and any other noise that is not allowed in SOAP. */ -if (!POST.equals((String)message.get(org.apache.cxf.message.Message.HTTP_REQUEST_METHOD))) { +final String verb = (String) message.get(org.apache.cxf.message.Message.HTTP_REQUEST_METHOD); +if (verb != null !POST.equals(verb)) { Fault formula405 = new Fault(HTTP verb was not GET or POST, LOG); formula405.setStatusCode(405); throw formula405; Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java?rev=1443974r1=1443973r2=1443974view=diff == --- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java (original) +++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java Fri Feb 8 12:10:50 2013 @@ -29,7 +29,6 @@ import javax.activation.DataHandler; import javax.mail.util.ByteArrayDataSource; import javax.xml.stream.XMLStreamReader; -import org.apache.cxf.interceptor.Fault; import org.w3c.dom.Element; import org.apache.cxf.BusFactory; @@ -41,6 +40,7 @@ import org.apache.cxf.binding.soap.inter import org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor; import org.apache.cxf.headers.Header; import org.apache.cxf.helpers.DOMUtils; +import org.apache.cxf.interceptor.Fault; import org.apache.cxf.interceptor.StaxInInterceptor; import org.apache.cxf.message.Attachment; import org.apache.cxf.message.Message; Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java?rev=1443974r1=1443973r2=1443974view=diff == --- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java (original) +++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java Fri Feb 8 12:10:50 2013 @@ -31,7 +31,11 @@ import javax.mail.util.ByteArrayDataSour import org.apache.cxf.attachment.AttachmentImpl; import org.apache.cxf.attachment.AttachmentUtil; import org.apache.cxf.interceptor.InterceptorChain; -import org.apache.cxf.message.*; +import org.apache.cxf.message.Attachment; +import org.apache.cxf.message.Exchange; +import org.apache.cxf.message.ExchangeImpl; +import org.apache.cxf.message.Message; +import org.apache.cxf.message.MessageImpl; public final class TestUtil { Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java?rev=1443974r1=1443973r2=1443974view=diff == --- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java (original) +++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java Fri Feb 8 12:10:50 2013 @@ -28,7 +28,6 @@ import javax.xml.soap.SOAPPart; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; -import org.apache.cxf.message.Message; import org.w3c.dom.Document; import
svn commit: r1392027 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java
Author: bimargulies Date: Sun Sep 30 14:08:02 2012 New Revision: 1392027 URL: http://svn.apache.org/viewvc?rev=1392027view=rev Log: CXF-4528: change the logging severity in WebApplicationExceptionMapper when the app has a FaultListener that actually asked for logging. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java?rev=1392027r1=1392026r2=1392027view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java Sun Sep 30 14:08:02 2012 @@ -23,7 +23,6 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.logging.Level; import java.util.logging.Logger; - import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; @@ -33,6 +32,13 @@ import org.apache.cxf.logging.FaultListe import org.apache.cxf.message.Message; import org.apache.cxf.phase.PhaseInterceptorChain; +/** + * Default exception mapper for {@link WebApplicationException}. + * This class interacts with {@link FaultListener}. If the service has a {@link FaultListener}, + * then this mapper calls it to determine whether to log the exception. In theory, {@link FaultListener} + * objects could take other actions, but since they cannot produce a {@link Response}, they + * are practically limited to controlling logging. + */ public class WebApplicationExceptionMapper implements ExceptionMapperWebApplicationException { @@ -55,17 +61,26 @@ public class WebApplicationExceptionMapp } if (flogger != null || LOG.isLoggable(Level.FINE)) { String errorMessage = buildErrorMessage(r, ex); - -boolean doDefault = -flogger != null ? flogger.faultOccurred(ex, errorMessage, msg) : true; -if (doDefault LOG.isLoggable(Level.FINE)) { -LOG.log(Level.FINE, errorMessage, ex); + +if (flogger != null) { +if (flogger.faultOccurred(ex, errorMessage, msg)) { +LOG.log(Level.INFO, errorMessage, ex); +} +} else { +if (LOG.isLoggable(Level.FINE)) { +LOG.log(Level.FINE, errorMessage, ex); +/* + * only print a stack trace if we are logging FINE. + * If there is a listener, let it print the stack trace if + * wants one. + */ +if (printStackTrace) { +LOG.fine(getStackTrace(ex)); +} +} } } -if (printStackTrace) { -LOG.warning(getStackTrace(ex)); -} - + return r; } @@ -89,7 +104,12 @@ public class WebApplicationExceptionMapp ex.printStackTrace(new PrintWriter(sw)); return sw.toString(); } - + +/** + * Control whether this mapper logs backtraces. If there is no {@link FaultListener}, + * and this is tttrue/tt, this mapper will log the stack trace at FINE. + * @param printStackTrace whether to log stack trace. + */ public void setPrintStackTrace(boolean printStackTrace) { this.printStackTrace = printStackTrace; }
svn commit: r1367836 - /cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
Author: bimargulies Date: Wed Aug 1 01:18:21 2012 New Revision: 1367836 URL: http://svn.apache.org/viewvc?rev=1367836view=rev Log: Javadoc fixes to a CORS class. Modified: cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java Modified: cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java?rev=1367836r1=1367835r2=1367836view=diff == --- cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java Wed Aug 1 01:18:21 2012 @@ -48,11 +48,11 @@ import org.apache.cxf.message.Message; import org.apache.cxf.service.Service; /** - * An single class that provides both an input and an output filter for CORS, following - * http://www.w3.org/TR/cors/. The input examines the input headers. If the request is valid, it stores the + * A single class that provides both an input and an output filter for CORS, following + * http://www.w3.org/TR/cors/. The input filter examines the input headers. If the request is valid, it stores the * information in the Exchange to allow the response handler to add the appropriate headers to the response. * If you need complex or subtle control of the behavior here (e.g. clearing the prefight cache) you might be - * better off reading the source of this and implementing this inside your service. + * better off reading the source of this class and implementing this inside your service. * * This class will perform preflight processing even if there is a resource method annotated * to handle @OPTIONS, @@ -496,7 +496,7 @@ public class CrossOriginResourceSharingF } /** - * The origin strings to allow. Call {@link #setAllowAllOrigins(boolean)} to enable '*'. + * The origin strings to allow. An empty list allows all origins. * * @param allowedOrigins a list of case-sensitive origin strings. */ @@ -504,6 +504,7 @@ public class CrossOriginResourceSharingF this.allowOrigins = allowedOrigins; } +/** @return the list of allowed origins. */ public ListString getAllowOrigins() { return allowOrigins; }
svn commit: r1227009 - in /cxf/trunk/systests/wsdl_maven/codegen: ./ src/it/ src/it/cxf-4004/ src/it/cxf-4004/src/ src/it/cxf-4004/src/main/ src/it/cxf-4004/src/main/resources/ src/it/cxf-4004/src/mai
Author: bimargulies Date: Wed Jan 4 00:58:25 2012 New Revision: 1227009 URL: http://svn.apache.org/viewvc?rev=1227009view=rev Log: Set up the maven-invoker-plugin to run codegen tests. Added: cxf/trunk/systests/wsdl_maven/codegen/src/it/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/pom.xml (with props) cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/main/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/main/resources/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/main/resources/wsdl/ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/main/resources/wsdl/CustomerService.wsdl (with props) cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/src/main/resources/wsdl/binding.xml (with props) cxf/trunk/systests/wsdl_maven/codegen/src/it/it-parent/ cxf/trunk/systests/wsdl_maven/codegen/src/it/it-parent/pom.xml (with props) cxf/trunk/systests/wsdl_maven/codegen/src/it/settings.xml (with props) Modified: cxf/trunk/systests/wsdl_maven/codegen/pom.xml Modified: cxf/trunk/systests/wsdl_maven/codegen/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/wsdl_maven/codegen/pom.xml?rev=1227009r1=1227008r2=1227009view=diff == --- cxf/trunk/systests/wsdl_maven/codegen/pom.xml (original) +++ cxf/trunk/systests/wsdl_maven/codegen/pom.xml Wed Jan 4 00:58:25 2012 @@ -78,6 +78,32 @@ /execution /executions /plugin + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-invoker-plugin/artifactId + version1.5/version +configuration + projectsDirectorysrc/it/projectsDirectory + cloneProjectsTo${project.build.directory}/it/cloneProjectsTo + preBuildHookScriptsetup/preBuildHookScript + postBuildHookScriptverify/postBuildHookScript + localRepositoryPath${project.build.directory}/local-repo/localRepositoryPath + settingsFilesrc/it/settings.xml/settingsFile + pomIncludes +pomInclude*/pom.xml/pomInclude + /pomIncludes +/configuration +executions + execution +idintegration-test/id +goals + goalinstall/goal + goalintegration-test/goal + goalverify/goal +/goals + /execution +/executions + /plugin /plugins /build Added: cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/pom.xml?rev=1227009view=auto == --- cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/pom.xml (added) +++ cxf/trunk/systests/wsdl_maven/codegen/src/it/cxf-4004/pom.xml Wed Jan 4 00:58:25 2012 @@ -0,0 +1,87 @@ +?xml version=1.0 encoding=UTF-8? +!-- + 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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +parent + groupIdorg.apache.cxf/groupId + artifactIdcodegen-it-parent/artifactId + version1-SNAPSHOT/version + relativePath../it-parent/pom.xml/relativePath +/parent +artifactIdcxf-4004-it/artifactId + +build + plugins + plugin + groupIdorg.apache.cxf/groupId + artifactIdcxf-codegen-plugin/artifactId + dependencies + dependency + groupIdorg.apache.cxf.xjcplugins/groupId + artifactIdcxf-xjc-ts/artifactId + version2.4.0/version + /dependency + dependency + groupIdnet.java.dev.jaxb2-commons/groupId + artifactIdjaxb-fluent-api/artifactId
svn commit: r1222231 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors: CrossOriginResourceSharing.java CrossOriginResourceSharingFilter.java
Author: bimargulies Date: Thu Dec 22 13:52:43 2011 New Revision: 131 URL: http://svn.apache.org/viewvc?rev=131view=rev Log: CXF-3998: add an additional flag (and annotation param) to make it easier to deal with browser confusion on Access-Control-Allow-Headers. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java?rev=131r1=130r2=131view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java Thu Dec 22 13:52:43 2011 @@ -59,6 +59,12 @@ public @interface CrossOriginResourceSha * in an actual request. */ String[] allowHeaders() default { }; + +/** + * Act as if whatever headers are listed in the Access-Control-Request-Headers are + * listed in allowHeaders. Convenient for dealing with Browser bugs. + */ +boolean allowAnyHeaders() default false; /** * If true, this resource will return * preAccess-Control-Allow-Credentials: true/pre Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=131r1=130r2=131view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Thu Dec 22 13:52:43 2011 @@ -84,6 +84,7 @@ public class CrossOriginResourceSharingF private Integer maxAge; private Integer preflightFailStatus = 200; private boolean defaultOptionsMethodsHandlePreflight; +private boolean allowAnyHeaders; private CrossOriginResourceSharing getAnnotation(OperationResourceInfo ori) { @@ -209,9 +210,9 @@ public class CrossOriginResourceSharingF CrossOriginResourceSharing ann = method.getAnnotation(CrossOriginResourceSharing.class); ann = ann == null ? optionAnn : ann; -if (ann == null) { -return createPreflightResponse(m, false); -} +/* We aren't required to have any annotation at all. If no annotation, + * the properties of this filter make all the decisions. + */ // 5.2.2 must be on the list or we must be matching *. boolean effectiveAllowAllOrigins = effectiveAllowAllOrigins(ann); @@ -226,7 +227,7 @@ public class CrossOriginResourceSharingF // This was indirectly enforced by getCorsMethod() // 5.2.6 reject if the header is not listed. -if (!effectiveAllowHeaders(ann).containsAll(requestHeaders)) { +if (!effectiveAllowAnyHeaders(ann) !effectiveAllowHeaders(ann).containsAll(requestHeaders)) { return createPreflightResponse(m, false); } @@ -394,6 +395,14 @@ public class CrossOriginResourceSharingF } } +private boolean effectiveAllowAnyHeaders(CrossOriginResourceSharing ann) { +if (ann != null) { +return ann.allowAnyHeaders(); +} else { +return allowAnyHeaders; +} +} + private ListString effectiveAllowHeaders(CrossOriginResourceSharing ann) { if (ann != null) { if (ann.allowHeaders() == null) { @@ -570,7 +579,7 @@ public class CrossOriginResourceSharingF /** * Preflight error response status, default is 200. * - * @param status + * @param status HTTP status code. */ public void setPreflightErrorStatus(Integer status) { this.preflightFailStatus = status; @@ -593,4 +602,19 @@ public class CrossOriginResourceSharingF this.defaultOptionsMethodsHandlePreflight = defaultOptionsMethodsHandlePreflight; } +public boolean isAllowAnyHeaders() { +return allowAnyHeaders; +} + +/** + * Completely relax the Access-Control-Request-Headers check. + * Any headers in this header will be permitted. Handy for + * dealing with Chrome / Firefox / Safari incompatibilities. + * @param allowAnyHeader whether to allow any header. If ttfalse/tt, + * respect the allowHeaders property. + */ +public void setAllowAnyHeaders
svn commit: r1221777 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart: Attachment.java AttachmentBuilder.java
Author: bimargulies Date: Wed Dec 21 15:54:26 2011 New Revision: 1221777 URL: http://svn.apache.org/viewvc?rev=1221777view=rev Log: CXF-3988: First attempt at a builder/fluid pattern for making attachments. Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/AttachmentBuilder.java (with props) Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java?rev=1221777r1=1221776r2=1221777view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java Wed Dec 21 15:54:26 2011 @@ -33,6 +33,14 @@ import javax.ws.rs.ext.Providers; import org.apache.cxf.jaxrs.impl.MetadataMap; +/** + * This class represents an attachment; generally a multipart part. + * Some constructors in here are intended only for + * internal use in CXF, others are suitable or preparing + * attachments to pass to the {@link org.apache.cxf.jaxrs.client.WebClient} API. + * See the {@link AttachmentBuilder} for a convenient + * way to create attachments for use with {@link org.apache.cxf.jaxrs.client.WebClient}. + */ public class Attachment { private DataHandler handler; @@ -86,6 +94,12 @@ public class Attachment { headers.putSingle(Content-Type, application/octet-stream); } +Attachment(MultivaluedMapString, String headers, DataHandler handler, Object object) { +this.headers = headers; +this.handler = handler; +this.object = object; +} + public ContentDisposition getContentDisposition() { String header = getHeader(Content-Disposition); Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/AttachmentBuilder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/AttachmentBuilder.java?rev=1221777view=auto == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/AttachmentBuilder.java (added) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/AttachmentBuilder.java Wed Dec 21 15:54:26 2011 @@ -0,0 +1,93 @@ +/** + * 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.jaxrs.ext.multipart; + +import javax.activation.DataHandler; +import javax.ws.rs.core.MultivaluedMap; + +import org.apache.cxf.jaxrs.impl.MetadataMap; + +/** + * Fluid builder class for {@link Attachment} objects. + */ +public class AttachmentBuilder { +private MultivaluedMapString, String headers = +new MetadataMapString, String(false, true); +private Object object; +private DataHandler dataHandler; +private ContentDisposition contentDisposition; + +public AttachmentBuilder() { +// +} + +public AttachmentBuilder id(String id) { +headers.putSingle(Content-Id, id); +return this; + +} + +public AttachmentBuilder mediaType(String mediaType) { +headers.putSingle(Content-Type, mediaType); +return this; +} + +public AttachmentBuilder object(Object theObject) { +this.object = theObject; +return this; +} + +public AttachmentBuilder dataHandler(DataHandler newDataHandler) { +this.dataHandler = newDataHandler; +return this; +} + + +public AttachmentBuilder header(String key, String value) { +headers.putSingle(key, value); +return this; +} + +/** + * Set all of the headers. This will overwrite any content ID, + * media type, ContentDisposition, or other header set by previous calls. + * @param allHeaders + * @return + */ +public
svn commit: r1222009 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/
Author: bimargulies Date: Thu Dec 22 02:38:56 2011 New Revision: 1222009 URL: http://svn.apache.org/viewvc?rev=1222009view=rev Log: CXF-3995: fall back to class-level annotations lacking method-level annotations. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=1222009r1=1222008r2=1222009view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Thu Dec 22 02:38:56 2011 @@ -96,7 +96,18 @@ public class CrossOriginResourceSharingF public Response handleRequest(Message m, ClassResourceInfo resourceClass) { OperationResourceInfo opResInfo = m.getExchange().get(OperationResourceInfo.class); +/* + * If there is an actual method annotated with @OPTIONS, this is the annotation (if any) from it. + * The lookup falls back to it. + */ CrossOriginResourceSharing annotation = getAnnotation(opResInfo); +/* + * If we don't have an annotation on the target method or an @OPTION method, perhaps + * we've got one on the class? + */ +if (annotation == null) { +annotation = resourceClass.getServiceClass().getAnnotation(CrossOriginResourceSharing.class); +} if (OPTIONS.equals(m.get(Message.HTTP_REQUEST_METHOD))) { @@ -196,7 +207,8 @@ public class CrossOriginResourceSharingF return null; } CrossOriginResourceSharing ann = method.getAnnotation(CrossOriginResourceSharing.class); -ann = ann == null ? optionAnn : ann; +ann = ann == null ? optionAnn : ann; + if (ann == null) { return createPreflightResponse(m, false); } Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java?rev=1222009r1=1222008r2=1222009view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java Thu Dec 22 02:38:56 2011 @@ -23,6 +23,7 @@ import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.OPTIONS; +import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; @@ -55,6 +56,14 @@ public class AnnotatedCorsServer { public String simpleGet(@PathParam(echo) String echo) { return echo; } + +@POST +@Produces(application/json) +@Consumes(application/json) +@Path(/unannotatedPost) +public Response postSomething() { +return Response.ok().build(); +} @DELETE @Path(/delete) Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java?rev=1222009r1=1222008r2=1222009view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java Thu Dec 22 02:38:56 2011 @@ -151,6 +151,31 @@ public class CrossOriginSimpleTest exten } @Test +public void preflightPostClassAnnotation() throws ClientProtocolException, IOException { +HttpClient httpclient = new DefaultHttpClient(); +HttpOptions httpoptions = new HttpOptions(http://localhost:; + PORT + /antest/unannotatedPost); +httpoptions.addHeader(Origin, http://in.org;); +// nonsimple header +httpoptions.addHeader(Content-Type, application/json); +httpoptions.addHeader(CorsHeaderConstants.HEADER_AC_REQUEST_METHOD, POST); +httpoptions.addHeader(CorsHeaderConstants.HEADER_AC_REQUEST_HEADERS, X-custom-1); +HttpResponse response
svn commit: r1222010 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java
Author: bimargulies Date: Thu Dec 22 02:39:06 2011 New Revision: 1222010 URL: http://svn.apache.org/viewvc?rev=1222010view=rev Log: Format cleanup. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=1222010r1=1222009r2=1222010view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Thu Dec 22 02:39:06 2011 @@ -317,10 +317,7 @@ public class CrossOriginResourceSharingF private void commonRequestProcessing(Message m, CrossOriginResourceSharing ann, String origin) { m.getExchange().put(CorsHeaderConstants.HEADER_ORIGIN, origin); - m.getExchange().put(CorsHeaderConstants.HEADER_AC_ALLOW_CREDENTIALS, effectiveAllowCredentials(ann)); - - } public Response handleResponse(Message m, OperationResourceInfo ori, Response response) {
svn commit: r1214600 - /cxf/trunk/maven-plugins/codegen-plugin/pom.xml
Author: bimargulies Date: Thu Dec 15 02:32:34 2011 New Revision: 1214600 URL: http://svn.apache.org/viewvc?rev=1214600view=rev Log: Try again to put the javascript runtime into the codegen. Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/pom.xml?rev=1214600r1=1214599r2=1214600view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/pom.xml (original) +++ cxf/trunk/maven-plugins/codegen-plugin/pom.xml Thu Dec 15 02:32:34 2011 @@ -107,9 +107,14 @@ groupIdorg.apache.cxf/groupId artifactIdcxf-tools-wsdlto-frontend-javascript/artifactId version${project.version}/version + exclusions + exclusion + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-frontend-simple/artifactId + /exclusion + /exclusions /dependency - dependency groupIdorg.springframework/groupId artifactIdspring-core/artifactId
svn commit: r1214599 - in /cxf/trunk/maven-plugins/codegen-plugin: ./ src/main/java/org/apache/cxf/maven_plugin/wsdl2js/
Author: bimargulies Date: Thu Dec 15 02:32:28 2011 New Revision: 1214599 URL: http://svn.apache.org/viewvc?rev=1214599view=rev Log: [CXF-3972] Revert Hide wsdl2js mojo because it introduces a dependency loop. This reverts commit 8de9a1db837c973eea15f5e32cd4682eb19377d3. Added: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java (with props) cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java (with props) cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java (with props) cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlArtifact.java (with props) cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java (with props) Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/pom.xml?rev=1214599r1=1214598r2=1214599view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/pom.xml (original) +++ cxf/trunk/maven-plugins/codegen-plugin/pom.xml Thu Dec 15 02:32:28 2011 @@ -104,6 +104,13 @@ /dependency dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-tools-wsdlto-frontend-javascript/artifactId +version${project.version}/version +/dependency + + +dependency groupIdorg.springframework/groupId artifactIdspring-core/artifactId optionaltrue/optional Added: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java?rev=1214599view=auto == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java (added) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java Thu Dec 15 02:32:28 2011 @@ -0,0 +1,55 @@ +/** + * 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.maven_plugin.wsdl2js; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; + +import org.apache.cxf.tools.common.ToolContext; +import org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript; + +/** + * + */ +public final class ForkOnceWSDL2Javascript { +private ForkOnceWSDL2Javascript() { +//utility +} +public static void main(String args[]) throws Exception { +File file = new File(args[0]); +BufferedReader reader = new BufferedReader(new FileReader(file)); +String line = reader.readLine(); +while (line != null) { +int i = Integer.parseInt(line); +if (i == -1) { +return; +} +String wargs[] = new String[i]; +for (int x = 0; x i; x++) { +wargs[x] = reader.readLine(); +} + +new WSDLToJavaScript(wargs).run(new ToolContext()); + +line = reader.readLine(); +} +} +} Propchange: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java -- svn:eol-style = native Propchange: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java -- svn:mime-type = text/plain Added: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src
svn commit: r1214601 - in /cxf/trunk: maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/ maven-pl
Author: bimargulies Date: Thu Dec 15 02:32:43 2011 New Revision: 1214601 URL: http://svn.apache.org/viewvc?rev=1214601view=rev Log: Much debugging of js mojo. It has even worked a little. Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java cxf/trunk/systests/wsdl_maven/codegen/pom.xml Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1214601r1=1214600r2=1214601view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Thu Dec 15 02:32:43 2011 @@ -138,7 +138,7 @@ public abstract class AbstractCodegenMoh /** * Sets the JVM arguments (i.e. code-Xms128m -Xmx128m/code) if fork is set to codetrue/code. * - * @parameter + * @parameter expression=${cxf.codegen.jvmArgs} * @since 2.4 */ private String additionalJvmArgs; @@ -325,7 +325,7 @@ public abstract class AbstractCodegenMoh outputDirFile.mkdirs(); URI basedir = project.getBasedir().toURI(); URI wsdlURI = getWsdlURI(wsdlOption, basedir); -File doneFile = getDoneFile(basedir, wsdlURI, java); +File doneFile = getDoneFile(basedir, wsdlURI, js); if (!shouldRun(wsdlOption, doneFile, wsdlURI)) { continue; @@ -396,12 +396,12 @@ public abstract class AbstractCodegenMoh protected abstract File getGeneratedSourceRoot(); protected abstract File getGeneratedTestRoot(); - + protected void runForked(SetURI classPath, String mainClassName, String[] args) throws MojoExecutionException { -getLog().info(Running wsdl2java in fork mode...); -getLog().debug(Running wsdl2java in fork mode with args + Arrays.asList(args)); +getLog().info(Running code generation in fork mode...); +getLog().debug(Running code generation in fork mode with args + Arrays.asList(args)); Commandline cmd = new Commandline(); cmd.getShell().setQuotedArgumentsEnabled(false); // for JVM args Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java?rev=1214601r1=1214600r2=1214601view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Thu Dec 15 02:32:43 2011 @@ -60,6 +60,9 @@ public class WSDL2JavaMojo extends Abstr File sourceRoot; /** + * Options that specify WSDLs to process and/or control the processing of wsdls. + * If you have enabled wsdl scanning, these elements attach options to particular wsdls. + * If you have not enabled wsdl scanning, these options call out the wsdls to process. * @parameter */ WsdlOption wsdlOptions[]; Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java?rev=1214601r1=1214600r2=1214601view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java Thu Dec 15 02:32:43 2011 @@ -19,6 +19,7 @@ package org.apache.cxf.maven_plugin.wsdl2js; import java.io.File; +import java.util.Arrays; public class Option { @@ -158,7 +159,7 @@ public class Option { /** * @return Validating the WSDL? */ -public boolean isValidate() { +public Boolean
svn commit: r1214604 - in /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin: AbstractCodegenMoho.java wsdl2java/WSDL2JavaMojo.java wsdl2js/WSDL2JavaScriptMojo.java
Author: bimargulies Date: Thu Dec 15 02:37:12 2011 New Revision: 1214604 URL: http://svn.apache.org/viewvc?rev=1214604view=rev Log: [CXF-3972] sort our marker suffixes. Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1214604r1=1214603r2=1214604view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Thu Dec 15 02:37:12 2011 @@ -316,6 +316,8 @@ public abstract class AbstractCodegenMoh return true; } +protected abstract String getMarkerSuffix(); + protected void forkOnce(SetURI classPath, ListGenericWsdlOption effectiveWsdlOptions) throws MojoExecutionException { ListGenericWsdlOption toDo = new LinkedListGenericWsdlOption(); @@ -325,7 +327,7 @@ public abstract class AbstractCodegenMoh outputDirFile.mkdirs(); URI basedir = project.getBasedir().toURI(); URI wsdlURI = getWsdlURI(wsdlOption, basedir); -File doneFile = getDoneFile(basedir, wsdlURI, js); +File doneFile = getDoneFile(basedir, wsdlURI, getMarkerSuffix()); if (!shouldRun(wsdlOption, doneFile, wsdlURI)) { continue; Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java?rev=1214604r1=1214603r2=1214604view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Thu Dec 15 02:37:12 2011 @@ -288,4 +288,9 @@ public class WSDL2JavaMojo extends Abstr super.execute(); } +@Override +protected String getMarkerSuffix() { +return java; +} + } Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java?rev=1214604r1=1214603r2=1214604view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java Thu Dec 15 02:37:12 2011 @@ -280,4 +280,9 @@ public class WSDL2JavaScriptMojo extends return ForkOnceWSDL2Javascript.class; } +@Override +protected String getMarkerSuffix() { +return js; +} + }
svn commit: r1214605 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
Author: bimargulies Date: Thu Dec 15 02:41:21 2011 New Revision: 1214605 URL: http://svn.apache.org/viewvc?rev=1214605view=rev Log: [CXF-3972] another fix to marker suffixes. Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1214605r1=1214604r2=1214605view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Thu Dec 15 02:41:21 2011 @@ -367,7 +367,7 @@ public abstract class AbstractCodegenMoh } URI basedir = project.getBasedir().toURI(); URI wsdlURI = getWsdlURI(wsdlOption, basedir); -File doneFile = getDoneFile(basedir, wsdlURI, java); +File doneFile = getDoneFile(basedir, wsdlURI, getMarkerSuffix()); try { doneFile.createNewFile(); } catch (Throwable e) { @@ -461,7 +461,7 @@ public abstract class AbstractCodegenMoh getLog().debug(e); throw new MojoExecutionException(e.getMessage(), e); } - + String output = StringUtils.isEmpty(out.getOutput()) ? null : '\n' + out.getOutput().trim(); String cmdLine = CommandLineUtils.toString(cmd.getCommandline());
svn commit: r1213653 - in /cxf/trunk: rt/javascript/src/test/resources/wsdl_javascript/ testutils/ testutils/src/main/resources/wsdl/rt-javascript/
Author: bimargulies Date: Tue Dec 13 11:44:01 2011 New Revision: 1213653 URL: http://svn.apache.org/viewvc?rev=1213653view=rev Log: [CXF-3972] move wsdl codegen to testutils from rt-javascript where it should have been all along. Added: cxf/trunk/testutils/src/main/resources/wsdl/rt-javascript/ cxf/trunk/testutils/src/main/resources/wsdl/rt-javascript/hello_world.wsdl - copied unchanged from r1213545, cxf/trunk/rt/javascript/src/test/resources/wsdl_javascript/hello_world.wsdl cxf/trunk/testutils/src/main/resources/wsdl/rt-javascript/hello_world_any.wsdl - copied unchanged from r1213545, cxf/trunk/rt/javascript/src/test/resources/wsdl_javascript/hello_world_any.wsdl Removed: cxf/trunk/rt/javascript/src/test/resources/wsdl_javascript/hello_world.wsdl cxf/trunk/rt/javascript/src/test/resources/wsdl_javascript/hello_world_any.wsdl Modified: cxf/trunk/testutils/pom.xml Modified: cxf/trunk/testutils/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/pom.xml?rev=1213653r1=1213652r2=1213653view=diff == --- cxf/trunk/testutils/pom.xml (original) +++ cxf/trunk/testutils/pom.xml Tue Dec 13 11:44:01 2011 @@ -160,6 +160,11 @@ fork${cxf.codegenplugin.forkmode}/fork sourceRoottarget/generated/src/main/java/sourceRoot wsdlRootsrc/main/resources/wsdl/wsdlRoot + includes + include*.wsdl/include + includert-javascript/*.wsdl/include + /includes + wsdlOptions wsdlOption wsdltarget/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl/wsdl
svn commit: r1213942 - in /cxf/trunk/rt/javascript: javascript-rt/ javascript-rt/src/ javascript-rt/src/test/resources/wsdl_javascript/ javascript-tests/ pom.xml src/
Author: bimargulies Date: Tue Dec 13 21:52:01 2011 New Revision: 1213942 URL: http://svn.apache.org/viewvc?rev=1213942view=rev Log: [CXF-2972] prepare to split rt-javascript to break a dependency loop. Added: cxf/trunk/rt/javascript/javascript-rt/ cxf/trunk/rt/javascript/javascript-rt/src/ - copied from r1213545, cxf/trunk/rt/javascript/src/ cxf/trunk/rt/javascript/javascript-tests/ Removed: cxf/trunk/rt/javascript/javascript-rt/src/test/resources/wsdl_javascript/ cxf/trunk/rt/javascript/src/ Modified: cxf/trunk/rt/javascript/pom.xml Modified: cxf/trunk/rt/javascript/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/pom.xml?rev=1213942r1=1213941r2=1213942view=diff == --- cxf/trunk/rt/javascript/pom.xml (original) +++ cxf/trunk/rt/javascript/pom.xml Tue Dec 13 21:52:01 2011 @@ -18,151 +18,18 @@ -- project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion -artifactIdcxf-rt-javascript/artifactId -packagingjar/packaging -nameApache CXF Runtime JavaScript Client Generator/name -descriptionApache CXF Runtime JavaScript Client Generator/description +artifactIdcxf-runtime-javascript/artifactId +nameApache CXF Runtime JavaScript Client Generator Projects/name +descriptionApache CXF Runtime JavaScript Client Generator Projects/description urlhttp://cxf.apache.org//url - - +packagingpom/packaging parent groupIdorg.apache.cxf/groupId artifactIdcxf-parent/artifactId version2.5.1-SNAPSHOT/version relativePath../../parent/pom.xml/relativePath /parent - -dependencies -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-api/artifactId -version${project.version}/version -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-core/artifactId -version${project.version}/version -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-frontend-simple/artifactId -version${project.version}/version -/dependency - -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-transports-local/artifactId -version${project.version}/version -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-transports-http/artifactId -version${project.version}/version -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-transports-http-jetty/artifactId -version${project.version}/version -scopetest/scope -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-frontend-jaxws/artifactId -version${project.version}/version -scopetest/scope -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-testutils/artifactId -version${project.version}/version -scopetest/scope -/dependency -dependency -groupIdjunit/groupId -artifactIdjunit/artifactId -scopetest/scope -/dependency -dependency -groupIdorg.springframework/groupId -artifactId${cxf.spring.mock}/artifactId -version${cxf.spring.version}/version -scopetest/scope -/dependency -dependency -groupIdxerces/groupId -artifactIdxercesImpl/artifactId -scopetest/scope -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-databinding-aegis/artifactId -version${project.version}/version -scopetest/scope -/dependency - -dependency - groupIdrhino/groupId - artifactIdjs/artifactId - version${cxf.rhino.version}/version - scopetest/scope -/dependency -dependency -groupIdorg.eclipse.jetty/groupId -artifactIdjetty-server/artifactId -version${cxf.jetty.version}/version - scopetest/scope -/dependency -dependency -groupIdorg.slf4j/groupId -artifactIdslf4j-jdk14/artifactId -scopetest/scope -/dependency -dependency -groupIdorg.slf4j/groupId -artifactIdslf4j-api/artifactId -scopetest/scope -/dependency -/dependencies - -build -plugins -plugin -groupIdorg.apache.cxf/groupId
svn commit: r1213952 - in /cxf/trunk/rt/javascript: javascript-rt/src/test/ javascript-tests/pom.xml javascript-tests/src/ javascript-tests/src/test/ pom.xml
Author: bimargulies Date: Tue Dec 13 21:58:55 2011 New Revision: 1213952 URL: http://svn.apache.org/viewvc?rev=1213952view=rev Log: [CXF-3972] move tests to new project. Due to svn idiocy I'm not 100% sure that this builds, but I'll fix it really quick if not. Added: cxf/trunk/rt/javascript/javascript-tests/pom.xml (with props) cxf/trunk/rt/javascript/javascript-tests/src/ cxf/trunk/rt/javascript/javascript-tests/src/test/ - copied from r1213942, cxf/trunk/rt/javascript/javascript-rt/src/test/ Removed: cxf/trunk/rt/javascript/javascript-rt/src/test/ Modified: cxf/trunk/rt/javascript/pom.xml Added: cxf/trunk/rt/javascript/javascript-tests/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/pom.xml?rev=1213952view=auto == --- cxf/trunk/rt/javascript/javascript-tests/pom.xml (added) +++ cxf/trunk/rt/javascript/javascript-tests/pom.xml Tue Dec 13 21:58:55 2011 @@ -0,0 +1,104 @@ +!-- + 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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +artifactIdcxf-rt-javascript-tests/artifactId +packagingjar/packaging +nameApache CXF Runtime JavaScript Client Generator Tests/name +descriptionApache CXF Runtime JavaScript Client Generator Tests/description +urlhttp://cxf.apache.org//url + + +parent +groupIdorg.apache.cxf/groupId +artifactIdcxf-runtime-javascript/artifactId +version2.5.1-SNAPSHOT/version +/parent + +dependencies +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-javascript/artifactId +version${project.version}/version +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-transports-http-jetty/artifactId +version${project.version}/version +scopetest/scope +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-frontend-jaxws/artifactId +version${project.version}/version +scopetest/scope +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-testutils/artifactId +version${project.version}/version +scopetest/scope +/dependency +dependency +groupIdjunit/groupId +artifactIdjunit/artifactId +scopetest/scope +/dependency +dependency +groupIdorg.springframework/groupId +artifactId${cxf.spring.mock}/artifactId +version${cxf.spring.version}/version +scopetest/scope +/dependency +dependency +groupIdxerces/groupId +artifactIdxercesImpl/artifactId +scopetest/scope +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-databinding-aegis/artifactId +version${project.version}/version +scopetest/scope +/dependency + +dependency + groupIdrhino/groupId + artifactIdjs/artifactId + version${cxf.rhino.version}/version + scopetest/scope +/dependency +dependency +groupIdorg.eclipse.jetty/groupId +artifactIdjetty-server/artifactId +version${cxf.jetty.version}/version + scopetest/scope +/dependency +dependency +groupIdorg.slf4j/groupId +artifactIdslf4j-jdk14/artifactId +scopetest/scope +/dependency +dependency +groupIdorg.slf4j/groupId +artifactIdslf4j-api/artifactId +scopetest/scope +/dependency +/dependencies +/project Propchange: cxf/trunk/rt/javascript/javascript-tests/pom.xml -- svn:eol-style = native Propchange: cxf/trunk/rt
svn commit: r1213955 - /cxf/trunk/rt/javascript/javascript-rt/pom.xml
Author: bimargulies Date: Tue Dec 13 22:00:17 2011 New Revision: 1213955 URL: http://svn.apache.org/viewvc?rev=1213955view=rev Log: [CXF-3972] forgot an svn add. Added: cxf/trunk/rt/javascript/javascript-rt/pom.xml (with props) Added: cxf/trunk/rt/javascript/javascript-rt/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-rt/pom.xml?rev=1213955view=auto == --- cxf/trunk/rt/javascript/javascript-rt/pom.xml (added) +++ cxf/trunk/rt/javascript/javascript-rt/pom.xml Tue Dec 13 22:00:17 2011 @@ -0,0 +1,62 @@ +!-- + 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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +artifactIdcxf-rt-javascript/artifactId +packagingjar/packaging +nameApache CXF Runtime JavaScript Client Generator/name +descriptionApache CXF Runtime JavaScript Client Generator/description +urlhttp://cxf.apache.org//url + + +parent +groupIdorg.apache.cxf/groupId +artifactIdcxf-runtime-javascript/artifactId +version2.5.1-SNAPSHOT/version +/parent + +dependencies +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-api/artifactId +version${project.version}/version +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-core/artifactId +version${project.version}/version +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-frontend-simple/artifactId +version${project.version}/version +/dependency + +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-transports-local/artifactId +version${project.version}/version +/dependency +dependency +groupIdorg.apache.cxf/groupId +artifactIdcxf-rt-transports-http/artifactId +version${project.version}/version +/dependency +/dependencies +/project Propchange: cxf/trunk/rt/javascript/javascript-rt/pom.xml -- svn:eol-style = native Propchange: cxf/trunk/rt/javascript/javascript-rt/pom.xml -- svn:mime-type = text/plain
svn commit: r1213965 - in /cxf/trunk/rt/javascript: javascript-rt/pom.xml javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java javascript-tests/pom.xml
Author: bimargulies Date: Tue Dec 13 22:37:49 2011 New Revision: 1213965 URL: http://svn.apache.org/viewvc?rev=1213965view=rev Log: [CXF-3972] further trimming of dependency tree in the hopes of getting out of the cycle business. Modified: cxf/trunk/rt/javascript/javascript-rt/pom.xml cxf/trunk/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java cxf/trunk/rt/javascript/javascript-tests/pom.xml Modified: cxf/trunk/rt/javascript/javascript-rt/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-rt/pom.xml?rev=1213965r1=1213964r2=1213965view=diff == --- cxf/trunk/rt/javascript/javascript-rt/pom.xml (original) +++ cxf/trunk/rt/javascript/javascript-rt/pom.xml Tue Dec 13 22:37:49 2011 @@ -42,21 +42,10 @@ artifactIdcxf-rt-core/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-frontend-simple/artifactId + dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-bindings-soap/artifactId version${project.version}/version -/dependency - -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-transports-local/artifactId -version${project.version}/version -/dependency -dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-rt-transports-http/artifactId -version${project.version}/version -/dependency + /dependency /dependencies /project Modified: cxf/trunk/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java?rev=1213965r1=1213964r2=1213965view=diff == --- cxf/trunk/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java (original) +++ cxf/trunk/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java Tue Dec 13 22:37:49 2011 @@ -29,6 +29,7 @@ import java.util.logging.Logger; import javax.xml.namespace.QName; + import org.apache.cxf.binding.soap.SoapBindingConstants; import org.apache.cxf.binding.soap.SoapBindingFactory; import org.apache.cxf.binding.soap.SoapVersion; @@ -53,7 +54,6 @@ import org.apache.cxf.service.model.Mess import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.service.model.OperationInfo; import org.apache.cxf.service.model.ServiceInfo; -import org.apache.cxf.transport.local.LocalTransportFactory; import org.apache.ws.commons.schema.XmlSchema; import org.apache.ws.commons.schema.XmlSchemaAny; import org.apache.ws.commons.schema.XmlSchemaComplexType; @@ -866,7 +866,8 @@ public class ServiceJavascriptBuilder ex if (WSDLConstants.NS_SOAP11_HTTP_TRANSPORT.equals(sbi.getTransportURI()) || WSDLConstants.NS_SOAP12_HTTP_BINDING.equals(sbi.getTransportURI()) // we may want this for testing. -|| LocalTransportFactory.TRANSPORT_ID.equals(sbi.getTransportURI())) { +// we do NOT want a dependency on the local transport. +|| http://cxf.apache.org/transports/local.equals(sbi.getTransportURI())) { soapBindingInfo = sbi; break; } Modified: cxf/trunk/rt/javascript/javascript-tests/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/pom.xml?rev=1213965r1=1213964r2=1213965view=diff == --- cxf/trunk/rt/javascript/javascript-tests/pom.xml (original) +++ cxf/trunk/rt/javascript/javascript-tests/pom.xml Tue Dec 13 22:37:49 2011 @@ -100,5 +100,29 @@ artifactIdslf4j-api/artifactId scopetest/scope /dependency + dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-bindings-soap/artifactId +version${project.version}/version + scopetest/scope + /dependency + dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-transports-http/artifactId + version${project.version}/version + scopetest/scope + /dependency + dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-transports-local/artifactId + version${project.version}/version + scopetest/scope + /dependency + dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-frontend-simple/artifactId
svn commit: r1213542 - in /cxf/trunk/maven-plugins/codegen-plugin: ./ src/main/java/org/apache/cxf/maven_plugin/wsdl2js/
Author: bimargulies Date: Tue Dec 13 02:36:13 2011 New Revision: 1213542 URL: http://svn.apache.org/viewvc?rev=1213542view=rev Log: Hide wsdl2js mojo because it introduces a dependency loop. Removed: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ForkOnceWSDL2Javascript.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/Option.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlArtifact.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/pom.xml?rev=1213542r1=1213541r2=1213542view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/pom.xml (original) +++ cxf/trunk/maven-plugins/codegen-plugin/pom.xml Tue Dec 13 02:36:13 2011 @@ -104,13 +104,6 @@ /dependency dependency -groupIdorg.apache.cxf/groupId -artifactIdcxf-tools-wsdlto-frontend-javascript/artifactId -version${project.version}/version -/dependency - - -dependency groupIdorg.springframework/groupId artifactIdspring-core/artifactId optionaltrue/optional
svn commit: r1213015 - in /cxf/trunk: parent/pom.xml src/site/site.xml
Author: bimargulies Date: Sun Dec 11 15:36:10 2011 New Revision: 1213015 URL: http://svn.apache.org/viewvc?rev=1213015view=rev Log: Stop trying to report surefire and checkstyle. Since we fail the build for test failures and checkstyle violations, it makes the site build wildly slower to no purpose at all. Modified: cxf/trunk/parent/pom.xml cxf/trunk/src/site/site.xml Modified: cxf/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1213015r1=1213014r2=1213015view=diff == --- cxf/trunk/parent/pom.xml (original) +++ cxf/trunk/parent/pom.xml Sun Dec 11 15:36:10 2011 @@ -1411,41 +1411,6 @@ /dependencies /dependencyManagement -reporting -plugins -plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-project-info-reports-plugin/artifactId -version2.4/version -/plugin -plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-surefire-report-plugin/artifactId -version2.9/version -/plugin -plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-javadoc-plugin/artifactId -version2.8/version -/plugin -plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-checkstyle-plugin/artifactId -version2.8/version -configuration -encodingUTF-8/encoding - configLocationcxf-checkstyle${cxf.checkstyle.extension}.xml/configLocation -consoleOutputtrue/consoleOutput -failsOnErrortrue/failsOnError -linkXReffalse/linkXRef - suppressionsLocationcxf-checkstyle-suppressions.xml/suppressionsLocation -sourceDirectory${basedir}/src/sourceDirectory -excludes**/archetype-resources/**/*.java/excludes -/configuration -/plugin -/plugins -/reporting - profiles profile idjdk15/id Modified: cxf/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/cxf/trunk/src/site/site.xml?rev=1213015r1=1213014r2=1213015view=diff == --- cxf/trunk/src/site/site.xml (original) +++ cxf/trunk/src/site/site.xml Sun Dec 11 15:36:10 2011 @@ -35,5 +35,10 @@ under the License. !-- perhaps needs to point at just this part of the site -- item name=Apache CXF href=http://cxf.apache.org/index.html; / /breadcrumbs +menu name=CXF + item name=Home href=index.html / +/menu +menu ref=modules inherit=bottom / +menu ref=reports inherit=bottom / /body /project \ No newline at end of file
svn commit: r1213024 - in /cxf/trunk/maven-plugins: archetypes/pom.xml codegen-plugin/pom.xml corba/pom.xml java2ws-plugin/pom.xml pom.xml wadl2java-plugin/pom.xml wsdl-validator-plugin/pom.xml
Author: bimargulies Date: Sun Dec 11 17:17:44 2011 New Revision: 1213024 URL: http://svn.apache.org/viewvc?rev=1213024view=rev Log: Make the parent structure conventional in the maven plugins. Modified: cxf/trunk/maven-plugins/archetypes/pom.xml cxf/trunk/maven-plugins/codegen-plugin/pom.xml cxf/trunk/maven-plugins/corba/pom.xml cxf/trunk/maven-plugins/java2ws-plugin/pom.xml cxf/trunk/maven-plugins/pom.xml cxf/trunk/maven-plugins/wadl2java-plugin/pom.xml cxf/trunk/maven-plugins/wsdl-validator-plugin/pom.xml Modified: cxf/trunk/maven-plugins/archetypes/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/pom.xml?rev=1213024r1=1213023r2=1213024view=diff == --- cxf/trunk/maven-plugins/archetypes/pom.xml (original) +++ cxf/trunk/maven-plugins/archetypes/pom.xml Sun Dec 11 17:17:44 2011 @@ -28,10 +28,9 @@ urlhttp://cxf.apache.org/url parent -groupIdorg.apache.cxf/groupId -artifactIdcxf/artifactId -version2.5.1-SNAPSHOT/version -relativePath../../pom.xml/relativePath + groupIdorg.apache.cxf/groupId + artifactIdcxf-maven-plugins/artifactId + version2.5.1-SNAPSHOT/version /parent modules Modified: cxf/trunk/maven-plugins/codegen-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/pom.xml?rev=1213024r1=1213023r2=1213024view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/pom.xml (original) +++ cxf/trunk/maven-plugins/codegen-plugin/pom.xml Sun Dec 11 17:17:44 2011 @@ -27,12 +27,10 @@ descriptionApache CXF Code Generation Maven2 Plugins/description urlhttp://cxf.apache.org/url - parent -groupIdorg.apache.cxf/groupId -artifactIdcxf-parent/artifactId -version2.5.1-SNAPSHOT/version -relativePath../../parent/pom.xml/relativePath + groupIdorg.apache.cxf/groupId + artifactIdcxf-maven-plugins/artifactId + version2.5.1-SNAPSHOT/version /parent dependencies Modified: cxf/trunk/maven-plugins/corba/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/corba/pom.xml?rev=1213024r1=1213023r2=1213024view=diff == --- cxf/trunk/maven-plugins/corba/pom.xml (original) +++ cxf/trunk/maven-plugins/corba/pom.xml Sun Dec 11 17:17:44 2011 @@ -28,10 +28,9 @@ urlhttp://cxf.apache.org/url parent -groupIdorg.apache.cxf/groupId -artifactIdcxf-parent/artifactId -version2.5.1-SNAPSHOT/version -relativePath../../parent/pom.xml/relativePath + groupIdorg.apache.cxf/groupId + artifactIdcxf-maven-plugins/artifactId + version2.5.1-SNAPSHOT/version /parent dependencies Modified: cxf/trunk/maven-plugins/java2ws-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml?rev=1213024r1=1213023r2=1213024view=diff == --- cxf/trunk/maven-plugins/java2ws-plugin/pom.xml (original) +++ cxf/trunk/maven-plugins/java2ws-plugin/pom.xml Sun Dec 11 17:17:44 2011 @@ -29,10 +29,9 @@ parent -groupIdorg.apache.cxf/groupId -artifactIdcxf-parent/artifactId -version2.5.1-SNAPSHOT/version -relativePath../../parent/pom.xml/relativePath + groupIdorg.apache.cxf/groupId + artifactIdcxf-maven-plugins/artifactId + version2.5.1-SNAPSHOT/version /parent dependencies Modified: cxf/trunk/maven-plugins/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/pom.xml?rev=1213024r1=1213023r2=1213024view=diff == --- cxf/trunk/maven-plugins/pom.xml (original) +++ cxf/trunk/maven-plugins/pom.xml Sun Dec 11 17:17:44 2011 @@ -28,8 +28,9 @@ parent groupIdorg.apache.cxf/groupId -artifactIdcxf/artifactId +artifactIdcxf-parent/artifactId version2.5.1-SNAPSHOT/version +relativePath../parent/relativePath /parent modules @@ -41,4 +42,25 @@ modulearchetypes/module /modules +build + pluginManagement + plugins + plugin + groupIdorg.apache.maven.plugins/groupId + artifactIdmaven-plugin-plugin/artifactId + version2.9/version + /plugin + /plugins + /pluginManagement +/build + + reporting +plugins + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-plugin-plugin/artifactId +version2.9/version + /plugin +/plugins + /reporting /project Modified: cxf/trunk/maven-plugins/wadl2java-plugin/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/wadl2java-plugin/pom.xml?rev
svn commit: r1211672 - in /cxf/trunk: pom.xml src/ src/site/ src/site/site.xml
Author: bimargulies Date: Wed Dec 7 22:16:31 2011 New Revision: 1211672 URL: http://svn.apache.org/viewvc?rev=1211672view=rev Log: CXF-3963 set up maven-site-plugin 3.0. Don't work yet. Added: cxf/trunk/src/ cxf/trunk/src/site/ cxf/trunk/src/site/site.xml (with props) Modified: cxf/trunk/pom.xml Modified: cxf/trunk/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/pom.xml?rev=1211672r1=1211671r2=1211672view=diff == --- cxf/trunk/pom.xml (original) +++ cxf/trunk/pom.xml Wed Dec 7 22:16:31 2011 @@ -49,6 +49,7 @@ cxf.xjc-utils.version2.4.0/cxf.xjc-utils.version cxf.jdk.version1.6/cxf.jdk.version project.build.sourceEncodingUTF-8/project.build.sourceEncoding + site.deploy.urlscp://people.apache.org/www/cxf.apache.org/maven-site/site.deploy.url /properties distributionManagement @@ -64,8 +65,8 @@ !--uniqueVersionfalse/uniqueVersion-- /snapshotRepository site -idapache.cxf.site/id - urlscpexe://people.apache.org/www/cxf.apache.org/cxf/mvn_site/url + idapache.cxf.site/id + url${site.deploy.url}/url /site /distributionManagement repositories @@ -442,6 +443,32 @@ jdk.version1.5/jdk.version /properties /profile +profile + idmaven-3-site/id + activation +file + !-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -- + exists${basedir}/exists +/file + /activation + build +plugins + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-site-plugin/artifactId +executions + execution +idattach-descriptor/id +goals + goalattach-descriptor/goal +/goals + /execution +/executions + /plugin +/plugins + /build +/profile + /profiles @@ -661,6 +688,25 @@ /excludes /configuration /plugin +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-site-plugin/artifactId +version3.0/version +configuration +chmodtrue/chmod + dependencyDetailsEnabledfalse/dependencyDetailsEnabled + dependencyLocationsEnabledfalse/dependencyLocationsEnabled + stagingRepositoryIdapache.cxf.site/stagingRepositoryId + stagingSiteURLscp://people.apache.org/www/cxf.apache.org/maven-site-${project.version}/stagingSiteURL +/configuration + dependencies + dependency + groupIdorg.apache.maven.wagon/groupId + artifactIdwagon-ssh/artifactId + version2.1/version + /dependency + /dependencies +/plugin /plugins /pluginManagement /build @@ -668,16 +714,31 @@ reporting plugins plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-project-info-reports-plugin/artifactId -version2.4/version +artifactIdmaven-site-plugin/artifactId +version3.0/version +configuration +dependencyDetailsEnabledfalse/dependencyDetailsEnabled + dependencyLocationsEnabledfalse/dependencyLocationsEnabled +/configuration /plugin plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-javadoc-plugin/artifactId -version2.8/version +artifactIdmaven-project-info-reports-plugin/artifactId +version2.4/version +configuration + dependencyLocationsEnabledfalse/dependencyLocationsEnabled +/configuration +reportSets +reportSet +reports +reportsummary/report +reportindex/report +reportdependencies/report +reportissue-tracking/report +reportscm/report +/reports +/reportSet +/reportSets /plugin /plugins /reporting - /project Added: cxf/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/cxf/trunk/src/site/site.xml?rev=1211672view=auto == --- cxf
svn commit: r1211729 - in /cxf/trunk: maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/W
Author: bimargulies Date: Thu Dec 8 01:26:06 2011 New Revision: 1211729 URL: http://svn.apache.org/viewvc?rev=1211729view=rev Log: CXF-3964: Diagnose missing artifact wsdls, and compensate for apparent resolver bug. Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java cxf/trunk/parent/pom.xml Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=1211729r1=1211728r2=1211729view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Thu Dec 8 01:26:06 2011 @@ -375,7 +375,13 @@ public class WSDL2JavaMojo extends Abstr Artifact.SCOPE_COMPILE, wsdlA.getType()); wsdlArtifact = resolveRemoteWsdlArtifact(remoteRepos, wsdlArtifact); if (wsdlArtifact != null) { -String path = wsdlArtifact.getFile().getAbsolutePath(); +File supposedFile = wsdlArtifact.getFile(); +if (!supposedFile.exists() || !supposedFile.isFile()) { +getLog().info(Apparent Maven bug: wsdl artifact 'resolved' to ++ supposedFile.getAbsolutePath() + for + wsdlArtifact.toString()); +continue; +} +String path = supposedFile.getAbsolutePath(); getLog().info(Resolved WSDL artifact to file + path); wsdlOption.setWsdl(path); } Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=1211729r1=1211728r2=1211729view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java Thu Dec 8 01:26:06 2011 @@ -26,6 +26,7 @@ import java.util.List; import org.apache.cxf.tools.common.ToolConstants; import org.apache.cxf.tools.util.URIParserUtil; +import org.apache.maven.plugin.MojoExecutionException; public class WsdlOption extends Option { @@ -83,8 +84,11 @@ public class WsdlOption extends Option { return file; } -public URI getWsdlURI(URI baseURI) { +public URI getWsdlURI(URI baseURI) throws MojoExecutionException { String wsdlLocation = getWsdl(); +if (wsdlLocation == null) { +throw new MojoExecutionException(No wsdl available for base URI + baseURI); +} File wsdlFile = new File(wsdlLocation); return wsdlFile.exists() ? wsdlFile.toURI() : baseURI.resolve(URIParserUtil.escapeChars(wsdlLocation)); Modified: cxf/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1211729r1=1211728r2=1211729view=diff == --- cxf/trunk/parent/pom.xml (original) +++ cxf/trunk/parent/pom.xml Thu Dec 8 01:26:06 2011 @@ -77,6 +77,7 @@ cxf.jdom.version1.0/cxf.jdom.version cxf.jetty.version7.5.3.v20111011/cxf.jetty.version + cxf.maven.core.version2.2.1/cxf.maven.core.version cxf.msv.version2011.1/cxf.msv.version cxf.rhino.version1.7R2/cxf.rhino.version cxf.saaj.version1.3.4/cxf.saaj.version @@ -463,7 +464,7 @@ dependency groupIdorg.apache.maven/groupId artifactIdmaven-plugin-api/artifactId -version2.0.4/version +version${cxf.maven.core.version}/version scopeprovided/scope exclusions exclusion @@ -476,7 +477,7 @@ dependency groupIdorg.apache.maven/groupId artifactIdmaven-project/artifactId -version2.0.4/version +version${cxf.maven.core.version}/version scopeprovided/scope exclusions exclusion @@ -489,13 +490,13 @@ groupIdorg.apache.maven/groupId artifactIdmaven-artifact/artifactId scopeprovided/scope -version2.0.4/version +version${cxf.maven.core.version}/version
svn commit: r1211745 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Author: bimargulies Date: Thu Dec 8 02:33:47 2011 New Revision: 1211745 URL: http://svn.apache.org/viewvc?rev=1211745view=rev Log: CXF-3964: simplify code. The maven-artifact-resolver is the right API for what this is trying to do. This doesn't make the M3 bug disappear, but it makes this code easier to read. Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=1211745r1=1211744r2=1211745view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Thu Dec 8 02:33:47 2011 @@ -27,6 +27,7 @@ import java.net.URI; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; @@ -38,19 +39,15 @@ import org.apache.cxf.BusFactory; import org.apache.cxf.helpers.FileUtils; import org.apache.cxf.tools.common.ToolContext; import org.apache.cxf.tools.wsdlto.WSDLToJava; +import org.apache.maven.ProjectDependenciesResolver; import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; -import org.apache.maven.project.ProjectUtils; import org.apache.maven.settings.Proxy; import org.codehaus.plexus.archiver.jar.JarArchiver; import org.codehaus.plexus.archiver.jar.Manifest; @@ -167,15 +164,6 @@ public class WSDL2JavaMojo extends Abstr String excludes[]; /** - * The local repository taken from Maven's runtime. Typically $HOME/.m2/repository. - * - * @parameter expression=${localRepository} - * @readonly - * @required - */ -private ArtifactRepository localRepository; - -/** * Artifact factory, needed to create artifacts. * * @component @@ -185,24 +173,6 @@ public class WSDL2JavaMojo extends Abstr private ArtifactFactory artifactFactory; /** - * The remote repositories used as specified in your POM. - * - * @parameter expression=${project.repositories} - * @readonly - * @required - */ -private List repositories; - -/** - * Artifact repository factory component. - * - * @component - * @readonly - * @required - */ -private ArtifactRepositoryFactory artifactRepositoryFactory; - -/** * The Maven session. * * @parameter expression=${session} @@ -210,13 +180,13 @@ public class WSDL2JavaMojo extends Abstr * @required */ private MavenSession mavenSession; - + /** * @component * @readonly * @required */ -private ArtifactResolver artifactResolver; +private ProjectDependenciesResolver projectDependencyResolver; /** * The plugin dependencies, needed for the fork mode. @@ -320,50 +290,34 @@ public class WSDL2JavaMojo extends Abstr return effectiveWsdlOptions; } -@SuppressWarnings(unchecked) -private Artifact resolveRemoteWsdlArtifact(List remoteRepos, Artifact artifact) +private Artifact resolveRemoteWsdlArtifact(Artifact artifact) throws MojoExecutionException { -/** - * First try to find the artifact in the reactor projects of the maven session. - * So an artifact that is not yet built can be resolved - */ -ListMavenProject rProjects = mavenSession.getSortedProjects(); -for (MavenProject rProject : rProjects) { -if (artifact.getGroupId().equals(rProject.getGroupId()) - artifact.getArtifactId().equals(rProject.getArtifactId()) - artifact.getVersion().equals(rProject.getVersion())) { -SetArtifact artifacts = rProject.getArtifacts(); -for (Artifact pArtifact : artifacts) { -if (wsdl.equals(pArtifact.getType())) { -return pArtifact
svn commit: r1209463 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ systests/jaxrs/src/test/resources/jaxrs
Author: bimargulies Date: Fri Dec 2 13:25:10 2011 New Revision: 1209463 URL: http://svn.apache.org/viewvc?rev=1209463view=rev Log: CXF-3493: fix up much confusion, more tests pass. Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingPaths.java (with props) cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java (contents, props changed) - copied, changed from r1209425, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java Removed: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java?rev=1209463r1=1209462r2=1209463view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java Fri Dec 2 13:25:10 2011 @@ -53,17 +53,17 @@ public @interface CrossOriginResourceSha * A list of permitted origins. This is ignored * if {@link #allowAllOrigins()} is true. */ -String[] allowOrigins(); +String[] allowOrigins() default { }; /** * A list of HTTP methods. This is used only for preflight, * and is only valid on a class. */ -String[] allowMethods(); +String[] allowMethods() default { }; /** * A list of headers that the client may include * in an actual request. */ -String[] allowHeaders(); +String[] allowHeaders() default { }; /** * If true, this resource will return * preAccess-Control-Allow-Credentials: true/pre @@ -73,7 +73,7 @@ public @interface CrossOriginResourceSha * A list of headers to return in tt * Access-Control-Expose-Headers/tt. */ -String[] exposeHeaders(); +String[] exposeHeaders() default { }; /** * The value to return in ttAccess-Control-Max-Age/tt. * If this is negative, then no header is returned. The default @@ -89,4 +89,10 @@ public @interface CrossOriginResourceSha * performs preflight processing. */ boolean localPreflight() default false; + +/** + * For use inside @{@link CrossOriginResourceSharingPaths}. The path to apply the + * policies to. + */ +String path() default ; } Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=1209463r1=1209462r2=1209463view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Fri Dec 2 13:25:10 2011 @@ -19,9 +19,11 @@ package org.apache.cxf.jaxrs.cors; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.regex.Pattern; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; @@ -33,6 +35,7 @@ import org.apache.cxf.jaxrs.ext.RequestH import org.apache.cxf.jaxrs.ext.ResponseHandler; import org.apache.cxf.jaxrs.model.ClassResourceInfo; import org.apache.cxf.jaxrs.model.OperationResourceInfo; +import org.apache.cxf.jaxrs.utils.HttpUtils; import org.apache.cxf.message.Message; /** @@ -41,9 +44,19 @@ import org.apache.cxf.message.Message; * information in the Exchange to allow the response handler to add the appropriate headers to the response. * If you need complex or subtle control of the behavior here (e.g. clearing the prefight cache) you might be * better off reading the source of this and implementing this inside your service. + * + * This class will perform preflight processing even if there is a resource method annotated + * to handle @OPTIONS, + * emunless/em that method is annotated as follows: + * pre + * @CrossOriginResourceSharing(localPreflight = true) + * /pre + * or unless
svn commit: r1209464 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ systests/jaxrs/src/test/resources/jaxrs
Author: bimargulies Date: Fri Dec 2 13:25:21 2011 New Revision: 1209464 URL: http://svn.apache.org/viewvc?rev=1209464view=rev Log: CXF-3493: pass all the tests I've got so far. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=1209464r1=1209463r2=1209464view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Fri Dec 2 13:25:21 2011 @@ -119,7 +119,7 @@ public class CrossOriginResourceSharingF // 5.1.4 ListString effectiveExposeHeaders = effectiveExposeHeaders(ann); if (effectiveExposeHeaders != null effectiveExposeHeaders.size() != 0) { -m.getExchange().put(CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS, effectiveExposeHeaders); +m.getExchange().put(CorsHeaderConstants.HEADER_AC_EXPOSE_HEADERS, effectiveExposeHeaders); } // note what kind of processing we're doing. Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java?rev=1209464r1=1209463r2=1209464view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java Fri Dec 2 13:25:21 2011 @@ -22,6 +22,7 @@ package org.apache.cxf.systest.jaxrs.cor import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.apache.cxf.helpers.IOUtils; @@ -297,8 +298,8 @@ public class CrossOriginSimpleTest exten assertAllowCredentials(response, false); ListString exposeHeadersValues = headerValues(response.getHeaders(CorsHeaderConstants.HEADER_AC_EXPOSE_HEADERS)); -// depend on knowing the order. -assertEquals(Arrays.asList(new String[] {X-custom-3, X-custom-4 }), exposeHeadersValues); +// preflight never returns Expose-Headers +assertEquals(Collections.emptyList(), exposeHeadersValues); ListString allowHeadersValues = headerValues(response.getHeaders(CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS)); assertEquals(Arrays.asList(new String[] {X-custom-1, X-custom-2 }), allowHeadersValues); Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml?rev=1209464r1=1209463r2=1209464view=diff == --- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml (original) +++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml Fri Dec 2 13:25:21 2011 @@ -31,10 +31,10 @@ http://cxf.apache.org/core /jaxrs:serviceBeans jaxrs:providers ref bean=cors-filter / - /jaxrs:providers + /jaxrs:providers!-- jaxrs:features cxf:logging / - /jaxrs:features + /jaxrs:features-- /jaxrs:server jaxrs:server id=config-service address=/config
svn commit: r1209596 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ systests/jaxrs/src/test/resources/jaxrs
Author: bimargulies Date: Fri Dec 2 17:30:42 2011 New Revision: 1209596 URL: http://svn.apache.org/viewvc?rev=1209596view=rev Log: More tests, plus some substantive documentation. (CXF-3493) Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/package.html (with props) cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/AnnotatedCorsServer.java (with props) Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/package.html URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/package.html?rev=1209596view=auto == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/package.html (added) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/package.html Fri Dec 2 17:30:42 2011 @@ -0,0 +1,83 @@ +!DOCTYPE HTML +html +head +!-- + 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. +-- +/head +body bgcolor=white +h1CORS/h1 +pThis package provides a filter to assist applications in implementing Cross Origin Resource Sharing, +as described in the a href=http://www.w3.org/TR/cors;CORS specification/a. +/p +h2CORS Access Model/h2 +p +CORS exists to protect web servers from unexpected cross-origin access. The premise of CORS is that many web resources +are deployed by people who don't want to permit cross-origin access, but who couldn't detect it or didn't bother +to control it. Thus, CORS defines a set of restrictions emimplemented on the client/em that, by default, +prohibit cross-origin access. +/p +p +If you want your service to permit cross-origin access, your service must return additional headers to the client to reassure +it that you really want to permit the access. {@link CrossOriginResourceSharingFilter} adds these headers to your service's +responses based on rules that you configure. +/p +h2CORS Resource Model (versus JAX-RS)/h2 +p +CORS and JAX-RS differ, fundamentally, in how they define a resource for access control purposes. In CORS, a resource +is defined by the combination of URI and HTTP method. Once a client has obtained access information for a URI+METHOD, +it may cache it. JAX-RS, on the other hand, defines a resource as: +ul +liURI/li +limethod/li +liAccepts/li +liAccepts-Language/li +liContent-Type/li +/ul +The logical place, in other words, to specify CORS policy in a JAX-RS application is at the level of an annotated method. However, each method is +applied to the narrow 'resource' defined by the list above, not just the URI+Method pair. This will motivate the annotation model below. +/p +h2Simple and Preflight requests/h2 +pThe CORS specification differentiates two kinds of HTTP requests: emsimple/em and emnot simple/em. (See the specification +for the definition.) For a simple request, the client simply +sends the request to the service, and then looks for the ttAccess-Control-/tt headers to indicate whether the server has explicitly granted +cross-origin access. For a non-simple request, the client sends a so-called empreflight/em request and waits for a response before +issuing the original request. +h2Configuration via Annotation/h2 +p +One way to control the behavior of the filter is the @{@link CrossOriginResourceSharing} annotation on a method. +This is a complete solution for simple requests. You can specify all of the controls. However, if you have non-simple methods, the mismatch on +resource access models above makes it impossible for CXF to map the OPTIONS request that will arrive to the correct method. +/p +p +If all the methods of a class can share a common policy, you can attach a single @{@link CrossOriginResourceSharing} +to a resource class, and it will apply to all the resource implied by all of the methods. +/p +p +If you need finer control, you can use @{@link CrossOriginResourceSharingPaths} at the class level. This annotation contains a list of +@{@link
svn commit: r1209084 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ systests/jaxrs/src/test/resources/jaxrs
Author: bimargulies Date: Thu Dec 1 14:00:26 2011 New Revision: 1209084 URL: http://svn.apache.org/viewvc?rev=1209084view=rev Log: CXF-3493: merge the filter beans, fix issues, add more tests. Some of them even pass. Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (contents, props changed) - copied, changed from r1208938, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java Removed: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_cors/WEB-INF/beans.xml Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (from r1208938, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java) URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.javap1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.javar1=1208938r2=1209084rev=1209084view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Thu Dec 1 14:00:26 2011 @@ -26,23 +26,26 @@ import java.util.List; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.ResponseBuilder; import org.apache.cxf.jaxrs.ext.RequestHandler; +import org.apache.cxf.jaxrs.ext.ResponseHandler; import org.apache.cxf.jaxrs.model.ClassResourceInfo; import org.apache.cxf.jaxrs.model.OperationResourceInfo; import org.apache.cxf.message.Message; /** - * An input filter for CORS, following http://www.w3.org/TR/cors/. - * This examines the input headers. If the request is valid, it stores - * the information in the Exchange to allow {@link CrossOriginOutputFilter} + * An single class that provides both an input + * and an output filter for CORS, following http://www.w3.org/TR/cors/. + * The input examines the input headers. If the request is valid, it stores + * the information in the Exchange to allow the response handler * to add the appropriate headers to the response. * * If you need complex or subtle control of the behavior here (e.g. clearing * the prefight cache) you might be better off reading the source of this * and implementing this inside your service. */ -public class CrossOriginInputFilter implements RequestHandler { +public class CrossOriginResourceSharingFilter implements RequestHandler, ResponseHandler { @Context private HttpHeaders headers; @@ -56,6 +59,16 @@ public class CrossOriginInputFilter impl private ListString allowedHeaders = Collections.emptyList(); private boolean allowAllOrigins; +private boolean allowCredentials; + +private ListString exposeHeaders; + +private Integer maxAge; + +public CrossOriginResourceSharingFilter() { +exposeHeaders = Collections.emptyList(); +} + public Response handleRequest(Message m, ClassResourceInfo resourceClass) { if (OPTIONS.equals(m.get(Message.HTTP_REQUEST_METHOD))) { OperationResourceInfo opResInfo = m.getExchange().get(OperationResourceInfo.class); @@ -86,7 +99,7 @@ public class CrossOriginInputFilter impl // 5.1.4 expose headers lives on the output side. // note what kind of processing we're doing. -m.getExchange().put(CrossOriginOutputFilter.class.getName(), simple); +m.getExchange().put(CrossOriginResourceSharingFilter.class.getName(), simple); return null; } @@ -142,7 +155,7 @@ public class CrossOriginInputFilter impl })); // 5.2.10 add allow-headers; we pass them from here to the output filter which actually adds them. m.getExchange().put(CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS, requestHeaders); -m.getExchange().put(CrossOriginOutputFilter.class.getName(), preflight); +m.getExchange().put(CrossOriginResourceSharingFilter.class.getName(), preflight); // and allow things to proceed to the output filter. return Response.ok().build(); } @@ -195,4 +208,106 @@ public class
svn commit: r1209182 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/
Author: bimargulies Date: Thu Dec 1 18:54:10 2011 New Revision: 1209182 URL: http://svn.apache.org/viewvc?rev=1209182view=rev Log: CXF-3943: add an annotation to allow finer control than global params in the spring configuration. Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java (with props) Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/Description.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java?rev=1209182r1=1209181r2=1209182view=diff == --- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java (original) +++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java Thu Dec 1 18:54:10 2011 @@ -23,6 +23,7 @@ import java.beans.BeanInfo; import java.beans.PropertyDescriptor; import java.io.File; import java.io.IOException; +import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -265,4 +266,22 @@ public final class ReflectionUtil { } return m; } + + +/** + * Look for a specified annotation on a method. If there, return it. If not, search it's containing class. + * Assume that the annotation is marked @Inherited. + * + * @param m method to examine + * @param annotationType the annotation type to look for. + * @return + */ +public static T extends Annotation T getAnnotationForMethodOrContainingClass(Method m, + ClassT annotationType) { +T annotation = m.getAnnotation(annotationType); +if (annotation != null) { +return annotation; +} +return m.getDeclaringClass().getAnnotation(annotationType); +} } Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java?rev=1209182view=auto == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java (added) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharing.java Thu Dec 1 18:54:10 2011 @@ -0,0 +1,92 @@ +/** + * 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.jaxrs.cors; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Attach a href=http://www.w3.org/TR/cors/;CORS/a information + * to a resource. This annotation is read by {@link CrossOriginResourceSharingFilter}. + * If this annotation is present on a method, or + * on the method's class (or its superclasses), then it completely + * overrides any parameters set in {@link CrossOriginResourceSharingFilter}. + * If a particular parameter of this annotation is not specified, then the + * default value is used, emnot/em the parameters of the filter. + * + * Note that the CORS specification censors the headers on a + * preflight OPTIONS request. As a result, the filter cannot determine + * exactly which method corresponds
svn commit: r1209191 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java
Author: bimargulies Date: Thu Dec 1 19:04:13 2011 New Revision: 1209191 URL: http://svn.apache.org/viewvc?rev=1209191view=rev Log: checkstyle oops. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java?rev=1209191r1=1209190r2=1209191view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginResourceSharingFilter.java Thu Dec 1 19:04:13 2011 @@ -22,7 +22,6 @@ package org.apache.cxf.jaxrs.cors; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Set; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders;
svn commit: r1209241 - in /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors: BasicCrossOriginTest.java ConfigServer.java CorsServer.java CrossOriginSimpleTest.java
Author: bimargulies Date: Thu Dec 1 21:14:02 2011 New Revision: 1209241 URL: http://svn.apache.org/viewvc?rev=1209241view=rev Log: CXF-3943: fill in the rest of the non-annotation simple tests. Added: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java (contents, props changed) - copied, changed from r1209212, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java Removed: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java?rev=1209241r1=1209240r2=1209241view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/ConfigServer.java Thu Dec 1 21:14:02 2011 @@ -24,6 +24,7 @@ import java.util.Arrays; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.apache.cxf.jaxrs.cors.CrossOriginResourceSharingFilter; @@ -47,6 +48,15 @@ public class ConfigServer { } return ok; } + +@POST +@Path(/setAllowCredentials/{yn}) +@Produces(text/plain) +public String setAllowCredentials(@PathParam(yn) boolean yn) { +inputFilter.setAllowCredentials(yn); +return ok; +} + public CrossOriginResourceSharingFilter getInputFilter() { return inputFilter; Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java?rev=1209241r1=1209240r2=1209241view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CorsServer.java Thu Dec 1 21:14:02 2011 @@ -19,10 +19,12 @@ package org.apache.cxf.systest.jaxrs.cors; +import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.core.Response; /** * @@ -36,5 +38,9 @@ public class CorsServer { return echo; } - +@DELETE +@Path(/delete) +public Response deleteSomething() { +return Response.ok().build(); +} } Copied: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java (from r1209212, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java) URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java?p2=cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.javap1=cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.javar1=1209212r2=1209241rev=1209241view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java Thu Dec 1 21:14:02 2011 @@ -34,6 +34,7 @@ import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; @@ -42,7 +43,18 @@ import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -public class BasicCrossOriginTest extends AbstractBusClientServerTestBase { +/** + * Unit tests for simple CORS requests. Simple requests traffic only in allowed origins, + * allowed credentials, and exposed headers. + * + * Note that it's not the server's job to detect invalid CORS requests. If a client + * fails to preflight, it's just not our job. However, also note that all 'actual' + * requests are treated as simple requests. In other words, a DELETE gets the same + * treatment as a simple request. The 'hey, this is complex' test
svn commit: r1208650 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors: ./ CorsHeaderConstants.java CrossOriginInputFilter.java CrossOriginOutputFilter.java
Author: bimargulies Date: Wed Nov 30 18:29:19 2011 New Revision: 1208650 URL: http://svn.apache.org/viewvc?rev=1208650view=rev Log: CXF-3943: Implement filters for CORS. (Tests to follow) Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java (with props) cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java (with props) cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java (with props) Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java?rev=1208650view=auto == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java (added) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java Wed Nov 30 18:29:19 2011 @@ -0,0 +1,41 @@ +/** + * 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.jaxrs.cors; + +/** + * Headers used to implement http://www.w3.org/TR/cors/. + */ +public final class CorsHeaderConstants { + +public static final String HEADER_ORIGIN = origin; +public static final String HEADER_AC_REQUEST_METHOD = Access-Control-Request-Method; +public static final String HEADER_AC_REQUEST_HEADERS = Access-Control-Request-Headers; +public static final String HEADER_AC_ALLOW_METHODS = Access-Control-Allow-Methods; +public static final String HEADER_AC_ALLOW_HEADERS = Access-Control-Allow-Headers; +public static final String HEADER_AC_ALLOW_ORIGIN = Access-Control-Allow-Origin; +public static final String HEADER_AC_ALLOW_CREDENTIALS = Access-Control-Allow-Credentials; +public static final String HEADER_AC_EXPOSE_HEADERS = Access-Control-Expose-Headers; +public static final String HEADER_AC_MAX_AGE = Access-Control-Max-Age; + +private CorsHeaderConstants() { +// +} + +} Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java -- svn:eol-style = native Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CorsHeaderConstants.java -- svn:mime-type = text/plain Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java?rev=1208650view=auto == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java (added) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginInputFilter.java Wed Nov 30 18:29:19 2011 @@ -0,0 +1,199 @@ +/** + * 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.jaxrs.cors; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import javax.ws.rs.core.Context
svn commit: r1208932 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java systests/jaxrs/pom.xml systests/jaxrs/src/test/java/org/apache/cxf/systest/
Author: bimargulies Date: Thu Dec 1 02:22:10 2011 New Revision: 1208932 URL: http://svn.apache.org/viewvc?rev=1208932view=rev Log: CXF-3943: see the simplest possible test work, courtesy of the apache http client library. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java cxf/trunk/systests/jaxrs/pom.xml cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/BasicCrossOriginTest.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java?rev=1208932r1=1208931r2=1208932view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors/CrossOriginOutputFilter.java Thu Dec 1 02:22:10 2011 @@ -51,6 +51,12 @@ public class CrossOriginOutputFilter imp } return null; } + +private void addHeaders(ResponseBuilder rb, String key, ListString vals) { +for (String v : vals) { +rb.header(key, v); +} +} public Response handleResponse(Message m, OperationResourceInfo ori, Response response) { String op = (String)m.getExchange().get(CrossOriginOutputFilter.class.getName()); @@ -61,24 +67,24 @@ public class CrossOriginOutputFilter imp ResponseBuilder rbuilder = Response.fromResponse(response); if (simple.equals(op)) { // 5.1.3: add Allow-Origin supplied from the input side, plus allow-credentials as requested -rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN, originHeader); +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN, originHeader); rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_CREDENTIALS, Boolean.toString(allowCredentials)); // 5.1.4 add allowed headers ListString allowedHeaders = getHeadersFromInput(m, CorsHeaderConstants.HEADER_AC_ALLOW_METHODS); if (allowedHeaders != null) { -rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_METHODS, allowedHeaders); +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_ALLOW_METHODS, allowedHeaders); } if (exposeHeaders.size() 0) { -rbuilder.header(CorsHeaderConstants.HEADER_AC_EXPOSE_HEADERS, exposeHeaders); +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_EXPOSE_HEADERS, exposeHeaders); } // if someone wants to clear the cache, we can't help them. return rbuilder.build(); } else { // preflight // 5.2.7 add Allow-Origin supplied from the input side, plus allow-credentials as requested -rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN, originHeader); +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN, originHeader); rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_CREDENTIALS, Boolean.toString(allowCredentials)); // 5.2.8 max-age @@ -89,13 +95,13 @@ public class CrossOriginOutputFilter imp /* * Currently, input side just lists the one requested method, and spec endorses that. */ -rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_METHODS, +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_ALLOW_METHODS, getHeadersFromInput(m, CorsHeaderConstants.HEADER_AC_ALLOW_METHODS)); // 5.2.10 add allowed headers ListString allowedHeaders = getHeadersFromInput(m, CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS); if (allowedHeaders != null allowedHeaders.size() 0) { -rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS, allowedHeaders); +addHeaders(rbuilder, CorsHeaderConstants.HEADER_AC_ALLOW_HEADERS, allowedHeaders); } return rbuilder.build(); Modified: cxf/trunk/systests/jaxrs/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/pom.xml?rev=1208932r1=1208931r2=1208932view=diff == --- cxf/trunk/systests/jaxrs/pom.xml (original) +++ cxf/trunk/systests/jaxrs/pom.xml Thu Dec 1 02:22:10 2011 @@ -314,6 +314,12 @@ artifactIdjackson-core-asl/artifactId version1.9.0/version /dependency +dependency + groupIdorg.apache.httpcomponents/groupId + artifactIdhttpclient/artifactId
svn commit: r1206862 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ rt/frontend/jaxrs/src/main/java
Author: bimargulies Date: Sun Nov 27 22:07:53 2011 New Revision: 1206862 URL: http://svn.apache.org/viewvc?rev=1206862view=rev Log: CXF-3936: fix name of new param to be 'required' Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java?rev=1206862r1=1206861r2=1206862view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java Sun Nov 27 22:07:53 2011 @@ -44,7 +44,7 @@ public @interface Multipart { * the {@link org.apache.cxf.jaxrs.provider.MultipartProvider} * throws a {@link javax.ws.rs.WebApplicationException} * with status 400. If this option is set to strongfalse/strong, - * the parameter is set to strongnull/strong. + * the parameter is set to strongnull/strong instead. */ -boolean errorIfMissing() default true; +boolean required() default true; } Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java?rev=1206862r1=1206861r2=1206862view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java Sun Nov 27 22:07:53 2011 @@ -167,7 +167,7 @@ public class MultipartProvider extends A Attachment multipart = AttachmentUtils.getMultipart(c, id, mt, infos); if (multipart != null) { return fromAttachment(multipart, c, t, anns); -} else if (id != null !id.errorIfMissing()) { +} else if (id != null !id.required()) { /* * If user asked for a null, give them a null. */ Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java?rev=1206862r1=1206861r2=1206862view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java Sun Nov 27 22:07:53 2011 @@ -157,7 +157,7 @@ public final class FormUtils { || cd.getParameter(name) == null) { Multipart id = AnnotationUtils.getAnnotation(anns, Multipart.class); -if (id == null || id.errorIfMissing()) { +if (id == null || id.required()) { throw new WebApplicationException(400); } else { return; Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java?rev=1206862r1=1206861r2=1206862view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java Sun Nov 27 22:07:53 2011 @@ -109,7 +109,7 @@ public final class AttachmentUtils { return a; } } -if (id.errorIfMissing()) { +if (id.required()) { org.apache.cxf.common.i18n.Message errorMsg = new org.apache.cxf.common.i18n.Message(MULTTIPART_ID_NOT_FOUND, BUNDLE, Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev
svn commit: r1205996 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java
Author: bimargulies Date: Thu Nov 24 22:19:29 2011 New Revision: 1205996 URL: http://svn.apache.org/viewvc?rev=1205996view=rev Log: Add parameter for mapping missing parts to null. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java?rev=1205996r1=1205995r2=1205996view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Multipart.java Thu Nov 24 22:19:29 2011 @@ -24,9 +24,27 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Annotate a JAX-RS function parameter to receive data from a multipart 'part'. + **/ @Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) public @interface Multipart { +/** + * The name of the MIME part to map to this parameter. The default is + * the unnamed default part. + **/ String value() default ; +/** + * Select the part by MIME type. The default is to match any MIME type. + */ String type() default */*; +/** + * How to handle a missing part. By default, if no part matches, + * the {@link org.apache.cxf.jaxrs.provider.MultipartProvider} + * throws a {@link javax.ws.rs.WebApplicationException} + * with status 404. If this option is set to strongfalse/strong, + * the parameter is set to strongnull/strong. + */ +boolean errorIfMissing() default true; }
svn commit: r1205997 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Author: bimargulies Date: Thu Nov 24 22:19:47 2011 New Revision: 1205997 URL: http://svn.apache.org/viewvc?rev=1205997view=rev Log: Try to invent nullable multipart parameters. Test commented out because I can't figure it out. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java?rev=1205997r1=1205996r2=1205997view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java Thu Nov 24 22:19:47 2011 @@ -108,6 +108,12 @@ public final class AttachmentUtils { return a; } } +if (!id.errorIfMissing()) { +/* + * If user asked for a null, give them a null. + */ +return null; +} org.apache.cxf.common.i18n.Message errorMsg = new org.apache.cxf.common.i18n.Message(MULTTIPART_ID_NOT_FOUND, BUNDLE, Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java?rev=1205997r1=1205996r2=1205997view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java Thu Nov 24 22:19:47 2011 @@ -989,7 +989,7 @@ public class BookStore { } @XmlJavaTypeAdapter(BookInfoAdapter2.class) -static interface BookInfoInterface { +interface BookInfoInterface { String getName(); long getId(); Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1205997r1=1205996r2=1205997view=diff == --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java Thu Nov 24 22:19:47 2011 @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -36,6 +37,7 @@ import javax.imageio.ImageIO; import javax.mail.util.ByteArrayDataSource; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; import javax.xml.bind.JAXBContext; import javax.xml.bind.Unmarshaller; @@ -333,12 +335,25 @@ public class JAXRSMultipartTest extends return ImageIO.read(getClass().getResource(name)); } +@org.junit.Ignore +@Test +public void testNullableParams() throws Exception { +String address = http://localhost:; + PORT + /books/testnullpart; +WebClient client = WebClient.create(address); +client.type(multipart/form-data).accept(text/plain); +ListAttachment atts = new LinkedListAttachment(); +atts.add(new Attachment(somepart, text/plain, hello there)); +Response r = client.postCollection(atts, Attachment.class); +assertEquals(Response.Status.OK.getStatusCode(), r.getStatus()); +assertEquals(nobody home, r.getEntity()); +} + @Test public void testAddBookJaxbJsonImageWebClient() throws Exception { String address = http://localhost:; + PORT + /bookstore/books/jaxbjsonimage; WebClient client = WebClient.create(address); client.type(multipart/mixed).accept(multipart/mixed); - + Book jaxb = new Book(jaxb, 1L); Book json = new Book(json, 2L); InputStream is1 = Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf
svn commit: r1201825 - in /cxf/trunk/maven-plugins/archetypes: ./ cxf-jaxrs-service/ cxf-jaxrs-service/src/ cxf-jaxrs-service/src/main/ cxf-jaxrs-service/src/main/resources/ cxf-jaxrs-service/src/main
Author: bimargulies Date: Mon Nov 14 19:03:41 2011 New Revision: 1201825 URL: http://svn.apache.org/viewvc?rev=1201825view=rev Log: CXF-3912 Archetype for JAX-RS Added: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/META-INF/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/META-INF/maven/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/META-INF/maven/archetype.xml (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/java/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/java/HelloWorld.java (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/java/JsonBean.java (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml (with props) Modified: cxf/trunk/maven-plugins/archetypes/pom.xml Added: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml?rev=1201825view=auto == --- cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml (added) +++ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml Mon Nov 14 19:03:41 2011 @@ -0,0 +1,63 @@ +?xml version=1.0? +!-- +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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +parent +groupIdorg.apache.cxf/groupId +artifactIdcxf-parent/artifactId +version2.5.1-SNAPSHOT/version +relativePath../../../parent/pom.xml/relativePath +/parent +modelVersion4.0.0/modelVersion +groupIdorg.apache.cxf.archetype/groupId +artifactIdcxf-jaxrs-service/artifactId +packagingmaven-archetype/packaging +nameApache CXF Archetype - Simple JAX-RS Service/name +descriptionCreates a webapp for JAX-RS services/description +version2.5.1-SNAPSHOT/version +urlhttp://cxf.apache.org/url +properties +maven.test.skiptrue/maven.test.skip +eclipse.skiptrue/eclipse.skip +/properties +build +extensions +extension +groupIdorg.apache.maven.archetype/groupId +artifactIdarchetype-packaging/artifactId +version2.1/version +/extension +/extensions +pluginManagement +plugins +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-archetype-plugin/artifactId +version2.1/version +/plugin +/plugins +/pluginManagement +resources
svn commit: r1201826 - in /cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/sr
Author: bimargulies Date: Mon Nov 14 19:03:56 2011 New Revision: 1201826 URL: http://svn.apache.org/viewvc?rev=1201826view=rev Log: CXF-3912: add an archetype for JAX-RS. Added: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/META-INF/maven/archetype-metadata.xml (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/test/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/test/java/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/test/java/HelloWorldIT.java (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/resources/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/resources/projects/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/resources/projects/basic/ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/resources/projects/basic/archetype.properties (with props) cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/test/resources/projects/basic/goal.txt (with props) Modified: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/java/HelloWorld.java cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/java/JsonBean.java cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml Modified: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml?rev=1201826r1=1201825r2=1201826view=diff == --- cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml (original) +++ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml Mon Nov 14 19:03:56 2011 @@ -1,63 +1,32 @@ -?xml version=1.0? -!-- -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. --- -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; -parent -groupIdorg.apache.cxf/groupId -artifactIdcxf-parent/artifactId -version2.5.1-SNAPSHOT/version -relativePath../../../parent/pom.xml/relativePath -/parent -modelVersion4.0.0/modelVersion -groupIdorg.apache.cxf.archetype/groupId -artifactIdcxf-jaxrs-service/artifactId -packagingmaven-archetype/packaging -nameApache CXF Archetype - Simple JAX-RS Service/name -descriptionCreates a webapp for JAX-RS services/description -version2.5.1-SNAPSHOT/version -urlhttp://cxf.apache.org/url -properties -maven.test.skiptrue/maven.test.skip -eclipse.skiptrue/eclipse.skip -/properties -build -extensions -extension -groupIdorg.apache.maven.archetype/groupId -artifactIdarchetype-packaging/artifactId -version2.1/version -/extension -/extensions -pluginManagement -plugins -plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-archetype-plugin/artifactId -version2.1/version -/plugin -/plugins -/pluginManagement -resources -resource -directorysrc/main/resources/directory -filteringtrue/filtering -/resource -/resources -/build +?xml version=1.0 encoding=UTF-8? +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http
svn commit: r1201998 - /cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml
Author: bimargulies Date: Tue Nov 15 01:50:16 2011 New Revision: 1201998 URL: http://svn.apache.org/viewvc?rev=1201998view=rev Log: Fix snapshot deps on archetype stuff. Modified: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml Modified: cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml?rev=1201998r1=1201997r2=1201998view=diff == --- cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml (original) +++ cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/pom.xml Tue Nov 15 01:50:16 2011 @@ -14,7 +14,7 @@ extension groupIdorg.apache.maven.archetype/groupId artifactIdarchetype-packaging/artifactId -version2.2-SNAPSHOT/version +version2.1/version /extension /extensions @@ -22,7 +22,7 @@ plugins plugin artifactIdmaven-archetype-plugin/artifactId - version2.2-SNAPSHOT/version + version2.1/version /plugin /plugins /pluginManagement
svn commit: r1202011 - /cxf/trunk/maven-plugins/archetypes/pom.xml
Author: bimargulies Date: Tue Nov 15 02:35:46 2011 New Revision: 1202011 URL: http://svn.apache.org/viewvc?rev=1202011view=rev Log: Put the archetype back into the build. Modified: cxf/trunk/maven-plugins/archetypes/pom.xml Modified: cxf/trunk/maven-plugins/archetypes/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/pom.xml?rev=1202011r1=1202010r2=1202011view=diff == --- cxf/trunk/maven-plugins/archetypes/pom.xml (original) +++ cxf/trunk/maven-plugins/archetypes/pom.xml Tue Nov 15 02:35:46 2011 @@ -36,6 +36,6 @@ modules modulecxf-jaxws-javafirst/module -!--modulecxf-jaxrs-service/module-- +modulecxf-jaxrs-service/module /modules /project
svn commit: r1087847 - in /cxf/trunk/distribution: pom.xml src/main/release/lib/WHICH_JARS
Author: bimargulies Date: Fri Apr 1 18:52:36 2011 New Revision: 1087847 URL: http://svn.apache.org/viewvc?rev=1087847view=rev Log: Now that I know that relaxngDatatype is BSD, all of the MSV deps are known to be 'category b' and we can redistribute them. Modified: cxf/trunk/distribution/pom.xml cxf/trunk/distribution/src/main/release/lib/WHICH_JARS Modified: cxf/trunk/distribution/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/pom.xml?rev=1087847r1=1087846r2=1087847view=diff == --- cxf/trunk/distribution/pom.xml (original) +++ cxf/trunk/distribution/pom.xml Fri Apr 1 18:52:36 2011 @@ -222,12 +222,6 @@ groupId${project.groupId}/groupId artifactIdcxf-wstx-msv-validation/artifactId version${project.version}/version -exclusions -exclusion -groupIdnet.java.dev.msv/groupId -artifactIdmsv-core/artifactId -/exclusion -/exclusions /dependency dependency groupId${project.groupId}/groupId Modified: cxf/trunk/distribution/src/main/release/lib/WHICH_JARS URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/lib/WHICH_JARS?rev=1087847r1=1087846r2=1087847view=diff == --- cxf/trunk/distribution/src/main/release/lib/WHICH_JARS (original) +++ cxf/trunk/distribution/src/main/release/lib/WHICH_JARS Fri Apr 1 18:52:36 2011 @@ -103,10 +103,7 @@ For CORBA support: For JavaScript functionality: - js.jar -For schema validation with the Aegis data binding, -you must retrieve and include the following jars. -The licenses of these jars are do not permit -redistribution with Apache CXF releases. +For schema validation with the Aegis data binding. - msv-core.jar (version 2010.1) - xsdlib:jar (version 2010.1)
svn commit: r1071850 - /cxf/trunk/parent/pom.xml
Author: bimargulies Date: Fri Feb 18 00:56:54 2011 New Revision: 1071850 URL: http://svn.apache.org/viewvc?rev=1071850view=rev Log: Switch from snapshot to release of XMLSchema 2.0. Phew! Modified: cxf/trunk/parent/pom.xml Modified: cxf/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1071850r1=1071849r2=1071850view=diff == --- cxf/trunk/parent/pom.xml (original) +++ cxf/trunk/parent/pom.xml Fri Feb 18 00:56:54 2011 @@ -82,7 +82,7 @@ cxf.stax.impl.version4.0.8/cxf.stax.impl.version cxf.wsdl4j.version1.6.2/cxf.wsdl4j.version cxf.xmlbeans.version2.4.0/cxf.xmlbeans.version -cxf.xmlschema.version2.0-SNAPSHOT/cxf.xmlschema.version +cxf.xmlschema.version2.0/cxf.xmlschema.version cxf.checkstyle.extension / cxf.spring.validation.modeVALIDATION_AUTO/cxf.spring.validation.mode
svn commit: r1066681 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
Author: bimargulies Date: Wed Feb 2 23:05:12 2011 New Revision: 1066681 URL: http://svn.apache.org/viewvc?rev=1066681view=rev Log: CXF-3302: remove XFire compatibility dregs. Thanks Matt. Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java?rev=1066681r1=1066680r2=1066681view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Wed Feb 2 23:05:12 2011 @@ -42,25 +42,10 @@ public class AnnotationReader { private static final Class? extends Annotation XML_TRANSIENT = load(javax.xml.bind.annotation.XmlTransient); -private static final Class? extends Annotation XFIRE_IGNORE_PROPERTY = -load(org.codehaus.xfire.aegis.type.java5.IgnoreProperty); -private static final Class? extends Annotation XFIRE_XML_ATTRIBUTE = -load(org.codehaus.xfire.aegis.type.java5.XmlAttribute); -private static final Class? extends Annotation XFIRE_XML_ELEMENT = -load(org.codehaus.xfire.aegis.type.java5.XmlElement); -private static final Class? extends Annotation XFIRE_XML_TYPE = -load(org.codehaus.xfire.aegis.type.java5.XmlType); -private static final Class? extends Annotation XFIRE_XML_PARAM_TYPE = -load(org.codehaus.xfire.aegis.type.java5.XmlParamType); -private static final Class? extends Annotation XFIRE_XML_RETURN_TYPE = -load(org.codehaus.xfire.aegis.type.java5.XmlReturnType); - - @SuppressWarnings(unchecked) public boolean isIgnored(AnnotatedElement element) { return isAnnotationPresent(element, IgnoreProperty.class, -XFIRE_IGNORE_PROPERTY, XML_TRANSIENT); } @@ -68,7 +53,6 @@ public class AnnotationReader { public boolean isAttribute(AnnotatedElement element) { return isAnnotationPresent(element, XmlAttribute.class, -XFIRE_XML_ATTRIBUTE, XML_ATTRIBUTE); } @@ -76,7 +60,6 @@ public class AnnotationReader { public boolean isElement(AnnotatedElement element) { return isAnnotationPresent(element, XmlElement.class, -XFIRE_XML_ELEMENT, XML_ELEMENT); } @@ -87,7 +70,6 @@ public class AnnotationReader { element, Boolean.FALSE, XmlElement.class, -XFIRE_XML_ELEMENT, XML_ELEMENT)); } @SuppressWarnings(unchecked) @@ -98,7 +80,6 @@ public class AnnotationReader { return (Boolean)getAnnotationValue(nillable, // NOPMD anns, XmlElement.class, -XFIRE_XML_ELEMENT, XML_ELEMENT); } @@ -108,9 +89,7 @@ public class AnnotationReader { element, AegisType.class, XmlAttribute.class, -XmlElement.class, -XFIRE_XML_ATTRIBUTE, -XFIRE_XML_ELEMENT); +XmlElement.class); // jaxb uses a different default value if (value == null) { value = (Class) getAnnotationValue(type, @@ -128,8 +107,7 @@ public class AnnotationReader { method, index, AegisType.class, -XmlParamType.class, -XFIRE_XML_PARAM_TYPE); +XmlParamType.class); } @SuppressWarnings(unchecked) @@ -137,8 +115,7 @@ public class AnnotationReader { return (Class) getAnnotationValue(type, element, AegisType.class, -XmlReturnType.class, -XFIRE_XML_RETURN_TYPE); +XmlReturnType.class); } @SuppressWarnings(unchecked) @@ -147,11 +124,8 @@ public class AnnotationReader { element, , XmlType.class, -XFIRE_XML_TYPE, XmlAttribute.class, -XFIRE_XML_ATTRIBUTE, -XmlElement.class, -XFIRE_XML_ELEMENT); +XmlElement.class); // jaxb uses a different default value if (name == null) { @@ -172,7 +146,6 @@ public class AnnotationReader { index, AegisType.class, XmlParamType.class, -XFIRE_XML_PARAM_TYPE, WEB_PARAM); } @@ -182,7 +155,6 @@ public class AnnotationReader { element
svn commit: r1065148 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils: JAXRSUtils.java Messages.properties
Author: bimargulies Date: Sat Jan 29 23:45:57 2011 New Revision: 1065148 URL: http://svn.apache.org/viewvc?rev=1065148view=rev Log: fix typos and spelling errors and missing substitution vars in messages in JAX-RS. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1065148r1=1065147r2=1065148view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Sat Jan 29 23:45:57 2011 @@ -109,7 +109,7 @@ public final class JAXRSUtils { private static final Logger LOG = LogUtils.getL7dLogger(JAXRSUtils.class); private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSUtils.class); -private static final String PROPOGATE_EXCEPTION = org.apache.cxf.propagate.exception; +private static final String PROPAGATE_EXCEPTION = org.apache.cxf.propagate.exception; private JAXRSUtils() { } @@ -1180,7 +1180,7 @@ public final class JAXRSUtils { public static boolean propogateException(Message m) { -Object value = m.getContextualProperty(PROPOGATE_EXCEPTION); +Object value = m.getContextualProperty(PROPAGATE_EXCEPTION); if (value == null) { return true; Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties?rev=1065148r1=1065147r2=1065148view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties Sat Jan 29 23:45:57 2011 @@ -32,9 +32,9 @@ CLASS_VALUE_OF_FAILURE=Instance of class WRONG_PARAMETER_TYPE=Parameter Class {0} has no constructor with single String parameter, static valueOf(String) or fromString(String) methods NO_MSG_READER=No message body reader has been found for request class {0}, ContentType : {1}. NO_SUBRESOURCE_METHOD_FOUND=No operation matching request path {0} is found on subresource, HTTP Method : {1}, ContentType : {2}, Accept : {3}. -NO_OP_EXC=.No operation matching request path {0} is found, HTTP Method : {1}, ContentType : {2}, Accept : {3}. +NO_OP_EXC=No operation matching request path {0} is found, HTTP Method : {1}, ContentType : {2}, Accept : {3}. START_OPER_MATCH=Trying to select a resource operation on the resource class {0} -START_CRI_MATCH=Trying to select a resource class {0}, request path : {1} +START_CRI_MATCH=Trying to select a resource class, request path : {0} OPER_SELECTED_POSSIBLY=Resource operation {0} may get selected OPER_SELECTED=Resource operation {0} on the resource class {1} has been selected OPER_NO_MATCH=No method match, method name : {0}, request path : {1}, method @Path : {2}, HTTP Method : {3}, method HTTP Method : {4}, ContentType : {5}, method @Consumes : {6}, Accept : {7}, method @Produces : {8}.
svn commit: r1044754 - /cxf/trunk/parent/pom.xml
Author: bimargulies Date: Sun Dec 12 01:53:42 2010 New Revision: 1044754 URL: http://svn.apache.org/viewvc?rev=1044754view=rev Log: Add a profile that might get PMD working in m2eclipse. Modified: cxf/trunk/parent/pom.xml Modified: cxf/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1044754r1=1044753r2=1044754view=diff == --- cxf/trunk/parent/pom.xml (original) +++ cxf/trunk/parent/pom.xml Sun Dec 12 01:53:42 2010 @@ -1561,6 +1561,47 @@ defaultGoalclean/defaultGoal /build /profile + profile + idm2eclipse/id + build + plugins +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-pmd-plugin/artifactId +version2.5/version +dependencies +dependency +groupIdorg.apache.cxf.build-utils/groupId +artifactIdcxf-buildtools/artifactId +version${cxf.build-utils.version}/version +/dependency +/dependencies +configuration +rulesets + ruleset${cxf.resources.base.path}cxf-pmd-ruleset.xml/ruleset +/rulesets +sourceEncodingUTF-8/sourceEncoding +targetJdk1.5/targetJdk +linkXReffalse/linkXRef +includeTeststrue/includeTests +verbosetrue/verbose +excludeRoots + excludeRoot${basedir}/src/main/generated/excludeRoot +/excludeRoots +/configuration +executions +execution +idvalidate/id +phasevalidate/phase +goals +goalcheck/goal +/goals +/execution +/executions +/plugin + /plugins + /build + /profile /profiles /project
svn commit: r1044753 - /cxf/trunk/etc/eclipse.prefs
Author: bimargulies Date: Sun Dec 12 01:53:36 2010 New Revision: 1044753 URL: http://svn.apache.org/viewvc?rev=1044753view=rev Log: Exported eclipse preferences as possible alternative to maven / ant automation. Added: cxf/trunk/etc/eclipse.prefs Added: cxf/trunk/etc/eclipse.prefs URL: http://svn.apache.org/viewvc/cxf/trunk/etc/eclipse.prefs?rev=1044753view=auto == --- cxf/trunk/etc/eclipse.prefs (added) +++ cxf/trunk/etc/eclipse.prefs Sun Dec 12 01:53:36 2010 @@ -0,0 +1,26 @@ +#Sat Dec 04 16:32:15 EST 2010 +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.cleanupprofiles=?xml version\=1.0 encoding\=UTF-8?\nprofiles version\=2\nprofile kind\=CleanUpProfile name\=CXF version\=2\nsetting id\=cleanup.always_use_blocks value\=true/\nsetting id\=cleanup.use_this_for_non_static_field_access_only_if_necessary value\=true/\nsetting id\=cleanup.use_this_for_non_static_field_access value\=false/\nsetting id\=cleanup.qualify_static_method_accesses_with_declaring_class value\=false/\nsetting id\=cleanup.remove_unused_private_fields value\=true/\nsetting id\=cleanup.remove_unnecessary_casts value\=true/\nsetting id\=cleanup.sort_members_all value\=true/\nsetting id\=cleanup.make_local_variable_final value\=true/\nsetting id\=cleanup.never_use_parentheses_in_expressions value\=true/\nsetting id\=cleanup.always_use_this_for_non_static_method_access value\=false/\nsetting id\=cleanup.convert_to_enhanced_for_loop val ue\=true/\nsetting id\=cleanup.remove_trailing_whitespaces value\=true/\nsetting id\=cleanup.qualify_static_field_accesses_with_declaring_class value\=false/\nsetting id\=cleanup.use_this_for_non_static_method_access_only_if_necessary value\=true/\nsetting id\=cleanup.always_use_parentheses_in_expressions value\=false/\nsetting id\=cleanup.remove_unused_private_types value\=true/\nsetting id\=cleanup.format_source_code value\=true/\nsetting id\=cleanup.qualify_static_member_accesses_through_instances_with_declaring_class value\=true/\nsetting id\=cleanup.remove_unused_local_variables value\=true/\nsetting id\=cleanup.add_missing_nls_tags value\=false/\nsetting id\=cleanup.add_missing_override_annotations value\=false/\nsetting id\=cleanup.add_missing_annotations value\=true/\nsetting id\=cleanup.use_this_for_non_static_method_access value\=false/\nsetting id\=cleanup.make_variable_declarations_final value\=false/\nsetting id\=cleanup.remove_private_constructors value\=true/\nsetting id\=cleanup.make_parameters_final value\=false/\nsetting id\=cleanup.remove_trailing_whitespaces_all value\=true/\nsetting id\=cleanup.add_generated_serial_version_id value\=false/\nsetting id\=cleanup.add_missing_deprecated_annotations value\=true/\nsetting id\=cleanup.organize_imports value\=true/\nsetting id\=cleanup.qualify_static_member_accesses_with_declaring_class value\=true/\nsetting id\=cleanup.remove_unnecessary_nls_tags value\=true/\nsetting id\=cleanup.always_use_this_for_non_static_field_access value\=false/\nsetting id\=cleanup.remove_trailing_whitespaces_ignore_empty value\=false/\nsetting id\=cleanup.use_parentheses_in_expressions value\=true/\nsetting id\=cleanup.never_use_blocks value\=false/\nsetting id\=cleanup.sort_members value\=false/\nsetting id\=cleanup.qualify_static_member_accesse s_through_subtypes_with_declaring_class value\=true/\nsetting id\=cleanup.use_blocks_only_for_return_and_throw value\=false/\nsetting id\=cleanup.add_default_serial_version_id value\=true/\nsetting id\=cleanup.add_serial_version_id value\=false/\nsetting id\=cleanup.use_blocks value\=true/\nsetting id\=cleanup.make_private_fields_final value\=true/\nsetting id\=cleanup.remove_unused_imports value\=true/\nsetting id\=cleanup.remove_unused_private_methods value\=true/\nsetting id\=cleanup.remove_unused_private_members value\=false/\n/profile\n/profiles\n +/instance/org.eclipse.jdt.ui/formatter_settings_version=11 +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles.version=11 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_code_templates=?xml version\=1.0 encoding\=UTF-8 standalone\=no?templatestemplate autoinsert\=true context\=gettercomment_context deleted\=false description\=Comment for getter method enabled\=true id\=org.eclipse.jdt.ui.text.codetemplates.gettercomment name\=gettercomment/** * @return Returns the ${bare_field_name}.\n *//templatetemplate autoinsert\=true context\=settercomment_context deleted\=false description\=Comment for setter method enabled\=true id\=org.eclipse.jdt.ui.text.codetemplates.settercomment name\=settercomment/**\n * @param ${param} The ${bare_field_name} to set.\n *//templatetemplate autoinsert\=false context\=filecomment_context deleted\=false description\=Comment for created Java files enabled\=true id
svn commit: r1042166 - /cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
Author: bimargulies Date: Sat Dec 4 13:19:44 2010 New Revision: 1042166 URL: http://svn.apache.org/viewvc?rev=1042166view=rev Log: CXF-3142 Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1042166r1=1042165r2=1042166view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Sat Dec 4 13:19:44 2010 @@ -22,7 +22,8 @@ package org.apache.cxf; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; -import java.lang.ref.WeakReference; +import java.lang.ref.Reference; +import java.lang.ref.SoftReference; import java.util.Iterator; import java.util.Map; import java.util.WeakHashMap; @@ -33,15 +34,15 @@ import org.apache.cxf.common.classloader import org.apache.cxf.common.logging.LogUtils; /** - * Factory to create CXF Bus objects. + * Factory to create CXF Bus objects. * pCXF includes a large number of components that provide services, such - * as WSDL parsing, and message processing. To avoid creating these objects over and over, and to + * as WSDL parsing, and message processing. To avoid creating these objects over and over, and to * allow them to be shared easily, they are associated with a data structure called a bus. * /p * p * You don't ever have to explicitly create or manipulate bus objects. If you simply use the CXF - * or JAX-WS APIs to create clients or servers, CXF will create an default bus for you. You would create a bus - * explicitly if you need to customize components on the bus or maintain several independent buses + * or JAX-WS APIs to create clients or servers, CXF will create a default bus for you. You can create a bus + * explicitly if you need to customize components on the bus or maintain several independent buses * with independent configurations. * /p * p @@ -53,8 +54,8 @@ import org.apache.cxf.common.logging.Log * If you create a bus when there is no default bus in effect, that bus will become the default bus. * /p * p - * This class holds strongweak/strong references to the global default bus and the per-thread default - * busses. Thus, if you create and customize a bus, you must retain a reference to it if you want it to be + * This class holds strongsoft/strong references to the global default bus. + * Thus, if you create and customize a bus, you must retain a reference to it if you want it to be * protected from garbage collection. If you do not, you might experience the following unexpected chain of * events, especially in a client: * ol @@ -64,6 +65,11 @@ import org.apache.cxf.common.logging.Log * liCreate a new CXF object./li * liImplicitly create a new, default, bus./li * /ol + * Note that the per-thread default busses are maintained in a WeakHashMap from threads to busses. + * Thus, so long as the thread remains alive + * there will be a strong reference to the bus, and it will not get garbage-collected. + * If you want to recover memory used CXF, you can set + * the per-thread default bus to null, explicitly. * /p */ public abstract class BusFactory { @@ -71,22 +77,22 @@ public abstract class BusFactory { public static final String BUS_FACTORY_PROPERTY_NAME = org.apache.cxf.bus.factory; public static final String DEFAULT_BUS_FACTORY = org.apache.cxf.bus.CXFBusFactory; -protected static WeakReferenceBus defaultBus; -protected static MapThread, Bus threadBusses = new WeakHashMapThread, Bus(); +protected static ReferenceBus defaultBus; +protected static MapThread, ReferenceBus threadBusses = new WeakHashMapThread, ReferenceBus(); private static final Logger LOG = LogUtils.getL7dLogger(BusFactory.class, APIMessages); /** * Creates a new bus. While concrete codeBusFactory/code may offer differently parameterized methods * for creating a bus, all factories support this no-arg factory method. - * + * * @return the newly created bus. */ public abstract Bus createBus(); /** * Returns the default bus, creating it if necessary. - * + * * @return the default bus. */ public static synchronized Bus getDefaultBus() { @@ -95,13 +101,13 @@ public abstract class BusFactory { /** * Returns the default bus - * + * * @param createIfNeeded Set to true to create a default bus if one doesn't exist * @return the default bus. */ public static synchronized Bus getDefaultBus(boolean createIfNeeded) { if ((defaultBus == null || defaultBus.get() == null) createIfNeeded) { -defaultBus = new WeakReferenceBus(newInstance().createBus
svn commit: r1042167 - /cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java
Author: bimargulies Date: Sat Dec 4 13:19:53 2010 New Revision: 1042167 URL: http://svn.apache.org/viewvc?rev=1042167view=rev Log: Add a missing accessor for callers who prefer to call wait for themselves. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java?rev=1042167r1=1042166r2=1042167view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java Sat Dec 4 13:19:53 2010 @@ -28,36 +28,45 @@ import java.util.concurrent.TimeoutExcep import org.apache.cxf.message.Message; /** - * + * Asynchronous callback object for calls to {...@link Client#invoke(ClientCallback, String, Object...)} + * and related functions. + * + * The default behavior of this expects the following pattern: + * ol + * liClientCallback cb = new ClientCallback();/li + * liclient.invoke(cb, someMethod, );/li + * licb.wait();/li + * li// CXF calls notify on the callback object when the operation is complete./li + * /ol */ public class ClientCallback implements FutureObject[] { - + protected MapString, Object context; protected Object[] result; protected Throwable exception; protected volatile boolean done; protected boolean cancelled; protected boolean started; - + public ClientCallback() { } - + /** - * Called when a message is first received prior to any actions - * being applied to the message. The InterceptorChain is setup so + * Called when a message is first received prior to any actions + * being applied to the message. The InterceptorChain is setup so * modifications to that can be done. */ public void start(Message msg) { started = true; } - + /** * If the processing of the incoming message proceeds normally, this * method is called with the response context values and the resulting objects. - * + * * The default behavior just stores the objects and calls notifyAll to wake * up threads waiting for the response. - * + * * @param ctx * @param res */ @@ -69,14 +78,14 @@ public class ClientCallback implements F notifyAll(); } } - + /** * If processing of the incoming message results in an exception, this * method is called with the resulting exception. - * + * * The default behavior just stores the objects and calls notifyAll to wake * up threads waiting for the response. - * + * * @param ctx * @param ex */ @@ -88,8 +97,8 @@ public class ClientCallback implements F notifyAll(); } } - - + + public boolean cancel(boolean mayInterruptIfRunning) { if (!started) { cancelled = true; @@ -101,6 +110,12 @@ public class ClientCallback implements F return false; } +/** + * return the map of items returned from an operation. + * @return + * @throws InterruptedException if the operation was cancelled. + * @throws ExecutionException if the operation resulted in a fault. + */ public MapString, Object getResponseContext() throws InterruptedException, ExecutionException { synchronized (this) { if (!done) { @@ -115,7 +130,10 @@ public class ClientCallback implements F } return context; } - + +/** + * {...@inheritdoc} + */ public Object[] get() throws InterruptedException, ExecutionException { synchronized (this) { if (!done) { @@ -131,7 +149,10 @@ public class ClientCallback implements F return result; } -public Object[] get(long timeout, TimeUnit unit) +/** + * {...@inheritdoc} + */ +public Object[] get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { synchronized (this) { if (!done) { @@ -157,4 +178,12 @@ public class ClientCallback implements F public boolean isDone() { return done; } + +/* + * If the operation completes with a fault, the resulting exception object ends up here. + */ +public Throwable getException() { +return exception; +} + }
svn commit: r1042169 - /cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
Author: bimargulies Date: Sat Dec 4 13:20:01 2010 New Revision: 1042169 URL: http://svn.apache.org/viewvc?rev=1042169view=rev Log: CXF-3142. Reduce this to documentation. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1042169r1=1042168r2=1042169view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Sat Dec 4 13:20:01 2010 @@ -22,8 +22,6 @@ package org.apache.cxf; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; -import java.lang.ref.Reference; -import java.lang.ref.SoftReference; import java.util.Iterator; import java.util.Map; import java.util.WeakHashMap; @@ -54,22 +52,12 @@ import org.apache.cxf.common.logging.Log * If you create a bus when there is no default bus in effect, that bus will become the default bus. * /p * p - * This class holds strongsoft/strong references to the global default bus. - * Thus, if you create and customize a bus, you must retain a reference to it if you want it to be - * protected from garbage collection. If you do not, you might experience the following unexpected chain of - * events, especially in a client: - * ol - * liCreate a bus and customize it. Fail to hold a reference./li - * liRelease all references to CXF objects./li - * liGC collects the Bus./li - * liCreate a new CXF object./li - * liImplicitly create a new, default, bus./li - * /ol - * Note that the per-thread default busses are maintained in a WeakHashMap from threads to busses. + * This class holds a reference to the global default bus and a reference to each thread default + * bus. The thread references are weak with respect to the threads, but otherwise ordinary. * Thus, so long as the thread remains alive * there will be a strong reference to the bus, and it will not get garbage-collected. * If you want to recover memory used CXF, you can set - * the per-thread default bus to null, explicitly. + * the default and per-thread default bus to null, explicitly. * /p */ public abstract class BusFactory { @@ -77,8 +65,8 @@ public abstract class BusFactory { public static final String BUS_FACTORY_PROPERTY_NAME = org.apache.cxf.bus.factory; public static final String DEFAULT_BUS_FACTORY = org.apache.cxf.bus.CXFBusFactory; -protected static ReferenceBus defaultBus; -protected static MapThread, ReferenceBus threadBusses = new WeakHashMapThread, ReferenceBus(); +protected static Bus defaultBus; +protected static MapThread, Bus threadBusses = new WeakHashMapThread, Bus(); private static final Logger LOG = LogUtils.getL7dLogger(BusFactory.class, APIMessages); @@ -106,14 +94,14 @@ public abstract class BusFactory { * @return the default bus. */ public static synchronized Bus getDefaultBus(boolean createIfNeeded) { -if ((defaultBus == null || defaultBus.get() == null) createIfNeeded) { -defaultBus = new SoftReferenceBus(newInstance().createBus()); +if (defaultBus == null createIfNeeded) { +defaultBus = newInstance().createBus(); } if (defaultBus == null) { // never set up. return null; } else { -return defaultBus.get(); +return defaultBus; } } @@ -126,7 +114,7 @@ public abstract class BusFactory { if (bus == null) { defaultBus = null; } else { -defaultBus = new SoftReferenceBus(bus); +defaultBus = bus; } setThreadDefaultBus(bus); } @@ -138,7 +126,7 @@ public abstract class BusFactory { */ public static void setThreadDefaultBus(Bus bus) { synchronized (threadBusses) { -threadBusses.put(Thread.currentThread(), new SoftReferenceBus(bus)); +threadBusses.put(Thread.currentThread(), bus); } } @@ -158,23 +146,19 @@ public abstract class BusFactory { * @return the default bus. */ public static Bus getThreadDefaultBus(boolean createIfNeeded) { -ReferenceBus threadBus; +Bus threadBus; synchronized (threadBusses) { if (createIfNeeded) { threadBus = threadBusses.get(Thread.currentThread()); -if (createIfNeeded (threadBus == null || threadBus.get() == null)) { -threadBus = new SoftReferenceBus(getDefaultBus(true)); +if (createIfNeeded threadBus == null) { +threadBus = getDefaultBus(true); threadBusses.put(Thread.currentThread(), threadBus); } } else { threadBus
svn commit: r1037498 - /cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
Author: bimargulies Date: Sun Nov 21 16:18:58 2010 New Revision: 1037498 URL: http://svn.apache.org/viewvc?rev=1037498view=rev Log: CXF-3143: don't leak proxies Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?rev=1037498r1=1037497r2=1037498view=diff == --- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java (original) +++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java Sun Nov 21 16:18:58 2010 @@ -81,7 +81,11 @@ public final class SOAPBindingUtil { public static T T getProxy(ClassT cls, Object obj) { InvocationHandler ih = new ExtensionInvocationHandler(obj); -Object proxy = Proxy.newProxyInstance(cls.getClassLoader(), new Class[] {cls}, ih); +/* + * If we put proxies into the loader of the proxied class, they'll just pile up. + */ +Object proxy = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), + new Class[] {cls}, ih); return cls.cast(proxy); }
svn commit: r1037346 - in /cxf/trunk: api/src/main/java/org/apache/cxf/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/core/src/test/java/org/apache/cxf/bus/spring/
Author: bimargulies Date: Sat Nov 20 22:31:29 2010 New Revision: 1037346 URL: http://svn.apache.org/viewvc?rev=1037346view=rev Log: Hold the defaultBus as a weak reference: CXF-3142. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1037346r1=1037345r2=1037346view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Sat Nov 20 22:31:29 2010 @@ -22,6 +22,7 @@ package org.apache.cxf; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; +import java.lang.ref.WeakReference; import java.util.Iterator; import java.util.Map; import java.util.WeakHashMap; @@ -36,7 +37,7 @@ public abstract class BusFactory { public static final String BUS_FACTORY_PROPERTY_NAME = org.apache.cxf.bus.factory; public static final String DEFAULT_BUS_FACTORY = org.apache.cxf.bus.CXFBusFactory; -protected static Bus defaultBus; +protected static WeakReferenceBus defaultBus; protected static MapThread, Bus threadBusses = new WeakHashMapThread, Bus(); private static final Logger LOG = LogUtils.getL7dLogger(BusFactory.class, APIMessages); @@ -67,11 +68,16 @@ public abstract class BusFactory { * @return the default bus. */ public static synchronized Bus getDefaultBus(boolean createIfNeeded) { -if (defaultBus == null +if ((defaultBus == null || defaultBus.get() == null) createIfNeeded) { -defaultBus = newInstance().createBus(); +defaultBus = new WeakReferenceBus(newInstance().createBus()); +} +if (defaultBus == null) { +// never set up. +return null; +} else { +return defaultBus.get(); } -return defaultBus; } /** @@ -79,7 +85,11 @@ public abstract class BusFactory { * @param bus the default bus. */ public static synchronized void setDefaultBus(Bus bus) { -defaultBus = bus; +if (bus == null) { +defaultBus = null; +} else { +defaultBus = new WeakReferenceBus(bus); +} setThreadDefaultBus(bus); } @@ -154,11 +164,12 @@ public abstract class BusFactory { threadBusses.put(Thread.currentThread(), bus); } } - -if (defaultBus == null) { -defaultBus = bus; +// The default bus may have gc-ed itself out of existence, in which case we +// take over for it. +if (defaultBus == null || defaultBus.get() == null) { +defaultBus = new WeakReferenceBus(bus); return true; -} +} return false; } Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java?rev=1037346r1=1037345r2=1037346view=diff == --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java Sat Nov 20 22:31:29 2010 @@ -118,5 +118,6 @@ public class ClassLoaderSwitcher { } } System.getProperties().putAll(origProps); +origContextClassloader = null; // don't hold a reference. } } Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java?rev=1037346r1=1037345r2=1037346view=diff == --- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java (original) +++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java Sat Nov 20 22:31:29 2010 @@ -169,7 +169,7 @@ public class SpringBusFactoryTest extend assertTrue(@PostConstruct annotated method has not been called., te.postConstructMethodCalled); assertTrue(@PreDestroy annoated method has been called already., !te.preDestroyMethodCalled); bus.shutdown(true); -assertTrue(@PreDestroy annoated method has
svn commit: r1037355 - /cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
Author: bimargulies Date: Sat Nov 20 23:30:59 2010 New Revision: 1037355 URL: http://svn.apache.org/viewvc?rev=1037355view=rev Log: Add javadoc to the BusFactory, particularly to reflect CXF-3142. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1037355r1=1037354r2=1037355view=diff == --- cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Sat Nov 20 23:30:59 2010 @@ -32,8 +32,42 @@ import java.util.logging.Logger; import org.apache.cxf.common.classloader.ClassLoaderUtils; import org.apache.cxf.common.logging.LogUtils; +/** + * Factory to create CXF Bus objects. + * pCXF includes a large number of components that provide services, such + * as WSDL parsing, and message processing. To avoid creating these objects over and over, and to + * allow them to be shared easily, they are associated with a data structure called a bus. + * /p + * p + * You don't ever have to explicitly create or manipulate bus objects. If you simply use the CXF + * or JAX-WS APIs to create clients or servers, CXF will create an default bus for you. You would create a bus + * explicitly if you need to customize components on the bus or maintain several independent buses + * with independent configurations. + * /p + * p + * This class maintains the default bus for the entire process and a set of thread-default buses. All CXF + * components that reference the bus, which is to say all CXF components, will obtain a default bus from this + * class if you do not set a specific bus. + * /p + * p + * If you create a bus when there is no default bus in effect, that bus will become the default bus. + * /p + * p + * This class holds strongweak/strong references to the global default bus and the per-thread default + * busses. Thus, if you create and customize a bus, you must retain a reference to it if you want it to be + * protected from garbage collection. If you do not, you might experience the following unexpected chain of + * events, especially in a client: + * ol + * liCreate a bus and customize it. Fail to hold a reference./li + * liRelease all references to CXF objects./li + * liGC collects the Bus./li + * liCreate a new CXF object./li + * liImplicitly create a new, default, bus./li + * /ol + * /p + */ public abstract class BusFactory { - + public static final String BUS_FACTORY_PROPERTY_NAME = org.apache.cxf.bus.factory; public static final String DEFAULT_BUS_FACTORY = org.apache.cxf.bus.CXFBusFactory; @@ -41,18 +75,15 @@ public abstract class BusFactory { protected static MapThread, Bus threadBusses = new WeakHashMapThread, Bus(); private static final Logger LOG = LogUtils.getL7dLogger(BusFactory.class, APIMessages); - -/** - * Creates a new bus. - * While concrete codeBusFactory/code may offer differently - * parameterized methods for creating a bus, all factories support - * this no-arg factory method. - * +/** + * Creates a new bus. While concrete codeBusFactory/code may offer differently parameterized methods + * for creating a bus, all factories support this no-arg factory method. + * * @return the newly created bus. */ public abstract Bus createBus(); - + /** * Returns the default bus, creating it if necessary. * @@ -61,15 +92,15 @@ public abstract class BusFactory { public static synchronized Bus getDefaultBus() { return getDefaultBus(true); } - + /** * Returns the default bus + * * @param createIfNeeded Set to true to create a default bus if one doesn't exist * @return the default bus. */ public static synchronized Bus getDefaultBus(boolean createIfNeeded) { -if ((defaultBus == null || defaultBus.get() == null) - createIfNeeded) { +if ((defaultBus == null || defaultBus.get() == null) createIfNeeded) { defaultBus = new WeakReferenceBus(newInstance().createBus()); } if (defaultBus == null) { @@ -79,9 +110,10 @@ public abstract class BusFactory { return defaultBus.get(); } } - + /** * Sets the default bus. + * * @param bus the default bus. */ public static synchronized void setDefaultBus(Bus bus) { @@ -92,10 +124,10 @@ public abstract class BusFactory { } setThreadDefaultBus(bus); } - - + /** * Sets the default bus for the thread. + * * @param bus the default bus. */ public static void setThreadDefaultBus(Bus bus) { @@ -103,16 +135,19 @@ public abstract class BusFactory { threadBusses.put
svn commit: r1036065 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
Author: bimargulies Date: Wed Nov 17 14:38:44 2010 New Revision: 1036065 URL: http://svn.apache.org/viewvc?rev=1036065view=rev Log: CXF-3130: just catch Throwable as per Dan's suggestion Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java?rev=1036065r1=1036064r2=1036065view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Wed Nov 17 14:38:44 2010 @@ -420,11 +420,8 @@ public class AnnotationReader { private static Class? extends Annotation load(String name) { try { return AnnotationReader.class.getClassLoader().loadClass(name).asSubclass(Annotation.class); -} catch (ClassNotFoundException e) { -LOG.log(Level.WARNING, Class + name + not found., e); -return null; -} catch (ExceptionInInitializerError e2) { -LOG.log(Level.WARNING, Initialization error loading + name + not found., e2); +} catch (Throwable e) { +LOG.log(Level.WARNING, Error loading annotation class + name + ., e); return null; } }
svn commit: r1035787 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
Author: bimargulies Date: Tue Nov 16 20:30:02 2010 New Revision: 1035787 URL: http://svn.apache.org/viewvc?rev=1035787view=rev Log: CXF-3130: ExceptionInInitializerErrors should get the same treatment as ClassNotFoundException when processing annotations Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java?rev=1035787r1=1035786r2=1035787view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java Tue Nov 16 20:30:02 2010 @@ -21,10 +21,14 @@ package org.apache.cxf.aegis.type.java5; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Method; +import java.util.logging.Level; +import java.util.logging.Logger; import org.apache.cxf.aegis.type.AegisType; +import org.apache.cxf.common.logging.LogUtils; public class AnnotationReader { +private static final Logger LOG = LogUtils.getL7dLogger(AnnotationReader.class); private static final Class? extends Annotation WEB_PARAM = load(javax.jws.WebParam); private static final Class? extends Annotation WEB_RESULT = load(javax.jws.WebResult); private static final Class? extends Annotation XML_ATTRIBUTE = @@ -37,21 +41,21 @@ public class AnnotationReader { load(javax.xml.bind.annotation.XmlType); private static final Class? extends Annotation XML_TRANSIENT = load(javax.xml.bind.annotation.XmlTransient); - + private static final Class? extends Annotation XFIRE_IGNORE_PROPERTY = -load(org.codehaus.xfire.aegis.type.java5.IgnoreProperty); +load(org.codehaus.xfire.aegis.type.java5.IgnoreProperty); private static final Class? extends Annotation XFIRE_XML_ATTRIBUTE = -load(org.codehaus.xfire.aegis.type.java5.XmlAttribute); +load(org.codehaus.xfire.aegis.type.java5.XmlAttribute); private static final Class? extends Annotation XFIRE_XML_ELEMENT = -load(org.codehaus.xfire.aegis.type.java5.XmlElement); +load(org.codehaus.xfire.aegis.type.java5.XmlElement); private static final Class? extends Annotation XFIRE_XML_TYPE = load(org.codehaus.xfire.aegis.type.java5.XmlType); private static final Class? extends Annotation XFIRE_XML_PARAM_TYPE = load(org.codehaus.xfire.aegis.type.java5.XmlParamType); private static final Class? extends Annotation XFIRE_XML_RETURN_TYPE = load(org.codehaus.xfire.aegis.type.java5.XmlReturnType); - - + + @SuppressWarnings(unchecked) public boolean isIgnored(AnnotatedElement element) { return isAnnotationPresent(element, @@ -326,7 +330,7 @@ public class AnnotationReader { AnnotatedElement element, Object ignoredValue, Class? extends Annotation... annotations) { - + for (Class? annotation : annotations) { if (annotation != null) { try { @@ -371,7 +375,7 @@ public class AnnotationReader { int index, Object ignoredValue, Class? extends Annotation... annotations) { - + if (method.getParameterAnnotations() == null || method.getParameterAnnotations().length = index || method.getParameterAnnotations()[index] == null) { @@ -417,6 +421,10 @@ public class AnnotationReader { try { return AnnotationReader.class.getClassLoader().loadClass(name).asSubclass(Annotation.class); } catch (ClassNotFoundException e) { +LOG.log(Level.WARNING, Class + name + not found., e); +return null; +} catch (ExceptionInInitializerError e2) { +LOG.log(Level.WARNING, Initialization error loading + name + not found., e2); return null; } }
svn commit: r1031075 - in /cxf/trunk: api/pom.xml common/common/pom.xml common/wstx-msv-validation/pom.xml common/xerces-xsd-validation/pom.xml parent/pom.xml rt/core/pom.xml tools/corba/pom.xml tools
Author: bimargulies Date: Thu Nov 4 16:49:28 2010 New Revision: 1031075 URL: http://svn.apache.org/viewvc?rev=1031075view=rev Log: Move to new Maven coordinates for XMLSchema. Modified: cxf/trunk/api/pom.xml cxf/trunk/common/common/pom.xml cxf/trunk/common/wstx-msv-validation/pom.xml cxf/trunk/common/xerces-xsd-validation/pom.xml cxf/trunk/parent/pom.xml cxf/trunk/rt/core/pom.xml cxf/trunk/tools/corba/pom.xml cxf/trunk/tools/validator/pom.xml Modified: cxf/trunk/api/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/api/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/api/pom.xml (original) +++ cxf/trunk/api/pom.xml Thu Nov 4 16:49:28 2010 @@ -51,8 +51,8 @@ /dependency dependency -groupIdorg.apache.ws.commons.schema/groupId -artifactIdXmlSchema/artifactId + groupIdorg.apache.ws.xmlschema/groupId + artifactIdxmlschema-core/artifactId /dependency dependency Modified: cxf/trunk/common/common/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/common/common/pom.xml (original) +++ cxf/trunk/common/common/pom.xml Thu Nov 4 16:49:28 2010 @@ -77,8 +77,8 @@ /dependency dependency -groupIdorg.apache.ws.commons.schema/groupId -artifactIdXmlSchema/artifactId + groupIdorg.apache.ws.xmlschema/groupId + artifactIdxmlschema-core/artifactId /dependency dependency Modified: cxf/trunk/common/wstx-msv-validation/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/common/wstx-msv-validation/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/common/wstx-msv-validation/pom.xml (original) +++ cxf/trunk/common/wstx-msv-validation/pom.xml Thu Nov 4 16:49:28 2010 @@ -62,8 +62,8 @@ /exclusions /dependency dependency -groupIdorg.apache.ws.commons.schema/groupId -artifactIdXmlSchema/artifactId + groupIdorg.apache.ws.xmlschema/groupId + artifactIdxmlschema-core/artifactId /dependency /dependencies profiles Modified: cxf/trunk/common/xerces-xsd-validation/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/common/xerces-xsd-validation/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/common/xerces-xsd-validation/pom.xml (original) +++ cxf/trunk/common/xerces-xsd-validation/pom.xml Thu Nov 4 16:49:28 2010 @@ -52,8 +52,8 @@ scopetest/scope /dependency dependency - groupIdorg.apache.ws.commons.schema/groupId - artifactIdXmlSchema/artifactId + groupIdorg.apache.ws.xmlschema/groupId + artifactIdxmlschema-core/artifactId /dependency dependency groupIdxerces/groupId Modified: cxf/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/parent/pom.xml (original) +++ cxf/trunk/parent/pom.xml Thu Nov 4 16:49:28 2010 @@ -570,8 +570,8 @@ /exclusions /dependency dependency -groupIdorg.apache.ws.commons.schema/groupId -artifactIdXmlSchema/artifactId +groupIdorg.apache.ws.xmlschema/groupId +artifactIdxmlschema-core/artifactId version${cxf.xmlschema.version}/version exclusions !-- on IBM jdk, XmlSchema pulls these in -- Modified: cxf/trunk/rt/core/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/rt/core/pom.xml (original) +++ cxf/trunk/rt/core/pom.xml Thu Nov 4 16:49:28 2010 @@ -62,8 +62,8 @@ /dependency dependency -groupIdorg.apache.ws.commons.schema/groupId -artifactIdXmlSchema/artifactId + groupIdorg.apache.ws.xmlschema/groupId + artifactIdxmlschema-core/artifactId /dependency dependency Modified: cxf/trunk/tools/corba/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/pom.xml?rev=1031075r1=1031074r2=1031075view=diff == --- cxf/trunk/tools/corba/pom.xml (original) +++ cxf/trunk/tools/corba/pom.xml Thu Nov 4 16:49:28 2010 @@ -64,8 +64,8 @@ artifactIdantlr/artifactId /dependency dependency
svn commit: r1031124 - in /cxf/trunk: rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ systests/databinding/ systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/
Author: bimargulies Date: Thu Nov 4 18:21:42 2010 New Revision: 1031124 URL: http://svn.apache.org/viewvc?rev=1031124view=rev Log: CXF-3056: package non-optimized MTOM as streams to match optimized (in Aegis) Added: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java (with props) Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java cxf/trunk/systests/databinding/pom.xml cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java?rev=1031124r1=1031123r2=1031124view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java Thu Nov 4 18:21:42 2010 @@ -18,21 +18,24 @@ */ package org.apache.cxf.aegis.type.mtom; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.UnsupportedEncodingException; import javax.activation.DataHandler; import org.apache.cxf.aegis.Context; import org.apache.cxf.attachment.AttachmentImpl; -import org.apache.cxf.helpers.HttpHeaderHelper; import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.message.Attachment; +/** + * Binding for {...@link javax.activation.DataHandler}. This assumes that the DataHandler will always + * contain a {...@link javax.activation.DataSource}, not data in the Object. + */ public class DataHandlerType extends AbstractXOPType { - + public DataHandlerType(boolean useXmimeContentType, String expectedContentTypes) { super(useXmimeContentType, expectedContentTypes); } @@ -59,27 +62,9 @@ public class DataHandlerType extends Abs @Override protected Object wrapBytes(byte[] bareBytes, String contentType) { -// for the benefit of those who are working with string data, we have the following -// trickery -String charset = null; -if (contentType != null - contentType.indexOf(text/) != -1 - contentType.indexOf(charset) != -1) { -charset = contentType.substring(contentType.indexOf(charset) + 8); -if (charset.indexOf(;) != -1) { -charset = charset.substring(0, charset.indexOf(;)); -} -} -String normalizedEncoding = HttpHeaderHelper.mapCharset(charset, UTF-8); -try { -String stringData = new String(bareBytes, normalizedEncoding); -return new DataHandler(stringData, contentType); -} catch (UnsupportedEncodingException e) { -// this space intentionally left blank. -} -return new DataHandler(bareBytes, contentType); +return new DataHandler(new StreamDataSource(contentType, new ByteArrayInputStream(bareBytes))); } - + @Override protected byte[] getBytes(Object object) { DataHandler handler = (DataHandler) object; Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java?rev=1031124r1=1031123r2=1031124view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java Thu Nov 4 18:21:42 2010 @@ -18,6 +18,7 @@ */ package org.apache.cxf.aegis.type.mtom; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -30,6 +31,9 @@ import org.apache.cxf.attachment.Attachm import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.message.Attachment; +/** + * Binding for {...@link javax.activation.DataSource}. + */ public class DataSourceType extends AbstractXOPType { public DataSourceType(boolean useXmimeBinaryType, String expectedContentTypes) { super(useXmimeBinaryType, expectedContentTypes); @@ -57,7 +61,7 @@ public class DataSourceType extends Abst @Override protected Object wrapBytes(byte[] bareBytes, String contentType) { -return new DataHandler(bareBytes, contentType).getDataSource(); +return new StreamDataSource(contentType, new
svn commit: r1031158 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java
Author: bimargulies Date: Thu Nov 4 19:04:58 2010 New Revision: 1031158 URL: http://svn.apache.org/viewvc?rev=1031158view=rev Log: Fix 1.5 compile problem. Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java?rev=1031158r1=1031157r2=1031158view=diff == --- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java (original) +++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java Thu Nov 4 19:04:58 2010 @@ -39,25 +39,21 @@ public class StreamDataSource implements } /** {...@inheritdoc}*/ -@Override public String getContentType() { return contentType; } /** {...@inheritdoc}*/ -@Override public InputStream getInputStream() throws IOException { return stream; } /** {...@inheritdoc}*/ -@Override public String getName() { return null; } /** {...@inheritdoc}*/ -@Override public OutputStream getOutputStream() throws IOException { return null; }
svn commit: r1031214 - in /cxf/trunk/distribution/src/main/release: lib/WHICH_JARS release_notes.txt
Author: bimargulies Date: Thu Nov 4 20:21:21 2010 New Revision: 1031214 URL: http://svn.apache.org/viewvc?rev=1031214view=rev Log: Make it easier for new users to get started with their classpaths. Modified: cxf/trunk/distribution/src/main/release/lib/WHICH_JARS cxf/trunk/distribution/src/main/release/release_notes.txt Modified: cxf/trunk/distribution/src/main/release/lib/WHICH_JARS URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/lib/WHICH_JARS?rev=1031214r1=1031213r2=1031214view=diff == --- cxf/trunk/distribution/src/main/release/lib/WHICH_JARS (original) +++ cxf/trunk/distribution/src/main/release/lib/WHICH_JARS Thu Nov 4 20:21:21 2010 @@ -3,6 +3,9 @@ dependencies, and many optional dependen contains the cxf.jar split up into smaller pieces if you wish to use only specific parts of CXF. +The 'manifest jar' is a jar containing only a MANIFEST.MF with a classpath +that calls in all the other jar. + Jars marked with a [6] at the end are optional for Java 6 (update 4 or later is supported) as the functionality provided by those jars are provided in the JDK. Modified: cxf/trunk/distribution/src/main/release/release_notes.txt URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/release_notes.txt?rev=1031214r1=1031213r2=1031214view=diff == --- cxf/trunk/distribution/src/main/release/release_notes.txt (original) +++ cxf/trunk/distribution/src/main/release/release_notes.txt Thu Nov 4 20:21:21 2010 @@ -77,14 +77,22 @@ After installing Apache Ant, add the An For more details, see the Installation Guide. +3. Integrating CXF Into You Application -3. Building the Samples +If you use Maven to build your application, you need merely add +appropriate dependencies. See the pom.xml files in the samples. + +If you don't use Maven, you'll need to add one or more jars to your +classpath. The file lib/WHICH_JARS should help you decide which +jars you need. + +4. Building the Samples Building the samples included in the binary distribution is easy. Change to the samples directory and follow the build instructions in the README.txt file included with each sample. -4. Reporting Problems +5. Reporting Problems If you have any problems or want to send feedback of any kind, please e-mail the CXF dev list, d...@cxf.apache.org. You can also file issues in JIRA at: @@ -92,7 +100,7 @@ CXF dev list, d...@cxf.apache.org. You c http://issues.apache.org/jira/browse/CXF -5. Migration notes: +6. Migration notes: See the migration guide at: http://cxf.apache.org/docs/23-migration-guide.html
svn commit: r1030541 - in /cxf/trunk/benchmark/performance: base/pom.xml soap_http_doc_lit/pom.xml
Author: bimargulies Date: Wed Nov 3 17:11:57 2010 New Revision: 1030541 URL: http://svn.apache.org/viewvc?rev=1030541view=rev Log: Fix versions. Modified: cxf/trunk/benchmark/performance/base/pom.xml cxf/trunk/benchmark/performance/soap_http_doc_lit/pom.xml Modified: cxf/trunk/benchmark/performance/base/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/benchmark/performance/base/pom.xml?rev=1030541r1=1030540r2=1030541view=diff == --- cxf/trunk/benchmark/performance/base/pom.xml (original) +++ cxf/trunk/benchmark/performance/base/pom.xml Wed Nov 3 17:11:57 2010 @@ -25,10 +25,11 @@ nameApache CXF Benchmark Base/name urlhttp://cxf.apache.org/url properties -cxf.version2.2.1-SNAPSHOT/cxf.version +cxf.version2.4.0-SNAPSHOT/cxf.version /properties build + defaultGoalinstall/defaultGoal pluginManagement plugins plugin Modified: cxf/trunk/benchmark/performance/soap_http_doc_lit/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/benchmark/performance/soap_http_doc_lit/pom.xml?rev=1030541r1=1030540r2=1030541view=diff == --- cxf/trunk/benchmark/performance/soap_http_doc_lit/pom.xml (original) +++ cxf/trunk/benchmark/performance/soap_http_doc_lit/pom.xml Wed Nov 3 17:11:57 2010 @@ -26,7 +26,7 @@ urlhttp://cxf.apache.org/url properties -cxf.version2.2.1-SNAPSHOT/cxf.version +cxf.version2.4.0-SNAPSHOT/cxf.version /properties dependencies dependency @@ -62,6 +62,7 @@ /dependencies build + defaultGoalinstall/defaultGoal plugins plugin groupIdorg.apache.cxf/groupId
svn commit: r1026682 - in /cxf/trunk: distribution/src/main/release/samples/aegis/src/demo/hw/client/ distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/ distributi
Author: bimargulies Date: Sat Oct 23 21:36:34 2010 New Revision: 1026682 URL: http://svn.apache.org/viewvc?rev=1026682view=rev Log: Make some unit tests use the new API. Modified: cxf/trunk/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java cxf/trunk/distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/Client.java cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java cxf/trunk/distribution/src/main/release/samples/jax_server_aegis_client/src/demo/hw/client/Client.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/intf/InterfaceInheritanceTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/DOMMappingTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/FlatArrayTest.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Modified: cxf/trunk/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java?rev=1026682r1=1026681r2=1026682view=diff == --- cxf/trunk/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java (original) +++ cxf/trunk/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java Sat Oct 23 21:36:34 2010 @@ -36,14 +36,13 @@ public final class Client { public static void main(String args[]) throws Exception { ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); -factory.setServiceClass(HelloWorld.class); if (args != null args.length 0 !.equals(args[0])) { factory.setAddress(args[0]); } else { factory.setAddress(http://localhost:9000/Hello;); } factory.getServiceFactory().setDataBinding(new AegisDatabinding()); -HelloWorld client = (HelloWorld)factory.create(); +HelloWorld client = factory.create(HelloWorld.class); System.out.println(Invoke sayHi()); System.out.println(client.sayHi(System.getProperty(user.name))); Document doc = client.getADocument(); Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/Client.java URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/Client.java?rev=1026682r1=1026681r2=1026682view=diff == --- cxf/trunk/distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/Client.java (original) +++ cxf/trunk/distribution/src/main/release/samples/java_first_jaxws_factory_bean/src/demo/hw/client/Client.java Sat Oct 23 21:36:34 2010 @@ -35,9 +35,8 @@ public final class Client { JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.getInInterceptors().add(new LoggingInInterceptor()); factory.getOutInterceptors().add(new LoggingOutInterceptor()); -factory.setServiceClass(HelloWorld.class); factory.setAddress(http://localhost:9000/helloWorld;); -HelloWorld client = (HelloWorld) factory.create(); +HelloWorld client = factory.create(HelloWorld.class); System.out.println(client.sayHi(World)); } Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java?rev=1026682r1=1026681r2=1026682view=diff == --- cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java (original) +++ cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java Sat Oct 23 21:36:34 2010 @@ -71,10 +71,9 @@ public final class ClientJMS
svn commit: r1023739 - /cxf/trunk/common/common/pom.xml
Author: bimargulies Date: Mon Oct 18 11:12:26 2010 New Revision: 1023739 URL: http://svn.apache.org/viewvc?rev=1023739view=rev Log: CXF-3051: missed an edit error Modified: cxf/trunk/common/common/pom.xml Modified: cxf/trunk/common/common/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/pom.xml?rev=1023739r1=1023738r2=1023739view=diff == --- cxf/trunk/common/common/pom.xml (original) +++ cxf/trunk/common/common/pom.xml Mon Oct 18 11:12:26 2010 @@ -178,7 +178,7 @@ scopetest/scope /dependency dependency -groupIdcxf.saaj.impl.groupId}/groupId +groupId${cxf.saaj.impl.groupId}/groupId artifactId${cxf.saaj.impl.artifactId}/artifactId scopetest/scope /dependency
svn commit: r1023841 - /cxf/trunk/rt/frontend/jaxws/pom.xml
Author: bimargulies Date: Mon Oct 18 15:19:27 2010 New Revision: 1023841 URL: http://svn.apache.org/viewvc?rev=1023841view=rev Log: CXF-3051: missed an edit error Modified: cxf/trunk/rt/frontend/jaxws/pom.xml Modified: cxf/trunk/rt/frontend/jaxws/pom.xml URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/pom.xml?rev=1023841r1=1023840r2=1023841view=diff == --- cxf/trunk/rt/frontend/jaxws/pom.xml (original) +++ cxf/trunk/rt/frontend/jaxws/pom.xml Mon Oct 18 15:19:27 2010 @@ -299,7 +299,7 @@ artifactIdgeronimo-annotation_1.0_spec/artifactId /dependency dependency -groupIdcxf.stax.impl.groupId}/groupId +groupId${cxf.stax.impl.groupId}/groupId artifactId${cxf.stax.impl.artifactId}/artifactId /dependency dependency
svn commit: r1023402 [9/9] - in /cxf/trunk: api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/service/model/ common/common/src/main/java/org/apache/cxf/common/xmlschema/ c
Modified: cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java?rev=1023402r1=1023401r2=1023402view=diff == --- cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java (original) +++ cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java Sun Oct 17 02:26:06 2010 @@ -44,12 +44,12 @@ import org.apache.ws.commons.schema.XmlS import org.apache.ws.commons.schema.XmlSchemaCollection; public class WSDLGenerationTester { - + private XmlSchemaCollection schemaCol = new XmlSchemaCollection(); -public WSDLGenerationTester() { +public WSDLGenerationTester() { } - + public void compare(XMLStreamReader orig, XMLStreamReader actual) throws Exception { @@ -90,7 +90,7 @@ public class WSDLGenerationTester { } private void compareStartElement(XMLStreamReader orig, XMLStreamReader actual) -throws Exception { +throws Exception { Assert.assertEquals(Start element is not matched, orig.getName(), actual.getName()); int origAttrCount = orig.getAttributeCount(); int actualAttrCount = actual.getAttributeCount(); @@ -102,7 +102,7 @@ public class WSDLGenerationTester { origAttrCount--; } else { Assert.assertEquals(Attribute + origAttrName + not found or value not matching, - orig.getAttributeValue(origAttrName.getNamespaceURI(), + orig.getAttributeValue(origAttrName.getNamespaceURI(), origAttrName.getLocalPart()), actual.getAttributeValue(origAttrName.getNamespaceURI(), origAttrName.getLocalPart())); @@ -114,27 +114,27 @@ public class WSDLGenerationTester { || (actualAttrName.getLocalPart().equals(schemaLocation))) { //skip this atribute actualAttrCount--; -} -} +} +} Assert.assertEquals(Attribute count is not matched for element + orig.getName(), origAttrCount, actualAttrCount); } - + private void compareEndElement(XMLStreamReader orig, XMLStreamReader actual) throws Exception { Assert.assertEquals(End element is not matched, orig.getName(), actual.getName()); } - + private void compareCharacters(XMLStreamReader orig, XMLStreamReader actual) throws Exception { Assert.assertEquals(Element Characters not matched, orig.getText(), actual.getText()); -} +} public File writeDefinition(File targetDir, File defnFile) throws Exception { File bkFile = new File(targetDir, bk_ + defnFile.getName()); FileWriter writer = new FileWriter(bkFile); -WSDLFactory factory +WSDLFactory factory = WSDLFactory.newInstance(org.apache.cxf.tools.corba.utils.TestWSDLCorbaFactoryImpl); WSDLReader reader = factory.newWSDLReader(); reader.setFeature(javax.wsdl.importDocuments, false); @@ -142,7 +142,7 @@ public class WSDLGenerationTester { addExtensions(extReg); reader.setExtensionRegistry(extReg); Definition wsdlDefn = reader.readWSDL(defnFile.toString()); -WSDLWriter wsdlWriter = factory.newWSDLWriter(); +WSDLWriter wsdlWriter = factory.newWSDLWriter(); wsdlWriter.writeWSDL(wsdlDefn, writer); writer.close(); writer = null; @@ -154,7 +154,7 @@ public class WSDLGenerationTester { File bkFile = new File(targetDir, bk_ + schemaFile.getName()); FileWriter writer = new FileWriter(bkFile); FileReader reader = new FileReader(schemaFile); -XmlSchema schema = schemaCol.read(reader, null); +XmlSchema schema = schemaCol.read(reader); schema.write(writer); reader.close(); writer.close(); @@ -170,7 +170,7 @@ public class WSDLGenerationTester { JAXBExtensionHelper.addExtensions(extReg, Definition.class, TypeMappingType.class); JAXBExtensionHelper.addExtensions(extReg, Port.class, org.apache.cxf.binding.corba.wsdl.AddressType.class); - + extReg.mapExtensionTypes(Binding.class, CorbaConstants.NE_CORBA_BINDING, BindingType.class); extReg.mapExtensionTypes(BindingOperation.class, CorbaConstants.NE_CORBA_OPERATION, org.apache.cxf.binding.corba.wsdl.OperationType.class); @@ -179,5
svn commit: r1023403 - in /cxf/trunk/common/common/src: main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java
Author: bimargulies Date: Sun Oct 17 02:26:29 2010 New Revision: 1023403 URL: http://svn.apache.org/viewvc?rev=1023403view=rev Log: Fix some but not all of the issues in testImportRepairs Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java?rev=1023403r1=1023402r2=1023403view=diff == --- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java (original) +++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java Sun Oct 17 02:26:29 2010 @@ -41,7 +41,6 @@ import org.apache.ws.commons.schema.XmlS import org.apache.ws.commons.schema.XmlSchemaContent; import org.apache.ws.commons.schema.XmlSchemaContentModel; import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaObject; import org.apache.ws.commons.schema.XmlSchemaParticle; import org.apache.ws.commons.schema.XmlSchemaSequence; import org.apache.ws.commons.schema.XmlSchemaSequenceMember; @@ -53,7 +52,6 @@ import org.apache.ws.commons.schema.reso import org.apache.ws.commons.schema.utils.NamespaceMap; import org.apache.ws.commons.schema.utils.NamespacePrefixList; - /** * Wrapper class for XmlSchemaCollection that deals with various quirks and bugs. */ @@ -63,7 +61,6 @@ public class SchemaCollection { private MapXmlSchema, SetXmlSchemaType xmlTypesCheckedForCrossImportsPerSchema = new HashMapXmlSchema, SetXmlSchemaType(); - public SchemaCollection() { this(new XmlSchemaCollection()); } @@ -106,8 +103,7 @@ public class SchemaCollection { } public XmlSchemaType getTypeByQName(QName schemaTypeName) { -XmlSchemaType xst = schemaCollection.getTypeByQName(schemaTypeName); -return xst; +return schemaCollection.getTypeByQName(schemaTypeName); } public XmlSchema[] getXmlSchema(String systemId) { @@ -242,18 +238,15 @@ public class SchemaCollection { /* * We need to visit all the top-level items. */ -for (XmlSchemaObject item : schema.getItems()) { -if (item instanceof XmlSchemaElement) { -addElementCrossImportsElement(schema, (XmlSchemaElement)item); -} else if (item instanceof XmlSchemaAttribute) { -XmlSchemaAttribute attr = (XmlSchemaAttribute)item; -XmlSchemaUtils.addImportIfNeeded(schema, attr.getRef().getTargetQName()); -XmlSchemaUtils.addImportIfNeeded(schema, attr.getSchemaTypeName()); -/* Attributes have simple types and simple types don't have bases. */ -} else if (item instanceof XmlSchemaType) { -XmlSchemaType type = (XmlSchemaType)item; -addCrossImportsType(schema, type); -} +for (XmlSchemaElement element : schema.getElements().values()) { +addElementCrossImportsElement(schema, element); +} +for (XmlSchemaAttribute attribute : schema.getAttributes().values()) { +XmlSchemaUtils.addImportIfNeeded(schema, attribute.getRef().getTargetQName()); +XmlSchemaUtils.addImportIfNeeded(schema, attribute.getSchemaTypeName()); +} +for (XmlSchemaType type : schema.getSchemaTypes().values()) { +addCrossImportsType(schema, type); } } @@ -269,8 +262,8 @@ public class SchemaCollection { } /** - * Determines whether the schema has already received (cross) imports for - * the schemaType + * Determines whether the schema has already received (cross) imports for the schemaType + * * @param schema * @param schemaType * @return false if cross imports for schemaType must still be added to schema @@ -295,18 +288,15 @@ public class SchemaCollection { } private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) { -if (schemaType != null) { -// the base type might cross schemas. - -if (schemaType instanceof XmlSchemaComplexType) { -XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType; -XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName()); -addCrossImports(schema, complexType.getContentModel()); -addCrossImportsAttributeList(schema, complexType.getAttributes()); -// could it be a choice or something else? -XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType
svn commit: r1023404 - /cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java
Author: bimargulies Date: Sun Oct 17 02:26:40 2010 New Revision: 1023404 URL: http://svn.apache.org/viewvc?rev=1023404view=rev Log: ImportRepairTest passes Modified: cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java Modified: cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java?rev=1023404r1=1023403r2=1023404view=diff == --- cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java (original) +++ cxf/trunk/common/common/src/test/java/org/apache/cxf/common/xmlschema/ImportRepairTest.java Sun Oct 17 02:26:40 2010 @@ -66,6 +66,9 @@ import org.junit.Test; * */ public class ImportRepairTest extends Assert { + +static boolean dumpSchemas; + private static final class ListLSInput implements LSInputList { private final ListDOMLSInput inputs; @@ -199,6 +202,9 @@ public class ImportRepairTest extends As } private void dumpSchema(Document document) { +if (!dumpSchemas) { +return; +} try { Transformer t = XMLUtils.newTransformer(2); t.setOutputProperty(OutputKeys.INDENT, yes);
svn commit: r1023405 - in /cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap: test-soap-12-header.wsdl test-soap-header.wsdl test-soap-header.xml
Author: bimargulies Date: Sun Oct 17 02:26:52 2010 New Revision: 1023405 URL: http://svn.apache.org/viewvc?rev=1023405view=rev Log: fix invalid schemas in soap binding header test Modified: cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-header.wsdl cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.wsdl cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.xml Modified: cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-header.wsdl URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-header.wsdl?rev=1023405r1=1023404r2=1023405view=diff == --- cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-header.wsdl (original) +++ cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-header.wsdl Sun Oct 17 02:26:52 2010 @@ -7,9 +7,9 @@ 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 @@ -20,11 +20,11 @@ definitions name=soap_header targetNamespace=http://org.apache.cxf/headers; xmlns:m=http://travelcompany.example.org/reservation; xmlns:n=http://mycompany.example.com/employees; -xmlns=http://schemas.xmlsoap.org/wsdl/; -xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; +xmlns=http://schemas.xmlsoap.org/wsdl/; +xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:tns=http://org.apache.cxf/headers; -xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; +xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; types schema targetNamespace=http://org.apache.cxf/headers; @@ -33,7 +33,7 @@ element name=inHeader complexType sequence - element name= type=xsd:string/ + element name=dummy type=xsd:string/ /sequence /complexType /element @@ -41,10 +41,10 @@ complexType/ /element /schema - + schema targetNamespace=http://mycompany.example.com/employees; xmlns=http://www.w3.org/2001/XMLSchema; - xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; + xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; element name=passenger complexType sequence @@ -53,7 +53,7 @@ /complexType /element /schema - + /types message name=inHeaderRequest @@ -77,7 +77,7 @@ soap12:operation soapAction= style=document/ input name=inHeaderRequest soap12:body parts=me use=literal/ -soap12:header message=tns:inHeaderRequest part=passenger +soap12:header message=tns:inHeaderRequest part=passenger use=literal/ /input output name=inHeaderResponse Modified: cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.wsdl URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.wsdl?rev=1023405r1=1023404r2=1023405view=diff == --- cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.wsdl (original) +++ cxf/trunk/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-header.wsdl Sun Oct 17 02:26:52 2010 @@ -7,9 +7,9 @@ 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
svn commit: r1023406 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/xmlschema/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/simple/src/main/java/org/apache/cx
Author: bimargulies Date: Sun Oct 17 02:27:22 2010 New Revision: 1023406 URL: http://svn.apache.org/viewvc?rev=1023406view=rev Log: remove misleading utility that made it seem as if a schema element could be assigned an arbitrary qname Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java?rev=1023406r1=1023405r2=1023406view=diff == --- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java (original) +++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java Sun Oct 17 02:27:22 2010 @@ -77,37 +77,6 @@ public final class XmlSchemaUtils { } /** - * Wrapper around XmlSchemaElement.setQName that checks for inconsistency with - * refName. - * @param element - * @param name - */ -public static void setElementQName(XmlSchemaElement element, QName name) { -if (name != null element.getRef().getTarget() != null - !element.getRef().getTargetQName().equals(name)) { -LOG.severe(Attempt to set the QName of an element with a reference name); -throw new -XmlSchemaInvalidOperation(Attempt to set the QName of an element - + with a reference name.); -} - -/* - * An element's namespace must match the containing namespace. - */ -if (!element.getParent().getTargetNamespace().equals(name.getNamespaceURI())) { -LOG.severe(Attempt to set the QName of an element to a namespace that - + is outside of the containing schema); -throw new -XmlSchemaInvalidOperation(Attempt to set the QName of an element to a namespace - + that is outside of the containing schema); -} - -element.setName(name.getLocalPart()); -// in CXF, we want them to be consistent. -setNameFromQName(element, name); -} - -/** * Wrapper around XmlSchemaElement.setName that checks for inconsistency with * refName. * @param element Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1023406r1=1023405r2=1023406view=diff == --- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java (original) +++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java Sun Oct 17 02:27:22 2010 @@ -42,7 +42,6 @@ import org.apache.cxf.common.i18n.Messag import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.common.util.ReflectionInvokationHandler; import org.apache.cxf.common.xmlschema.SchemaCollection; -import org.apache.cxf.common.xmlschema.XmlSchemaUtils; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.service.ServiceModelVisitor; import org.apache.cxf.service.model.FaultInfo; @@ -352,7 +351,7 @@ class JAXBSchemaInitializer extends Serv MessagePartInfo part, QName typeName, SchemaInfo schemaInfo) { XmlSchemaElement el = new XmlSchemaElement(schema, true); -XmlSchemaUtils.setElementQName(el, part.getElementQName()); +el.setName(part.getElementQName().getLocalPart()); el.setNillable(true); el.setSchemaTypeName(typeName); part.setXmlSchema(el); @@ -376,7 +375,7 @@ class JAXBSchemaInitializer extends Serv !isExistSchemaElement(schemaInfo.getSchema(), part.getElementQName())) { XmlSchemaElement el = new XmlSchemaElement(schemaInfo.getSchema(), true); -XmlSchemaUtils.setElementQName(el, part.getElementQName()); +el.setName(part.getElementQName().getLocalPart()); el.setNillable(true); schemaInfo.setElement(null); @@ -408,7 +407,7 @@ class JAXBSchemaInitializer extends Serv } XmlSchemaElement el = new XmlSchemaElement(schemaInfo.getSchema(), true); -XmlSchemaUtils.setElementQName(el, part.getElementQName()); +el.setName(part.getElementQName().getLocalPart
svn commit: r1023407 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
Author: bimargulies Date: Sun Oct 17 02:27:35 2010 New Revision: 1023407 URL: http://svn.apache.org/viewvc?rev=1023407view=rev Log: Fix schema issues with rt/javascript Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java?rev=1023407r1=1023406r2=1023407view=diff == --- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java (original) +++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java Sun Oct 17 02:27:35 2010 @@ -84,7 +84,7 @@ public final class XmlSchemaUtils { */ public static void setElementName(XmlSchemaElement element, String name) { if (name != null - element.getRef().getTarget() != null + element.isRef() !element.getRef().getTargetQName().getLocalPart().equals(name) (element.getQName() == null || element.getQName().getLocalPart().equals(name))) { LOG.severe(Attempt to set the name of an element with a reference name.); @@ -409,7 +409,7 @@ public final class XmlSchemaUtils { } XmlSchemaElement originalElement = element; -while (element.getSchemaType() == null element.getRef().getTarget() != null) { +while (element.getSchemaType() == null element.isRef()) { /* * This code assumes that all schemas are in the collection. */ @@ -475,7 +475,7 @@ public final class XmlSchemaUtils { public static XmlSchemaElement getReferredElement(XmlSchemaElement element, SchemaCollection xmlSchemaCollection) { -if (element.getRef() != null) { +if (element.isRef()) { /* * Calling getTarget works if everything is in the collection already. */ @@ -508,7 +508,7 @@ public final class XmlSchemaUtils { } public static boolean isAttributeNameQualified(XmlSchemaAttribute attribute, XmlSchema schema) { -if (attribute.getRef() != null) { +if (attribute.isRef()) { throw new RuntimeException(isElementNameQualified on element with ref=); } if (attribute.getForm().equals(XmlSchemaForm.QUALIFIED)) { @@ -545,7 +545,7 @@ public final class XmlSchemaUtils { if (attribute.getQName() == null) { throw new RuntimeException(getSchemaQualifier on anonymous element.); } -if (attribute.getRef() != null) { +if (attribute.isRef()) { throw new RuntimeException(getSchemaQualified on the 'from' side of ref=.); } @@ -564,7 +564,7 @@ public final class XmlSchemaUtils { } public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { -if (element.getRef() != null) { +if (element.isRef()) { throw new RuntimeException(isElementNameQualified on element with ref=); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { @@ -602,7 +602,7 @@ public final class XmlSchemaUtils { if (qn == null) { throw new RuntimeException(isElementQualified on anonymous element.); } -if (element.getRef() != null) { +if (element.isRef()) { throw new RuntimeException(isElementQualified on the 'from' side of ref=.); }
svn commit: r1023408 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
Author: bimargulies Date: Sun Oct 17 02:27:50 2010 New Revision: 1023408 URL: http://svn.apache.org/viewvc?rev=1023408view=rev Log: stop trying to set a name= for xml schema items with a ref= Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java?rev=1023408r1=1023407r2=1023408view=diff == --- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java (original) +++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java Sun Oct 17 02:27:50 2010 @@ -68,14 +68,6 @@ public final class XmlSchemaUtils { private XmlSchemaUtils() { } -private static void setNameFromQName(XmlSchemaElement element, QName name) { -if (name == null) { -element.setName(null); -} else { -element.setName(name.getLocalPart()); -} -} - /** * Wrapper around XmlSchemaElement.setName that checks for inconsistency with * refName. @@ -112,7 +104,6 @@ public final class XmlSchemaUtils { } element.getRef().setTargetQName(name); // cxf conventionally keeps something in the name slot. -setNameFromQName(element, name); } /**
svn commit: r1023409 - /cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
Author: bimargulies Date: Sun Oct 17 02:28:04 2010 New Revision: 1023409 URL: http://svn.apache.org/viewvc?rev=1023409view=rev Log: make a test a bit easier to debug Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java?rev=1023409r1=1023408r2=1023409view=diff == --- cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java (original) +++ cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java Sun Oct 17 02:28:04 2010 @@ -21,6 +21,7 @@ package org.apache.cxf.tools.wsdlto.jaxw import java.io.File; import java.io.FileInputStream; +import org.apache.cxf.helpers.FileUtils; import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.tools.common.ProcessorTestBase; import org.apache.cxf.tools.common.ToolConstants; @@ -62,6 +63,7 @@ public class JAXWSBindingTest extends Pr String path = /org/apache/cxf/tools/fortest/date; File sei = new File(output, path + /EchoDate.java); assertTrue(sei.exists()); -assertTrue(IOUtils.toString(new FileInputStream(sei)).indexOf(java.util.Date) != -1); +String seiContent = FileUtils.getStringFromFile(sei); +assertTrue(seiContent.indexOf(java.util.Date) != -1); } } \ No newline at end of file
svn commit: r1023410 - /cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
Author: bimargulies Date: Sun Oct 17 02:28:24 2010 New Revision: 1023410 URL: http://svn.apache.org/viewvc?rev=1023410view=rev Log: make a test a bit easier to debug Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java?rev=1023410r1=1023409r2=1023410view=diff == --- cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java (original) +++ cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java Sun Oct 17 02:28:24 2010 @@ -19,10 +19,8 @@ package org.apache.cxf.tools.wsdlto.jaxws; import java.io.File; -import java.io.FileInputStream; import org.apache.cxf.helpers.FileUtils; -import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.tools.common.ProcessorTestBase; import org.apache.cxf.tools.common.ToolConstants; import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
svn commit: r1023411 - in /cxf/trunk/tools: corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/ wsdlto/frontend/jaxws/src/mai
Author: bimargulies Date: Sun Oct 17 02:28:52 2010 New Revision: 1023411 URL: http://svn.apache.org/viewvc?rev=1023411view=rev Log: Fix rest of tooling Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/OperationVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/OperationVisitor.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/OperationVisitor.java?rev=1023411r1=1023410r2=1023411view=diff == --- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/OperationVisitor.java (original) +++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/OperationVisitor.java Sun Oct 17 02:28:52 2010 @@ -341,7 +341,7 @@ public class OperationVisitor extends Vi XmlSchemaType schemaType, Scope fqName, String name) { -XmlSchemaElement element = new XmlSchemaElement(schema, true); +XmlSchemaElement element = new XmlSchemaElement(schema, false); element.setName(name); if (schemaType != null) { element.setSchemaTypeName(schemaType.getQName()); @@ -352,6 +352,7 @@ public class OperationVisitor extends Vi wsdlVisitor.getDeferredActions(). add(fqName, new OperationDeferredAction(element)); } +schemaSequence.getItems().add(element); return element; } Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java?rev=1023411r1=1023410r2=1023411view=diff == --- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java (original) +++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java Sun Oct 17 02:28:52 2010 @@ -301,6 +301,7 @@ public class WSDLToCorbaHelper { if (schemaType == null) { if (element.getRef().getTarget() != null) { schemaType = findSchemaType(element.getRef().getTarget().getSchemaTypeName()); +schemaName = element.getRef().getTargetQName(); } else { schemaType = findSchemaType(element.getSchemaTypeName()); } @@ -1594,6 +1595,9 @@ public class WSDLToCorbaHelper { private boolean getElementQualification(XmlSchemaElement element, String uri) { QName schemaName = element.getQName(); +if (element.isRef()) { +schemaName = element.getRef().getTargetQName(); +} if (schemaName.getNamespaceURI().equals()) { schemaName = new QName(uri, schemaName.getLocalPart()); Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?rev=1023411r1=1023410r2=1023411view=diff == --- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java (original) +++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java Sun Oct 17 02:28:52 2010 @@ -389,7 +389,7 @@ public final class ProcessorUtil { XmlSchemaElement subElement = (XmlSchemaElement)seqMember; if (subElement.getQName() != null) { -qnames.add(new WrapperElement(subElement.getQName(), subElement.getSchemaTypeName())); +qnames.add(new WrapperElement(subElement.getWireName(), subElement.getSchemaTypeName())); } else { qnames.add(new WrapperElement(subElement.getRef().getTargetQName(), subElement.getSchemaTypeName()));
svn commit: r1023412 - /cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
Author: bimargulies Date: Sun Oct 17 02:29:09 2010 New Revision: 1023412 URL: http://svn.apache.org/viewvc?rev=1023412view=rev Log: Fix http bnding tests Modified: cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java Modified: cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java?rev=1023412r1=1023411r2=1023412view=diff == --- cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java (original) +++ cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java Sun Oct 17 02:29:09 2010 @@ -259,18 +259,18 @@ public final class IriDecoderHelper { } } Element ec = null; -QName qn = elChild.getQName(); +QName qn = elChild.getWireName(); if (StringUtils.isEmpty(qn.getNamespaceURI()) unQualified) { ec = doc.createElement(elChild.getQName().getLocalPart()); } else { -if (!elChild.getQName().getNamespaceURI().equals(qname.getNamespaceURI())) { -ec = doc.createElementNS(elChild.getQName().getNamespaceURI(), - elChild.getQName().getLocalPart()); -ec.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, elChild.getQName().getNamespaceURI()); +if (!qn.getNamespaceURI().equals(qname.getNamespaceURI())) { +ec = doc.createElementNS(qn.getNamespaceURI(), + qn.getLocalPart()); +ec.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, qn.getNamespaceURI()); } else { -ec = doc.createElementNS(elChild.getQName().getNamespaceURI(), - ns1: + elChild.getQName().getLocalPart()); +ec = doc.createElementNS(qn.getNamespaceURI(), + ns1: + qn.getLocalPart()); } }
svn commit: r1023413 - in /cxf/trunk/tools/wsdlto: databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/ test/src/test/java
Author: bimargulies Date: Sun Oct 17 02:29:31 2010 New Revision: 1023413 URL: http://svn.apache.org/viewvc?rev=1023413view=rev Log: some clarifications in tests I was debugging Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1023413r1=1023412r2=1023413view=diff == --- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java (original) +++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java Sun Oct 17 02:29:31 2010 @@ -128,7 +128,7 @@ public class JAXBDataBinding implements boolean isInclude; int locIdx = -1; OASISCatalogManager catalog; - + LocationFilterReader(XMLStreamReader read, OASISCatalogManager catalog) { super(read); this.catalog = catalog; @@ -192,11 +192,11 @@ public class JAXBDataBinding implements } return index; } - + private String mapSchemaLocation(String target) { return JAXBDataBinding.mapSchemaLocation(target, this.getLocation().getSystemId(), catalog); } - + public String getAttributeValue(String namespaceURI, String localName) { if (isInclude schemaLocation.equals(localName)) { return mapSchemaLocation(super.getAttributeValue(namespaceURI, localName)); @@ -216,24 +216,24 @@ public class JAXBDataBinding implements public QName getAttributeName(int index) { return super.getAttributeName(mapIdx(index)); } - + public String getAttributePrefix(int index) { return super.getAttributePrefix(mapIdx(index)); } - + public String getAttributeNamespace(int index) { return super.getAttributeNamespace(mapIdx(index)); } - + public String getAttributeLocalName(int index) { return super.getAttributeLocalName(mapIdx(index)); } - + public String getAttributeType(int index) { return super.getAttributeType(mapIdx(index)); } - - + + public boolean isAttributeSpecified(int index) { return super.isAttributeSpecified(mapIdx(index)); } @@ -241,15 +241,15 @@ public class JAXBDataBinding implements private static final Logger LOG = LogUtils.getL7dLogger(JAXBDataBinding.class); - + private static final SetString DEFAULT_TYPE_MAP = new HashSetString(); private static final MapString, String JLDEFAULT_TYPE_MAP = new HashMapString, String(); - + private S2JJAXBModel rawJaxbModelGenCode; private ToolContext context; private DefaultValueProvider defaultValues; private boolean initialized; - + static { DEFAULT_TYPE_MAP.add(boolean); DEFAULT_TYPE_MAP.add(int); @@ -266,7 +266,7 @@ public class JAXBDataBinding implements DEFAULT_TYPE_MAP.add(java.math.BigDecimal); DEFAULT_TYPE_MAP.add(javax.xml.datatype.XMLGregorianCalendar); DEFAULT_TYPE_MAP.add(javax.xml.datatype.Duration); - + JLDEFAULT_TYPE_MAP.put(java.lang.Character, char); JLDEFAULT_TYPE_MAP.put(java.lang.Boolean, boolean); JLDEFAULT_TYPE_MAP.put(java.lang.Integer, int); @@ -276,35 +276,35 @@ public class JAXBDataBinding implements JLDEFAULT_TYPE_MAP.put(java.lang.Float, float); JLDEFAULT_TYPE_MAP.put(java.lang.Double, double); DEFAULT_TYPE_MAP.addAll(JLDEFAULT_TYPE_MAP.keySet()); -} - +} + public void initialize(ToolContext c) throws ToolException { this.context = c; - + SchemaCompiler schemaCompiler = XJC.createSchemaCompiler(); Bus bus = context.get(Bus.class); OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class); hackInNewInternalizationLogic(schemaCompiler, catalog); - + ClassCollector classCollector = context.get(ClassCollector.class); - -ClassNameAllocatorImpl allocator + +ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classCollector
svn commit: r1023414 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs: ext/codegen/CodeGeneratorProvider.java model/wadl/WadlGenerator.java
Author: bimargulies Date: Sun Oct 17 02:29:53 2010 New Revision: 1023414 URL: http://svn.apache.org/viewvc?rev=1023414view=rev Log: Rest of the unit tests passing. Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProvider.java cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProvider.java?rev=1023414r1=1023413r2=1023414view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProvider.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProvider.java Sun Oct 17 02:29:53 2010 @@ -35,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; +import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -62,7 +63,6 @@ import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import javax.xml.namespace.QName; -import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; @@ -89,6 +89,7 @@ import org.apache.cxf.jaxrs.model.wadl.W import org.apache.cxf.jaxrs.provider.ProviderFactory; import org.apache.cxf.jaxrs.utils.JAXRSUtils; import org.apache.cxf.message.Message; +import org.apache.cxf.staxutils.StaxUtils; public class CodeGeneratorProvider implements RequestHandler { public static final String CODE_QUERY = _code; @@ -186,9 +187,9 @@ public class CodeGeneratorProvider imple zipSource(srcDir, zipDir); return getLink(zipDir, m); } catch (Exception ex) { -LOG.warning(Code can not be generated for -+ resourceClass != null ? resourceClass.getServiceClass().getName() -: this service); +LOG.log(Level.WARNING, Code can not be generated for ++ (resourceClass != null ? resourceClass.getServiceClass().getName() +: this service), ex); FileUtils.removeDir(zipDir); return Response.noContent().build(); } finally { @@ -769,8 +770,7 @@ public class CodeGeneratorProvider imple private Element readWadl(String wadl) { try { -Document doc = DOMUtils.readXml(new StringReader(wadl)); -return doc.getDocumentElement(); +return StaxUtils.read(new InputSource(new StringReader(wadl))).getDocumentElement(); } catch (Exception ex) { throw new IllegalStateException(Unable to read wadl, ex); } @@ -801,21 +801,22 @@ public class CodeGeneratorProvider imple private JCodeModel createCodeModel(ListElement schemaElements, SetString type) { -SchemaCompiler compiler = createCompiler(type); +SchemaCompiler compiler = createCompiler(type); addSchemas(schemaElements, compiler); -S2JJAXBModel intermediateModel = compiler.bind(); Object elForRun = ReflectionInvokationHandler .createProxyWrapper(new InnerErrorListener(), JAXBUtils.getParamClass(compiler, setErrorListener)); +compiler.setErrorListener(elForRun); +S2JJAXBModel intermediateModel = compiler.bind(); JCodeModel codeModel = intermediateModel.generateCode(null, elForRun); JAXBUtils.logGeneratedClassNames(LOG, codeModel); return codeModel; } - + private SchemaCompiler createCompiler(SetString typeClassNames) { return JAXBUtils.createSchemaCompilerWithDefaultAllocator(typeClassNames); } Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1023414r1=1023413r2=1023414view=diff == --- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java (original) +++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Sun Oct 17 02:29:53 2010 @@ -62,6 +62,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.cxf.BusFactory; +import org.apache.cxf.common.WSDLConstants; import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.common.util.PackageUtils; import
svn commit: r1023415 - in /cxf/trunk/rt: core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Author: bimargulies Date: Sun Oct 17 02:30:16 2010 New Revision: 1023415 URL: http://svn.apache.org/viewvc?rev=1023415view=rev Log: Putthe correct concrete name in place Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=1023415r1=1023414r2=1023415view=diff == --- cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original) +++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Sun Oct 17 02:30:16 2010 @@ -750,9 +750,9 @@ public class WSDLServiceBuilder { if (el.getSchemaTypeName() != null) { MessagePartInfo mpi = wrapper.addMessagePart(new QName(namespaceURI, el.getName())); mpi.setTypeQName(el.getSchemaTypeName()); -mpi.setConcreteName(el.getQName()); mpi.setElement(true); -mpi.setElementQName(el.getQName()); +mpi.setConcreteName(el.getWireName()); +mpi.setElementQName(el.getWireName()); mpi.setXmlSchema(el); } else if (el.getRef().getTargetQName() != null) { MessagePartInfo mpi = wrapper.addMessagePart(el.getRef().getTargetQName()); @@ -768,7 +768,7 @@ public class WSDLServiceBuilder { } else { // anonymous type MessagePartInfo mpi = wrapper.addMessagePart(new QName(namespaceURI, el.getName())); -mpi.setConcreteName(el.getQName()); +mpi.setConcreteName(el.getWireName()); mpi.setElementQName(mpi.getName()); mpi.setElement(true); mpi.setXmlSchema(el); Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1023415r1=1023414r2=1023415view=diff == --- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original) +++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Sun Oct 17 02:30:16 2010 @@ -1247,7 +1247,7 @@ public class ReflectionServiceFactoryBea for (MessagePartInfo mpi : unwrappedMessage.getMessageParts()) { el = new XmlSchemaElement(schema, false); -// We hope that we can't have parts that differe only in namespace. +// We hope that we can't have parts that different only in namespace. el.setName(mpi.getName().getLocalPart()); MapClass, Boolean jaxbAnnoMap = getJaxbAnnoMap(mpi); if (mpi.isElement()) {
svn commit: r1023416 - in /cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/
Author: bimargulies Date: Sun Oct 17 02:30:38 2010 New Revision: 1023416 URL: http://svn.apache.org/viewvc?rev=1023416view=rev Log: Respond to the removal of addType. Not all problems in CORBA fixed yet Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ArrayVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceDeferredAction.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/WSDLASTVisitor.java Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1023416r1=1023415r2=1023416view=diff == --- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java (original) +++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java Sun Oct 17 02:30:38 2010 @@ -478,23 +478,24 @@ class JAXBSchemaInitializer extends Serv schema = schemaInfo.getSchema(); } -XmlSchemaComplexType ct = new XmlSchemaComplexType(schema, false); -ct.setName(part.getElementQName().getLocalPart()); // Before updating everything, make sure we haven't added this // type yet. Multiple methods that throw the same exception // types will cause duplicates. -if (schema.getTypeByName(ct.getQName()) != null) { +String partLocalName = part.getElementQName().getLocalPart(); +XmlSchemaType existingType = schema.getTypeByName(partLocalName); +if (existingType != null) { return; } +XmlSchemaComplexType ct = new XmlSchemaComplexType(schema, true); +ct.setName(partLocalName); + XmlSchemaElement el = new XmlSchemaElement(schema, true); -el.setName(part.getElementQName().getLocalPart()); +el.setName(partLocalName); part.setXmlSchema(el); -schema.getItems().add(ct); -schema.addType(ct); schemaInfo.setElement(null); -el.setSchemaTypeName(part.getElementQName()); +el.setSchemaTypeName(ct.getQName()); XmlSchemaSequence seq = new XmlSchemaSequence(); ct.setParticle(seq); Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ArrayVisitor.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ArrayVisitor.java?rev=1023416r1=1023415r2=1023416view=diff == --- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ArrayVisitor.java (original) +++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ArrayVisitor.java Sun Oct 17 02:30:38 2010 @@ -137,10 +137,6 @@ public class ArrayVisitor extends Visito } } -// add schemaType -schema.getItems().add(stype); -schema.addType(stype); - // add corbaType typeMap.getStructOrExceptionOrUnion().add(ctype); @@ -185,11 +181,6 @@ public class ArrayVisitor extends Visito getFullyQualifiedName())); } - -// add schemaType -schema.getItems().add(result.getSchemaType()); -schema.addType(result.getSchemaType()); - // add corbaType typeMap.getStructOrExceptionOrUnion().add(result.getCorbaType()); } @@ -199,7 +190,7 @@ public class ArrayVisitor extends Visito private XmlSchemaComplexType generateSchemaArray(Scope scopedName, Long size, XmlSchemaType type, Scope fQName) { -XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema, false); +XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema, true); complexType.setName(mapper.mapToQName(scopedName)); XmlSchemaSequence sequence = new XmlSchemaSequence(); Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba
svn commit: r1023417 - in /cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl: DeclaratorVisitor.java ObjectReferenceVisitor.java
Author: bimargulies Date: Sun Oct 17 02:30:53 2010 New Revision: 1023417 URL: http://svn.apache.org/viewvc?rev=1023417view=rev Log: more tweaks in response to crosschecks Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java?rev=1023417r1=1023416r2=1023417view=diff == --- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java (original) +++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/DeclaratorVisitor.java Sun Oct 17 02:30:53 2010 @@ -170,7 +170,7 @@ public class DeclaratorVisitor extends V private XmlSchemaSimpleType duplicateXmlSchemaSimpleType(Scope newScope) { XmlSchemaSimpleType oldSimpleType = (XmlSchemaSimpleType) getSchemaType(); -XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(schema, false); +XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(schema, oldSimpleType.isTopLevel()); simpleType.setContent(oldSimpleType.getContent()); simpleType.setName(newScope.toString()); return simpleType; Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java?rev=1023417r1=1023416r2=1023417view=diff == --- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java (original) +++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java Sun Oct 17 02:30:53 2010 @@ -47,6 +47,7 @@ import org.apache.ws.commons.schema.XmlS import org.apache.ws.commons.schema.XmlSchemaExternal; import org.apache.ws.commons.schema.XmlSchemaImport; import org.apache.ws.commons.schema.XmlSchemaObject; +import org.apache.ws.commons.schema.XmlSchemaSimpleType; import org.apache.ws.commons.schema.XmlSchemaType; import org.apache.ws.commons.schema.utils.NamespaceMap; @@ -112,10 +113,7 @@ public class ObjectReferenceVisitor exte if (wsaSchema == null) { wsaSchema = new XmlSchema(ReferenceConstants.WSADDRESSING_NAMESPACE, schemas); } -/* - * TODO: This anonymous type is ridiculous, but I don't understand this code. - */ -XmlSchemaType objectType = new XmlSchemaType(wsaSchema, false) { }; +XmlSchemaType objectType = new XmlSchemaSimpleType(wsaSchema, true); objectType.setName(ReferenceConstants.WSADDRESSING_LOCAL_NAME); setSchemaType(objectType); @@ -209,7 +207,7 @@ public class ObjectReferenceVisitor exte if (wsaSchema == null) { wsaSchema = new XmlSchema(ReferenceConstants.WSADDRESSING_NAMESPACE, schemas); } -XmlSchemaType wsaType = new XmlSchemaType(wsaSchema, false) { }; +XmlSchemaType wsaType = new XmlSchemaSimpleType(wsaSchema, true); wsaType.setName(ReferenceConstants.WSADDRESSING_LOCAL_NAME); // Check to see if we have already defined an element for this reference type. If