[2/2] cxf git commit: [CXF-5193] Fix anonymous fixed IDL type handling This closes #123
[CXF-5193] Fix anonymous fixed IDL type handling This closes #123 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2c00184f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2c00184f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2c00184f Branch: refs/heads/3.0.x-fixes Commit: 2c00184f7f3e32cb0c1f0ef90a3c411d369aa5a2 Parents: 3203bc6 Author: Grzegorz GrzybekAuthored: Thu Mar 17 13:41:25 2016 +0100 Committer: Daniel Kulp Committed: Fri Mar 18 12:14:28 2016 -0400 -- .../corba/processors/idl/FixedVisitor.java | 42 ++--- .../processors/IDLToWSDLGenerationTest.java | 5 + .../src/test/resources/idl/FixedStruct.idl | 32 +++ .../resources/idl/expected_FixedStruct.wsdl | 98 4 files changed, 166 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/2c00184f/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java -- diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java index 46897b4..75eb81e 100644 --- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java +++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java @@ -24,6 +24,8 @@ import javax.xml.namespace.QName; import antlr.collections.AST; +import org.apache.cxf.binding.corba.wsdl.Anonfixed; +import org.apache.cxf.binding.corba.wsdl.CorbaType; import org.apache.cxf.binding.corba.wsdl.Fixed; import org.apache.ws.commons.schema.XmlSchema; import org.apache.ws.commons.schema.XmlSchemaFractionDigitsFacet; @@ -79,7 +81,12 @@ public class FixedVisitor extends VisitorBase { AST digitsNode = fixedNode.getFirstChild(); AST scaleNode = digitsNode.getNextSibling(); -Scope scopedName = new Scope(getScope(), identifierNode); +Scope scopedName = null; +if (identifierNode == null) { +scopedName = TypesUtils.generateAnonymousScopedName(getScope(), schema); +} else { +scopedName = new Scope(getScope(), identifierNode); +} // validate digits and scale Long digits = new Long(digitsNode.toString()); @@ -112,17 +119,30 @@ public class FixedVisitor extends VisitorBase { // add xmlschema:fixed setSchemaType(fixedSimpleType); - -// corba:fixed -Fixed corbaFixed = new Fixed(); -corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); -corbaFixed.setDigits(digits); -corbaFixed.setScale(scale); -corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); -//corbaFixed.setType(Constants.XSD_DECIMAL); -corbaFixed.setType(fixedSimpleType.getQName()); +CorbaType type = null; +if (identifierNode != null) { +// corba:fixed +Fixed corbaFixed = new Fixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +type = corbaFixed; +} else { +// corba:anonfixed +Anonfixed corbaFixed = new Anonfixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +typeMap.getStructOrExceptionOrUnion().add(corbaFixed); +type = corbaFixed; +} // add corba:fixed -setCorbaType(corbaFixed); +setCorbaType(type); } } http://git-wip-us.apache.org/repos/asf/cxf/blob/2c00184f/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java -- diff --git a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java b/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java index e3de3e1..7d47d71 100644 --- a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java +++
cxf git commit: Fix a typo in FIXED_PARAMETER_ORDER This closes #122
Repository: cxf Updated Branches: refs/heads/master b34e734a6 -> 330272d73 Fix a typo in FIXED_PARAMETER_ORDER This closes #122 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/330272d7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/330272d7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/330272d7 Branch: refs/heads/master Commit: 330272d7399978d03b851dbce584d487eea2c99b Parents: b34e734 Author: Tomas RohovskyAuthored: Tue Mar 15 13:32:54 2016 +0100 Committer: Daniel Kulp Committed: Wed Mar 16 10:23:43 2016 -0400 -- core/src/main/java/org/apache/cxf/message/Message.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/330272d7/core/src/main/java/org/apache/cxf/message/Message.java -- diff --git a/core/src/main/java/org/apache/cxf/message/Message.java b/core/src/main/java/org/apache/cxf/message/Message.java index 0c68178..a3d0251 100644 --- a/core/src/main/java/org/apache/cxf/message/Message.java +++ b/core/src/main/java/org/apache/cxf/message/Message.java @@ -146,7 +146,7 @@ public interface Message extends StringMap { String ACCEPT_CONTENT_TYPE = "Accept"; String BASE_PATH = Message.class.getName() + ".BASE_PATH"; String ENCODING = Message.class.getName() + ".ENCODING"; -String FIXED_PARAMETER_ORDER = Message.class.getName() + "FIXED_PARAMETER_ORDER"; +String FIXED_PARAMETER_ORDER = Message.class.getName() + ".FIXED_PARAMETER_ORDER"; String MAINTAIN_SESSION = Message.class.getName() + ".MAINTAIN_SESSION"; String ATTACHMENTS = Message.class.getName() + ".ATTACHMENTS";
cxf git commit: Make sure the build passes with "-Dmaven.test.skip" set
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 3a1b80659 -> 15f7ffb2f Make sure the build passes with "-Dmaven.test.skip" set Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/15f7ffb2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/15f7ffb2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/15f7ffb2 Branch: refs/heads/3.1.x-fixes Commit: 15f7ffb2f8b12db7f270f02747549b299c1431f1 Parents: 3a1b806 Author: Colm O hEigeartaighAuthored: Wed Mar 16 11:28:43 2016 + Committer: Colm O hEigeartaigh Committed: Wed Mar 16 11:29:40 2016 + -- systests/jibx/databinding-jibx/pom.xml | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/15f7ffb2/systests/jibx/databinding-jibx/pom.xml -- diff --git a/systests/jibx/databinding-jibx/pom.xml b/systests/jibx/databinding-jibx/pom.xml index 7a12ccd..991d437 100644 --- a/systests/jibx/databinding-jibx/pom.xml +++ b/systests/jibx/databinding-jibx/pom.xml @@ -181,6 +181,18 @@ none + +skipTests + + +maven.test.skip + + + +none +none + +
cxf git commit: [CXF-6836] Temporarily disabling Swagger tests
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes f49297cff -> 860a19d80 [CXF-6836] Temporarily disabling Swagger tests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/860a19d8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/860a19d8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/860a19d8 Branch: refs/heads/3.0.x-fixes Commit: 860a19d80a5c211ee9ce5e7752648d74daea827c Parents: f49297c Author: Sergey BeryozkinAuthored: Fri Mar 18 17:04:37 2016 + Committer: Sergey Beryozkin Committed: Fri Mar 18 17:06:03 2016 + -- .../description/AbstractSwagger2ServiceDescriptionTest.java | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/860a19d8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java index bf4b168..c4bfd95 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java @@ -28,6 +28,8 @@ import javax.ws.rs.core.Response.Status; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; +import org.apache.cxf.feature.Feature; +import org.apache.cxf.feature.LoggingFeature; import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.apache.cxf.jaxrs.client.WebClient; @@ -43,6 +45,7 @@ import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.yaml.snakeyaml.Yaml; + public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBusClientServerTestBase { @Ignore @@ -95,6 +98,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus protected abstract String getExpectedFileYaml(); @Test +@Ignore public void testApiListingIsProperlyReturnedJSON() throws Exception { final WebClient client = createWebClient("/swagger.json"); try { @@ -110,6 +114,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus } @Test +@Ignore public void testApiListingIsProperlyReturnedYAML() throws Exception { final WebClient client = createWebClient("/swagger.yaml"); @@ -132,7 +137,9 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus private WebClient createWebClient(final String url) { return WebClient .create("http://localhost:; + getPort() + url, -Arrays.< Object >asList(new JacksonJsonProvider())) +Arrays.< Object >asList(new JacksonJsonProvider()), +Arrays.< Feature >asList(new LoggingFeature()), +null) .accept(MediaType.APPLICATION_JSON).accept("application/yaml"); }
cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample
Repository: cxf Updated Branches: refs/heads/master f492f92e5 -> 4f5b60aba [CXF-5855] enable atmosphere's sse handling; update the sample Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4f5b60ab Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4f5b60ab Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4f5b60ab Branch: refs/heads/master Commit: 4f5b60aba0a8f9f56c7f16e8a93ef22876467678 Parents: f492f92 Author: Akitoshi YoshidaAuthored: Thu Mar 17 00:11:58 2016 +0100 Committer: Akitoshi Yoshida Committed: Thu Mar 17 00:15:29 2016 +0100 -- .../release/samples/jax_rs/websocket/README.txt | 26 ++- .../release/samples/jax_rs/websocket/pom.xml| 10 +- .../java/demo/jaxrs/server/CustomerService.java | 105 - .../websocket/src/test/resources/client.js | 232 +++ .../websocket/atmosphere/AtmosphereUtils.java | 18 ++ .../AtmosphereWebSocketJettyDestination.java| 3 +- .../AtmosphereWebSocketServletDestination.java | 3 +- .../atmosphere/DefaultProtocolInterceptor.java | 90 ++- 8 files changed, 463 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/README.txt -- diff --git a/distribution/src/main/release/samples/jax_rs/websocket/README.txt b/distribution/src/main/release/samples/jax_rs/websocket/README.txt index 09c43e8..f1d3455 100644 --- a/distribution/src/main/release/samples/jax_rs/websocket/README.txt +++ b/distribution/src/main/release/samples/jax_rs/websocket/README.txt @@ -6,6 +6,13 @@ This is a websocket transport version of JAX-RS Basic Demo. A RESTful customer service is provided on URL ws://localhost:9000/customers. Users access this URI to operate on customer. +This sample includes two convenient clients: a plain javascript browser client +and a node.js client based on atmosphere. + + +Connecting to the server +--- + Open a websocket to ws://localhost:9000/ and send requests over the websocket. A GET request to path /customerservice/customers/123 @@ -102,7 +109,6 @@ Please review the README in the samples directory before continuing. - Building and running the demo using maven --- @@ -118,6 +124,8 @@ Using either UNIX or Windows: To remove the target dir, run mvn clean". +Using Javascript client in Browser + Using a web browser that natively supports WebSocket (Safari, Chrome, Firefox): After starting the server (see above), open the index.html page located at @@ -140,3 +148,19 @@ Content-Type: text/xml; charset="utf-8" Jack + + +Using Node.js client + + +Go to samples/jax_rs/websocket/src/test/resources and at the console + +Assuming node (>=v4) and npm are installed, execute the following shell commands. + +% npm install atmosphere.js +% node client.js + +This client program supports websocket and sse and allows +you to choose your preferred protocol. + + http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml index d198d71..9b79c2c 100644 --- a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml @@ -32,6 +32,7 @@ ${project.version} 1.8.5 +2.3.7 8.1.15.v20140411 9.2.2.v20140723 ${cxf.jetty8.version} @@ -207,6 +208,13 @@ org.springframework spring-core - + + + +org.atmosphere +atmosphere-runtime +${cxf.atmosphere.version} + + http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java -- diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java index 967e978..cc039ff 100644 --- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java +++
[1/3] cxf-fediz git commit: Refactoring IdP beans
Repository: cxf-fediz Updated Branches: refs/heads/master 000878303 -> ee79fdd1b Refactoring IdP beans Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/c23f3a89 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/c23f3a89 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/c23f3a89 Branch: refs/heads/master Commit: c23f3a8930c129f26ff7cab6a0666576e63e5ee0 Parents: 0008783 Author: Colm O hEigeartaighAuthored: Wed Mar 16 13:32:49 2016 + Committer: Colm O hEigeartaigh Committed: Wed Mar 16 13:32:49 2016 + -- .../fediz/service/idp/FederationEntryPoint.java | 152 --- .../cxf/fediz/service/idp/FedizEntryPoint.java | 151 ++ .../service/idp/beans/CacheSecurityToken.java | 2 +- .../idp/beans/IdpTokenExpiredAction.java| 71 + .../fediz/service/idp/beans/LogoutAction.java | 2 +- .../idp/beans/ProcessHRDSExpressionAction.java | 18 +-- .../idp/beans/SigninParametersCacheAction.java | 3 +- .../idp/beans/TrustedIdpProtocolAction.java | 11 +- .../fediz/service/idp/beans/WfreshParser.java | 116 -- .../service/idp/beans/wsfed/WfreshParser.java | 81 ++ .../WEB-INF/flows/federation-signin-request.xml | 9 +- .../flows/federation-signin-response.xml| 3 +- .../flows/federation-validate-request.xml | 3 +- .../WEB-INF/flows/saml-signin-request.xml | 8 +- .../src/main/webapp/WEB-INF/security-config.xml | 6 +- .../test/resources/realmb/security-config.xml | 4 +- 16 files changed, 335 insertions(+), 305 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/c23f3a89/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java -- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java deleted file mode 100644 index 1a39ef2..000 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java +++ /dev/null @@ -1,152 +0,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. - */ - -package org.apache.cxf.fediz.service.idp; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.cxf.fediz.core.FederationConstants; -import org.apache.cxf.fediz.service.idp.domain.Idp; -import org.apache.cxf.fediz.service.idp.service.ConfigService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; -import org.springframework.util.Assert; - - -/** - * Used by the ExceptionTranslationFilter to commence authentication via the - * WS-Federation protocol. - * - * The user's browser will be redirected to the IDP. - * - */ -public class FederationEntryPoint implements AuthenticationEntryPoint, -InitializingBean, ApplicationContextAware { - -private static final Logger LOG = LoggerFactory.getLogger(FederationEntryPoint.class); - -private ApplicationContext appContext; -private ConfigService configService; -private String realm; -private Idp idpConfig; - -public ConfigService getConfigService() { -return configService; -} - -public void setConfigService(ConfigService configService) { -this.configService = configService; -} - -public String getRealm() { -return realm; -} - -
cxf git commit: Several Swagger-related improvements: swagger-jaxrs upgraded to 1.5.8, now working properly even as filter, prepared Swagger2Feature for extension
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes d7e2821f8 -> 7a35d3314 Several Swagger-related improvements: swagger-jaxrs upgraded to 1.5.8, now working properly even as filter, prepared Swagger2Feature for extension Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7a35d331 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7a35d331 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7a35d331 Branch: refs/heads/3.1.x-fixes Commit: 7a35d33145a7d1f2d00d01df130f836127d65f62 Parents: d7e2821 Author: Francesco ChicchiriccòAuthored: Wed Mar 16 16:09:17 2016 +0100 Committer: Francesco Chicchiriccò Committed: Wed Mar 16 16:40:33 2016 +0100 -- parent/pom.xml | 2 +- .../cxf/jaxrs/swagger/Swagger2Feature.java | 82 .../cxf/jaxrs/swagger/Swagger2Serializers.java | 10 +-- 3 files changed, 55 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/7a35d331/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index c50a51f..ccf6de9 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -146,7 +146,7 @@ 1.3.1.RELEASE spring-test 1.3.13 -1.5.4 +1.5.8 1.7 4.4.1 3.1.4 http://git-wip-us.apache.org/repos/asf/cxf/blob/7a35d331/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java -- diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java index 5072104..bc9102f 100644 --- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java +++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java @@ -32,6 +32,7 @@ import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.PreMatching; import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; @@ -46,6 +47,7 @@ import org.apache.cxf.jaxrs.model.doc.DocumentationProvider; import org.apache.cxf.jaxrs.model.doc.JavaDocProvider; import org.apache.cxf.jaxrs.provider.ServerProviderFactory; import org.apache.cxf.jaxrs.utils.InjectionUtils; +import org.apache.cxf.jaxrs.utils.JAXRSUtils; import io.swagger.jaxrs.config.BeanConfig; import io.swagger.jaxrs.config.DefaultReaderConfig; @@ -55,6 +57,12 @@ import io.swagger.jaxrs.listing.ApiListingResource; @Provider(Type.Feature) public class Swagger2Feature extends AbstractSwaggerFeature { +protected boolean dynamicBasePath; + +protected boolean replaceTags; + +protected DocumentationProvider javadocProvider; + private String host; private String[] schemes; @@ -65,33 +73,24 @@ public class Swagger2Feature extends AbstractSwaggerFeature { private String ignoreRoutes; -private boolean dynamicBasePath; - -private boolean replaceTags; - -private DocumentationProvider javadocProvider; - @Override protected void addSwaggerResource(Server server) { -List cris = Collections.emptyList(); -if (!runAsFilter) { -List serviceBeans = new ArrayList<>(); -ApiListingResource apiListingResource = new ApiListingResource(); -serviceBeans.add(apiListingResource); -JAXRSServiceFactoryBean sfb = -(JAXRSServiceFactoryBean) server.getEndpoint().get(JAXRSServiceFactoryBean.class.getName()); -sfb.setResourceClassesFromBeans(serviceBeans); -cris = sfb.getClassResourceInfo(); +ApiListingResource apiListingResource = new ApiListingResource(); +JAXRSServiceFactoryBean sfb = +(JAXRSServiceFactoryBean) server.getEndpoint().get(JAXRSServiceFactoryBean.class.getName()); + sfb.setResourceClassesFromBeans(Collections.singletonList(apiListingResource)); +List cris = sfb.getClassResourceInfo(); + +List providers = new ArrayList<>(); +if (runAsFilter) { +providers.add(new SwaggerContainerRequestFilter()); +} else { for (ClassResourceInfo cri : cris) { if (ApiListingResource.class == cri.getResourceClass()) { -InjectionUtils.injectContextProxiesAndApplication(cri, apiListingResource, null); +InjectionUtils.injectContextProxies(cri, apiListingResource); } } } -List providers = new
cxf git commit: Fixing Sagger2 systests
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes d13b22b37 -> f49297cff Fixing Sagger2 systests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f49297cf Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f49297cf Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f49297cf Branch: refs/heads/3.0.x-fixes Commit: f49297cffa234d2838106bad65869fb57068c95a Parents: d13b22b Author: Francesco ChicchiriccòAuthored: Fri Mar 18 15:51:13 2016 +0100 Committer: Francesco Chicchiriccò Committed: Fri Mar 18 17:14:55 2016 +0100 -- .../AbstractSwagger2ServiceDescriptionTest.java | 1 + ...gger2NonAnnotatedServiceDescriptionTest.java | 2 +- .../jaxrs/description/swagger2-noano-yaml.txt | 4 ++- .../systest/jaxrs/description/swagger2-yaml.txt | 33 ++-- 4 files changed, 36 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/f49297cf/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java index 3332f47..bf4b168 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java @@ -55,6 +55,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus this.runAsFilter = runAsFilter; } +@Override protected void run() { final JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(BookStoreSwagger2.class); http://git-wip-us.apache.org/repos/asf/cxf/blob/f49297cf/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java index f47af93..dd56fe2 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java @@ -77,6 +77,6 @@ public class Swagger2NonAnnotatedServiceDescriptionTest extends AbstractSwagger2 @Override protected String getExpectedFileYaml() { -return "swagger2-noano-json.txt"; +return "swagger2-noano-yaml.txt"; } } http://git-wip-us.apache.org/repos/asf/cxf/blob/f49297cf/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt -- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt index 8bd33ee..5ef0eb4 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt @@ -29,12 +29,14 @@ paths: /bookstore/names: get: operationId: "getBookNames" + produces: + - "application/json" parameters: - name: "page" in: "query" required: false type: "integer" -default: "1" +default: 1 format: "int32" responses: default: http://git-wip-us.apache.org/repos/asf/cxf/blob/f49297cf/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt -- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt index 75c34d0..1947c41 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt @@ -29,7 +29,7 @@ paths: description: "Page
[5/5] cxf-fediz git commit: Checkstyle fix
Checkstyle fix Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/cb89526b Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/cb89526b Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/cb89526b Branch: refs/heads/master Commit: cb89526b589948767dad8e25474c342c29c17bfd Parents: e8c840f Author: Colm O hEigeartaighAuthored: Fri Mar 18 17:06:23 2016 + Committer: Colm O hEigeartaigh Committed: Fri Mar 18 17:06:23 2016 + -- .../src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/cb89526b/systests/samlsso/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java -- diff --git a/systests/samlsso/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java b/systests/samlsso/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java index c245bb1..7acad0a 100644 --- a/systests/samlsso/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java +++ b/systests/samlsso/src/test/java/org/apache/cxf/fediz/systests/idp/IdpTest.java @@ -220,7 +220,7 @@ public class IdpTest { Document responseDoc = StaxUtils.read(new InputStreamReader(inputStream, "UTF-8")); XMLObject responseObject = OpenSAMLUtil.fromDom(responseDoc.getDocumentElement()); -Assert.assertTrue((responseObject instanceof org.opensaml.saml.saml2.core.Response)); +Assert.assertTrue(responseObject instanceof org.opensaml.saml.saml2.core.Response); org.opensaml.saml.saml2.core.Response samlResponseObject = (org.opensaml.saml.saml2.core.Response)responseObject;
[01/10] cxf git commit: [CXF-6768]InternalContextUtils should bak all the data from the input stream before send back partialResponse
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 0213838ad -> 0afa9d25d [CXF-6768]InternalContextUtils should bak all the data from the input stream before send back partialResponse (cherry picked from commit 2726b68fa3dbc8a98018cc957bef47a23c9a950e) # Conflicts: # rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bbb02cf6 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bbb02cf6 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bbb02cf6 Branch: refs/heads/3.0.x-fixes Commit: bbb02cf67e9f1431f3555e5aae3af79a6c9c9487 Parents: 0213838 Author: Freeman FangAuthored: Wed Feb 17 12:03:14 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 10:57:40 2016 -0400 -- .../addressing/impl/InternalContextUtils.java | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/bbb02cf6/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java -- diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java index 421958e..342850a 100644 --- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java +++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java @@ -269,7 +269,16 @@ final class InternalContextUtils { new PreexistingConduitSelector(backChannel, exchange.get(Endpoint.class))); -if (chain != null && !chain.doIntercept(partialResponse) +if (ContextUtils.retrieveAsyncPostResponseDispatch(inMessage) && !robust) { +//need to suck in all the data from the input stream as +//the transport might discard any data on the stream when this +//thread unwinds or when the empty response is sent back +DelegatingInputStream in = inMessage.getContent(DelegatingInputStream.class); +if (in != null) { +in.cacheInput(); +} +} +if (chain != null && !chain.doIntercept(partialResponse) && partialResponse.getContent(Exception.class) != null) { if (partialResponse.getContent(Exception.class) instanceof Fault) { throw (Fault)partialResponse.getContent(Exception.class); @@ -294,14 +303,7 @@ final class InternalContextUtils { if (ContextUtils.retrieveAsyncPostResponseDispatch(inMessage) && !robust) { -//need to suck in all the data from the input stream as -//the transport might discard any data on the stream when this -//thread unwinds or when the empty response is sent back -DelegatingInputStream in = inMessage.getContent(DelegatingInputStream.class); -if (in != null) { -in.cacheInput(); -} - + // async service invocation required *after* a response // has been sent (i.e. to a oneway, or a partial response // to a decoupled twoway)
cxf-fediz git commit: Initial prototyping a home/account service
Repository: cxf-fediz Updated Branches: refs/heads/master cb89526b5 -> 44b61cfae Initial prototyping a home/account service Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/44b61cfa Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/44b61cfa Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/44b61cfa Branch: refs/heads/master Commit: 44b61cfaedbc3e6829d7b3d7aaa586b60b28f2f5 Parents: cb89526 Author: Sergey BeryozkinAuthored: Fri Mar 18 17:39:16 2016 + Committer: Sergey Beryozkin Committed: Fri Mar 18 17:39:16 2016 + -- .../fediz/service/oidc/account/UserAccount.java | 33 ++ .../oidc/account/UserAccountService.java| 44 + .../main/webapp/WEB-INF/applicationContext.xml | 10 +++ .../main/webapp/WEB-INF/views/userAccount.jsp | 67 services/oidc/src/main/webapp/WEB-INF/web.xml | 13 5 files changed, 167 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/44b61cfa/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java -- diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java new file mode 100644 index 000..e5a9ee6 --- /dev/null +++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java @@ -0,0 +1,33 @@ +/** + * 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.fediz.service.oidc.account; + +public class UserAccount { +private String userName; +public UserAccount(String userName) { +this.userName = userName; +} +public String getUserName() { +return userName; +} +public void setUserName(String userName) { +this.userName = userName; +} + +} http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/44b61cfa/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java -- diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java new file mode 100644 index 000..d56c2d8 --- /dev/null +++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java @@ -0,0 +1,44 @@ +/** + * 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.fediz.service.oidc.account; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.SecurityContext; + +@Path("/") +public class UserAccountService { + +@Context +private SecurityContext sc; + +@GET +@Produces(MediaType.TEXT_HTML) +public UserAccount getAccount() { +return new UserAccount(getUserName()); +} +private String getUserName() { +return sc.getUserPrincipal().getName(); +} + +}
[02/10] cxf git commit: [CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest is null
[CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest is null (cherry picked from commit 4fc5e7af1a6fc358931abdb17e0b250e87480ac4) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1a377379 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1a377379 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1a377379 Branch: refs/heads/3.0.x-fixes Commit: 1a37737904828f90fc4898263a5e667836eb49b0 Parents: bbb02cf Author: Freeman FangAuthored: Thu Feb 18 15:19:17 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 10:58:02 2016 -0400 -- .../apache/cxf/transport/http/AbstractHTTPDestination.java| 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/1a377379/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java -- diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java index 92a4866..76193fb 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java @@ -342,7 +342,12 @@ public abstract class AbstractHTTPDestination servletPath = ""; } String contextServletPath = contextPath + servletPath; -inMessage.put(Message.PATH_INFO, contextServletPath + req.getPathInfo()); +String pathInfo = req.getPathInfo(); +if (pathInfo != null) { +inMessage.put(Message.PATH_INFO, contextServletPath + pathInfo); +} else { +inMessage.put(Message.PATH_INFO, requestURI); +} if (!StringUtils.isEmpty(requestURI)) { int index = requestURL.indexOf(requestURI); if (index > 0) {
[2/2] cxf git commit: [CXF-5193] Fix anonymous fixed IDL type handling This closes #123
[CXF-5193] Fix anonymous fixed IDL type handling This closes #123 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a895f301 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a895f301 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a895f301 Branch: refs/heads/3.1.x-fixes Commit: a895f30153e9c2430cc7d96351074ac986588cf0 Parents: d3baa23 Author: Grzegorz GrzybekAuthored: Thu Mar 17 13:41:25 2016 +0100 Committer: Daniel Kulp Committed: Fri Mar 18 11:48:27 2016 -0400 -- .../corba/processors/idl/FixedVisitor.java | 42 ++--- .../processors/IDLToWSDLGenerationTest.java | 5 + .../src/test/resources/idl/FixedStruct.idl | 32 +++ .../resources/idl/expected_FixedStruct.wsdl | 98 4 files changed, 166 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/a895f301/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java -- diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java index 6b108cf..1cc9e5f 100644 --- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java +++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java @@ -24,6 +24,8 @@ import javax.xml.namespace.QName; import antlr.collections.AST; +import org.apache.cxf.binding.corba.wsdl.Anonfixed; +import org.apache.cxf.binding.corba.wsdl.CorbaType; import org.apache.cxf.binding.corba.wsdl.Fixed; import org.apache.ws.commons.schema.XmlSchema; import org.apache.ws.commons.schema.XmlSchemaFractionDigitsFacet; @@ -76,7 +78,12 @@ public class FixedVisitor extends VisitorBase { AST digitsNode = fixedNode.getFirstChild(); AST scaleNode = digitsNode.getNextSibling(); -Scope scopedName = new Scope(getScope(), identifierNode); +Scope scopedName = null; +if (identifierNode == null) { +scopedName = TypesUtils.generateAnonymousScopedName(getScope(), schema); +} else { +scopedName = new Scope(getScope(), identifierNode); +} // validate digits and scale Long digits = Long.valueOf(digitsNode.toString()); @@ -109,17 +116,30 @@ public class FixedVisitor extends VisitorBase { // add xmlschema:fixed setSchemaType(fixedSimpleType); - -// corba:fixed -Fixed corbaFixed = new Fixed(); -corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); -corbaFixed.setDigits(digits); -corbaFixed.setScale(scale); -corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); -//corbaFixed.setType(Constants.XSD_DECIMAL); -corbaFixed.setType(fixedSimpleType.getQName()); +CorbaType type = null; +if (identifierNode != null) { +// corba:fixed +Fixed corbaFixed = new Fixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +type = corbaFixed; +} else { +// corba:anonfixed +Anonfixed corbaFixed = new Anonfixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +typeMap.getStructOrExceptionOrUnion().add(corbaFixed); +type = corbaFixed; +} // add corba:fixed -setCorbaType(corbaFixed); +setCorbaType(type); } } http://git-wip-us.apache.org/repos/asf/cxf/blob/a895f301/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java -- diff --git a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java b/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java index e3de3e1..7d47d71 100644 --- a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java +++
cxf git commit: Fixing Sagger2 systests
Repository: cxf Updated Branches: refs/heads/master ea618d7af -> 4799fef82 Fixing Sagger2 systests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4799fef8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4799fef8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4799fef8 Branch: refs/heads/master Commit: 4799fef822a96f5d1b2827d5cc42ab886fd4e673 Parents: ea618d7 Author: Francesco ChicchiriccòAuthored: Fri Mar 18 15:51:13 2016 +0100 Committer: Francesco Chicchiriccò Committed: Fri Mar 18 17:14:29 2016 +0100 -- .../AbstractSwagger2ServiceDescriptionTest.java | 1 + ...gger2NonAnnotatedServiceDescriptionTest.java | 2 +- .../systest/jaxrs/description/swagger2-json.txt | 2 +- .../jaxrs/description/swagger2-noano-yaml.txt | 4 +- .../systest/jaxrs/description/swagger2-yaml.txt | 51 5 files changed, 37 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java index 3332f47..bf4b168 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java @@ -55,6 +55,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus this.runAsFilter = runAsFilter; } +@Override protected void run() { final JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(BookStoreSwagger2.class); http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java index f47af93..dd56fe2 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java @@ -77,6 +77,6 @@ public class Swagger2NonAnnotatedServiceDescriptionTest extends AbstractSwagger2 @Override protected String getExpectedFileYaml() { -return "swagger2-noano-json.txt"; +return "swagger2-noano-yaml.txt"; } } http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt -- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt index a1317de..0df74e4 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt @@ -1 +1 @@ -{"swagger":"2.0","info":{"description":"The Application","version":"1.0.0","title":"Sample REST Application","contact":{"name":"us...@cxf.apache.org"},"license":{"name":"Apache 2.0 License","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"localhost:%s","basePath":"/","tags":[{"name":"bookstore"}],"paths":{"/bookstore":{"get":{"tags":["bookstore"],"summary":"Get books","description":"Get books","operationId":"getBooks","produces":["application/json"],"parameters":[{"name":"page","in":"query","description":"Page to fetch","required":true,"type":"integer","default":1,"format":"int32"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Book"}},"/bookstore/{id}":{"get":{"tags":["bookstore"],"summary":"Get book by Id","description":"Get book by Id","operationId":"getBook","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int
cxf git commit: [CXF-6832] Supporting Content-Disposition headers with dashes
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes e515c1365 -> 0b858a713 [CXF-6832] Supporting Content-Disposition headers with dashes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0b858a71 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0b858a71 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0b858a71 Branch: refs/heads/3.0.x-fixes Commit: 0b858a7131f329f92446e7dd660da47f353c5aa6 Parents: e515c13 Author: Sergey BeryozkinAuthored: Wed Mar 16 16:05:31 2016 + Committer: Sergey Beryozkin Committed: Wed Mar 16 16:07:44 2016 + -- .../java/org/apache/cxf/attachment/ContentDisposition.java| 2 +- .../cxf/jaxrs/ext/multipart/ContentDispositionTest.java | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/0b858a71/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java -- diff --git a/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java b/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java index 330822d..f7cfd97 100644 --- a/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java +++ b/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java @@ -28,7 +28,7 @@ import java.util.regex.Pattern; public class ContentDisposition { private static final String CD_HEADER_PARAMS_EXPRESSION = -"(([\\w]+( )?\\*?=( )?\"[^\"]+\")|([\\w]+( )?\\*?=( )?[^;]+))"; +"(([\\w-]+( )?\\*?=( )?\"[^\"]+\")|([\\w-]+( )?\\*?=( )?[^;]+))"; private static final Pattern CD_HEADER_PARAMS_PATTERN = Pattern.compile(CD_HEADER_PARAMS_EXPRESSION); http://git-wip-us.apache.org/repos/asf/cxf/blob/0b858a71/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java -- diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java index bae9020..bd89162 100644 --- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java +++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java @@ -47,4 +47,11 @@ public class ContentDispositionTest extends Assert { assertEquals("baz1", cd.getParameter("baz")); } +@Test +public void testContentDispositionWithCreationDate() { +ContentDisposition cd = new ContentDisposition(" attachment ; creation-date=\"21:08:08 14:00:00\""); +assertEquals("attachment", cd.getType()); +assertEquals("21:08:08 14:00:00", cd.getParameter("creation-date")); +} + }
[2/2] cxf git commit: Updating Build Utils
Updating Build Utils Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bc5bbe89 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bc5bbe89 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bc5bbe89 Branch: refs/heads/3.1.x-fixes Commit: bc5bbe8959a6767051b58a41b24a7d748b67fa84 Parents: cd62f0a Author: Colm O hEigeartaighAuthored: Fri Mar 18 14:49:42 2016 + Committer: Colm O hEigeartaigh Committed: Fri Mar 18 14:50:03 2016 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/bc5bbe89/pom.xml -- diff --git a/pom.xml b/pom.xml index ee3a7f9..dffeca0 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ false -3.1.0 +3.2.0 3.0.5 1.7 UTF-8
[1/2] cxf git commit: Recording .gitmergeinfo Changes
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes d3baa23e3 -> 5d0ac9e12 Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5d0ac9e1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5d0ac9e1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5d0ac9e1 Branch: refs/heads/3.1.x-fixes Commit: 5d0ac9e12b9658fbfea8c7c952783973462eabac Parents: a895f30 Author: Daniel KulpAuthored: Fri Mar 18 11:48:27 2016 -0400 Committer: Daniel Kulp Committed: Fri Mar 18 11:48:27 2016 -0400 -- .gitmergeinfo | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/5d0ac9e1/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index d5c56c8..7f43964 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -12,6 +12,7 @@ B 343d06d94838cd26f682f7afbcea0e422aa1597d B 39851b83af116611ce0efe70c4b9a32ee8491523 B 3b2f2ed2db01f05fa9b648693ce33978ccc8ede8 B 47a431412dbd7669d89a70d6fed49053e70dfed1 +B 4b37844e9c15812d1855d0babded79880d2cd6fb B 4f1afbf76d3e525163663b71104ce2adb9cb7a85 B 53a46205871434d8c47ed45822e078e5ad6d2c60 B 59b8615053ddcad353fbebcd9a5b1109ae0897a1
cxf git commit: Updating Build Utils
Repository: cxf Updated Branches: refs/heads/master aafcec2b3 -> 1184e08f0 Updating Build Utils Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1184e08f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1184e08f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1184e08f Branch: refs/heads/master Commit: 1184e08f0d1c40c754e39fd5d6340d1057fbdd17 Parents: aafcec2 Author: Colm O hEigeartaighAuthored: Fri Mar 18 14:49:42 2016 + Committer: Colm O hEigeartaigh Committed: Fri Mar 18 14:49:42 2016 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/1184e08f/pom.xml -- diff --git a/pom.xml b/pom.xml index e1fad1d..5197c09 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ false -3.1.0 +3.2.0 3.0.5 1.8 UTF-8
[3/3] cxf-fediz git commit: Finished cleaning up the IdP beans
Finished cleaning up the IdP beans Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/ee79fdd1 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/ee79fdd1 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/ee79fdd1 Branch: refs/heads/master Commit: ee79fdd1bce7dc547756e78c9616a702646667ba Parents: 16a974c Author: Colm O hEigeartaighAuthored: Wed Mar 16 17:00:40 2016 + Committer: Colm O hEigeartaigh Committed: Wed Mar 16 17:00:40 2016 + -- .../cxf/fediz/service/idp/beans/STSClientAction.java | 10 -- .../fediz/service/idp/beans/wsfed/WreplyValidator.java| 4 +--- .../webapp/WEB-INF/flows/federation-validate-request.xml | 2 +- .../main/webapp/WEB-INF/flows/saml-validate-request.xml | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/ee79fdd1/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java -- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java index ad0a6f4..58a69f3 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java @@ -178,10 +178,10 @@ public class STSClientAction { * @return a serialized RP security token * @throws Exception */ -public String submit(RequestContext context, String realm) +public String submit(RequestContext context, String realm, String homeRealm) throws Exception { -SecurityToken idpToken = getSecurityToken(context); +SecurityToken idpToken = getSecurityToken(context, homeRealm); Bus cxfBus = getBus(); Idp idpConfig = (Idp) WebUtils.getAttributeFromFlowScope(context, "idpConfig"); @@ -320,14 +320,12 @@ public class STSClientAction { return ""; } -private SecurityToken getSecurityToken(RequestContext context) throws ProcessingException { -String whr = (String) WebUtils. -getAttributeFromFlowScope(context, FederationConstants.PARAM_HOME_REALM); +private SecurityToken getSecurityToken(RequestContext context, String homeRealm) throws ProcessingException { SecurityToken idpToken = (SecurityToken) WebUtils.getAttributeFromFlowScope(context, "idpToken"); if (idpToken != null) { LOG.debug("[IDP_TOKEN={} successfully retrieved from cache for home realm [{}]", - idpToken.getId(), whr); + idpToken.getId(), homeRealm); } else { LOG.error("IDP_TOKEN not found"); throw new ProcessingException(TYPE.BAD_REQUEST); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/ee79fdd1/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/wsfed/WreplyValidator.java -- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/wsfed/WreplyValidator.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/wsfed/WreplyValidator.java index 2b542b0..afc8607 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/wsfed/WreplyValidator.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/wsfed/WreplyValidator.java @@ -21,8 +21,6 @@ package org.apache.cxf.fediz.service.idp.beans.wsfed; import java.util.regex.Matcher; import org.apache.commons.validator.routines.UrlValidator; -import org.apache.cxf.fediz.core.exception.ProcessingException; -import org.apache.cxf.fediz.core.exception.ProcessingException.TYPE; import org.apache.cxf.fediz.service.idp.domain.Application; import org.apache.cxf.fediz.service.idp.domain.Idp; import org.apache.cxf.fediz.service.idp.util.WebUtils; @@ -42,7 +40,7 @@ public class WreplyValidator { public boolean isValid(RequestContext context, String wreply, String realm) throws Exception { if (wreply == null) { - return true; +return true; } Idp idpConfig = (Idp) WebUtils.getAttributeFromFlowScope(context, "idpConfig"); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/ee79fdd1/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml -- diff --git a/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml
[06/10] cxf git commit: [CXF-6435]remove unnecessary static modifier
[CXF-6435]remove unnecessary static modifier (cherry picked from commit 41727971d19254da3027d7c583ac267224f8ae7d) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a0177b07 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a0177b07 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a0177b07 Branch: refs/heads/3.0.x-fixes Commit: a0177b07ec3d2fb96ccbf19861e13ac25ea426d1 Parents: 636929f Author: Freeman FangAuthored: Mon Mar 7 17:59:38 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 11:01:43 2016 -0400 -- .../java/org/apache/cxf/attachment/AttachmentSerializer.java | 6 +++--- .../org/apache/cxf/interceptor/AttachmentOutInterceptor.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/a0177b07/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java -- diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java index 34402dc..44f5566 100644 --- a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java +++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java @@ -45,7 +45,7 @@ public class AttachmentSerializer { // http://tools.ietf.org/html/rfc2387 private static final String DEFAULT_MULTIPART_TYPE = "multipart/related"; -private static String contentTransferEncoding = "binary"; +private String contentTransferEncoding = "binary"; private Message message; private String bodyBoundary; @@ -185,7 +185,7 @@ public class AttachmentSerializer { return s.indexOf('"') != 0 ? s.replace("\"", "\\\"") : s; } -public static void setContentTransferEncoding(String cte) { +public void setContentTransferEncoding(String cte) { contentTransferEncoding = cte; } @@ -204,7 +204,7 @@ public class AttachmentSerializer { return sb.toString(); } -private static void writeHeaders(String contentType, String attachmentId, +private void writeHeaders(String contentType, String attachmentId, Map headers, Writer writer) throws IOException { writer.write("\r\nContent-Type: "); writer.write(contentType); http://git-wip-us.apache.org/repos/asf/cxf/blob/a0177b07/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java -- diff --git a/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java index 16b7d79..8543960 100644 --- a/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java +++ b/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java @@ -70,7 +70,7 @@ public class AttachmentOutInterceptor extends AbstractPhaseInterceptor String contentTransferEncoding = (String)message.getContextualProperty( org.apache.cxf.message.Message.CONTENT_TRANSFER_ENCODING); if (contentTransferEncoding != null) { - AttachmentSerializer.setContentTransferEncoding(contentTransferEncoding); +serializer.setContentTransferEncoding(contentTransferEncoding); } try {
cxf git commit: Recording .gitmergeinfo Changes
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 0b858a713 -> 3203bc69d Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3203bc69 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3203bc69 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3203bc69 Branch: refs/heads/3.0.x-fixes Commit: 3203bc69d37fdf74cad2ad4ce90a6637760f409a Parents: 0b858a7 Author: Colm O hEigeartaighAuthored: Fri Mar 18 14:50:18 2016 + Committer: Colm O hEigeartaigh Committed: Fri Mar 18 14:50:18 2016 + -- .gitmergeinfo | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/3203bc69/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index 0b68346..88770f0 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -646,6 +646,7 @@ B bb9b5d2e15c0e30d12a6dea3db1a6f720aaf07ad B bbe5e870579720272af49b9cea65b8293d5b1f3c B bbfe35e464e2f4a6a4783420104d0d90c287fff7 B bc025f0fe4acf7191430230080318346272543e1 +B bc5bbe8959a6767051b58a41b24a7d748b67fa84 B bc752dc5bd89b5d70d00435fc1185e72659d7e4d B bc9e3714adc8848f37694eea62d33748b01fbb91 B bcf0c9f825a7b8d1c86405403d7c089fea2955c0 @@ -719,6 +720,7 @@ B d1c7f1f6be4ce14bd0e99ec9672d9c1957515f35 B d2ed88ccb247d4105de34a5b675c0fc198795209 B d2ee79c9371fa23ecd8e2a3a0d907c3256466f28 B d391d9371d8505c7774308c4fbbb9bc57ffd34a6 +B d3baa23e3cbac2364498f81ab293aeb61902caa7 B d3e9295d3acfe3c970a325bbbafdba83a0d6e83c B d3ea067659eb3f765df0bee6ce7b4abb55f76ab5 B d3fc22efa8153a1edc1880c05ede6d44208fa03a
cxf git commit: [CXF-5193] Fix anonymous fixed IDL type handling This closes #123
Repository: cxf Updated Branches: refs/heads/master 1184e08f0 -> ea618d7af [CXF-5193] Fix anonymous fixed IDL type handling This closes #123 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ea618d7a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ea618d7a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ea618d7a Branch: refs/heads/master Commit: ea618d7af68ab2025fbcd63ece4a7e3f28afcd0b Parents: 1184e08 Author: Grzegorz GrzybekAuthored: Thu Mar 17 13:41:25 2016 +0100 Committer: Daniel Kulp Committed: Fri Mar 18 11:39:18 2016 -0400 -- .../corba/processors/idl/FixedVisitor.java | 42 ++--- .../processors/IDLToWSDLGenerationTest.java | 5 + .../src/test/resources/idl/FixedStruct.idl | 32 +++ .../resources/idl/expected_FixedStruct.wsdl | 98 4 files changed, 166 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/ea618d7a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java -- diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java index 6b108cf..1cc9e5f 100644 --- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java +++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java @@ -24,6 +24,8 @@ import javax.xml.namespace.QName; import antlr.collections.AST; +import org.apache.cxf.binding.corba.wsdl.Anonfixed; +import org.apache.cxf.binding.corba.wsdl.CorbaType; import org.apache.cxf.binding.corba.wsdl.Fixed; import org.apache.ws.commons.schema.XmlSchema; import org.apache.ws.commons.schema.XmlSchemaFractionDigitsFacet; @@ -76,7 +78,12 @@ public class FixedVisitor extends VisitorBase { AST digitsNode = fixedNode.getFirstChild(); AST scaleNode = digitsNode.getNextSibling(); -Scope scopedName = new Scope(getScope(), identifierNode); +Scope scopedName = null; +if (identifierNode == null) { +scopedName = TypesUtils.generateAnonymousScopedName(getScope(), schema); +} else { +scopedName = new Scope(getScope(), identifierNode); +} // validate digits and scale Long digits = Long.valueOf(digitsNode.toString()); @@ -109,17 +116,30 @@ public class FixedVisitor extends VisitorBase { // add xmlschema:fixed setSchemaType(fixedSimpleType); - -// corba:fixed -Fixed corbaFixed = new Fixed(); -corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); -corbaFixed.setDigits(digits); -corbaFixed.setScale(scale); -corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); -//corbaFixed.setType(Constants.XSD_DECIMAL); -corbaFixed.setType(fixedSimpleType.getQName()); +CorbaType type = null; +if (identifierNode != null) { +// corba:fixed +Fixed corbaFixed = new Fixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +corbaFixed.setRepositoryID(scopedName.toIDLRepositoryID()); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +type = corbaFixed; +} else { +// corba:anonfixed +Anonfixed corbaFixed = new Anonfixed(); +corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString())); +corbaFixed.setDigits(digits); +corbaFixed.setScale(scale); +//corbaFixed.setType(Constants.XSD_DECIMAL); +corbaFixed.setType(fixedSimpleType.getQName()); +typeMap.getStructOrExceptionOrUnion().add(corbaFixed); +type = corbaFixed; +} // add corba:fixed -setCorbaType(corbaFixed); +setCorbaType(type); } } http://git-wip-us.apache.org/repos/asf/cxf/blob/ea618d7a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java -- diff --git a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java b/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java index e3de3e1..7d47d71 100644 --- a/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/IDLToWSDLGenerationTest.java +++
[1/2] cxf git commit: Recording .gitmergeinfo Changes
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 3203bc69d -> d13b22b37 Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d13b22b3 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d13b22b3 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d13b22b3 Branch: refs/heads/3.0.x-fixes Commit: d13b22b3780eb43a564af66705f560c869b79051 Parents: 2c00184 Author: Daniel KulpAuthored: Fri Mar 18 12:14:28 2016 -0400 Committer: Daniel Kulp Committed: Fri Mar 18 12:14:28 2016 -0400 -- .gitmergeinfo | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/d13b22b3/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index 88770f0..9c92887 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -325,6 +325,7 @@ B 5bac26a132e7999bf0bd108d4cffb674873a56ca B 5bc8c0c41e3cef645ee6c7a1587d19e844fc7e4c B 5c541cd9c16ed2d982085410cb801f2f21dbc82d B 5c678face89e4d38b2879bc4679ce3b92ac3aeb0 +B 5d0ac9e12b9658fbfea8c7c952783973462eabac B 5d387616bc1787f3ae50dbe2a185c6abb0e9955b B 5e06ba0c4970700477484bd2409a226aa9ec7f0a B 5e5470e7b994b25a318a5b6bbf4e0de5aee430b4 @@ -1042,6 +1043,7 @@ M 79156d8a23497b9ed9bd912b64f684e610d49863 M 7988c4a974118cc5c2a8bd956fe396a7d5e8bb5c M 79f8cee005bc09bae7bcb37bba15151bea27e416 M 79f9a1056d979b138041ef0693052d3f989ef522 +M 7a35d33145a7d1f2d00d01df130f836127d65f62 M 7abdac771c87f759615292fe40dbe313ab14cda5 M 7b31a2afca1ec599100511ce1f7428160618f389 M 7b4cb818cb6276dfd3a7432c796e67e98c8c941e @@ -1099,6 +1101,7 @@ M a614b75389c2758d6d27e598b679ba013bcb72f0 M a64265c29be124e9bffb46eb35a68b3504860c3a M a64ded455c40169665e438ae7a25f17bd4f8047a M a79158c70fb2c8cedf109e78eeec32691a32e306 +M a895f30153e9c2430cc7d96351074ac986588cf0 M a9555675b829acdfb1672bc2157d6f3c08fdd652 M a97f886f36c8aea2a49860ec8cd33b0021b7b9e2 M a9a1305a9588d2c886d763d0c1ef892c2b9b0b71
[03/10] cxf git commit: [CXF-6812]:WebTargetImpl should always check if client is closed first
[CXF-6812]:WebTargetImpl should always check if client is closed first Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/03fe259c Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/03fe259c Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/03fe259c Branch: refs/heads/3.0.x-fixes Commit: 03fe259c39d635194a6d9628a83f6e5c7acd7877 Parents: 1a37737 Author: Jim MaAuthored: Wed Mar 2 13:56:14 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 10:59:51 2016 -0400 -- .../apache/cxf/jaxrs/client/spec/ClientImpl.java| 11 --- .../cxf/jaxrs/client/cache/ClientCacheTest.java | 16 2 files changed, 24 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/03fe259c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java -- diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java index 316dd69..4f089d6 100644 --- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java +++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java @@ -153,7 +153,7 @@ public class ClientImpl implements Client { private void checkClosed() { if (closed) { -throw new IllegalStateException(); +throw new IllegalStateException("client is closed"); } } @@ -359,12 +359,14 @@ public class ClientImpl implements Client { @Override public WebTarget path(String path) { +checkClosed(); checkNull(path); return newWebTarget(getUriBuilder().path(path)); } @Override public WebTarget queryParam(String name, Object... values) { +checkClosed(); checkNullValues(name, values); UriBuilder thebuilder = getUriBuilder(); if (values == null || values.length == 1 && values[0] == null) { @@ -377,6 +379,7 @@ public class ClientImpl implements Client { @Override public WebTarget matrixParam(String name, Object... values) { +checkClosed(); checkNullValues(name, values); UriBuilder thebuilder = getUriBuilder(); @@ -395,6 +398,7 @@ public class ClientImpl implements Client { @Override public WebTarget resolveTemplate(String name, Object value, boolean encodeSlash) { +checkClosed(); checkNull(name, value); return newWebTarget(getUriBuilder().resolveTemplate(name, value, encodeSlash)); } @@ -412,6 +416,7 @@ public class ClientImpl implements Client { @Override public WebTarget resolveTemplates(Map templatesMap, boolean encodeSlash) { +checkClosed(); checkNullMap(templatesMap); if (templatesMap.isEmpty()) { @@ -422,6 +427,7 @@ public class ClientImpl implements Client { @Override public WebTarget resolveTemplatesFromEncoded(Map templatesMap) { +checkClosed(); checkNullMap(templatesMap); if (templatesMap.isEmpty()) { return this; @@ -429,8 +435,7 @@ public class ClientImpl implements Client { return newWebTarget(getUriBuilder().resolveTemplatesFromEncoded(templatesMap)); } -private WebTarget newWebTarget(UriBuilder newBuilder) { -checkClosed(); +private WebTarget newWebTarget(UriBuilder newBuilder) { boolean complete = false; if (targetClient != null) { try { http://git-wip-us.apache.org/repos/asf/cxf/blob/03fe259c/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java -- diff --git a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java index e3ef126..bbe6f7c 100644 --- a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java +++ b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java @@ -21,10 +21,12 @@ package org.apache.cxf.jaxrs.client.cache; import java.io.InputStream; import java.io.Serializable; +import java.util.HashMap; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; +import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Invocation;
[05/10] cxf git commit: revert unwanted change
revert unwanted change (cherry picked from commit bff065607c7d5e6a6918179e977e27f346259906) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/636929fa Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/636929fa Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/636929fa Branch: refs/heads/3.0.x-fixes Commit: 636929fa3ab2eed774a987155fc0d7f8ca0b9984 Parents: fdc1e622 Author: Freeman FangAuthored: Mon Mar 7 08:56:27 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 11:01:30 2016 -0400 -- .../java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/636929fa/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java index 38900ff..227a01e 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java @@ -202,7 +202,7 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase { @Test public void testNonExistentJaxrs20WithPost() throws Exception { Client client = ClientBuilder.newClient(); -WebTarget target = client.target("http://test-test/;); +WebTarget target = client.target("http://test.test/;); Invocation.Builder builder = target.request(); Entity entity = Entity.entity("entity", MediaType.WILDCARD_TYPE); Invocation invocation = builder.buildPost(entity);
[07/10] cxf git commit: [CXF-6818] Upgrade to latest Jetty8 8.1.19.v20160209 This closes #117
[CXF-6818] Upgrade to latest Jetty8 8.1.19.v20160209 This closes #117 # Conflicts: # parent/pom.xml # Conflicts: # parent/pom.xml Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/41ce3c21 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/41ce3c21 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/41ce3c21 Branch: refs/heads/3.0.x-fixes Commit: 41ce3c210f6e04b6ce81690a75041221a5db2fee Parents: a0177b0 Author: Andrea CosentinoAuthored: Fri Mar 4 09:54:53 2016 +0100 Committer: Daniel Kulp Committed: Wed Mar 16 11:03:05 2016 -0400 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/41ce3c21/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 7620b11..1a49ffa 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -127,7 +127,7 @@ 2.2 1.0 1.3.7 -8.1.15.v20140411 +8.1.19.v20160209 [7.6,8.2) 1.2.6 4.12
cxf git commit: add the stacktrace output in CustomerService for CXF-5855
Repository: cxf Updated Branches: refs/heads/master 5404ada11 -> 62ca4018b add the stacktrace output in CustomerService for CXF-5855 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/62ca4018 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/62ca4018 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/62ca4018 Branch: refs/heads/master Commit: 62ca4018bcdd7ea71df23dbf5111a553780ba2c8 Parents: 5404ada Author: Akitoshi YoshidaAuthored: Thu Mar 17 10:08:25 2016 +0100 Committer: Akitoshi Yoshida Committed: Thu Mar 17 10:08:25 2016 +0100 -- .../src/main/java/demo/jaxrs/server/CustomerService.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/62ca4018/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java -- diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java index cc039ff..f77f8aa 100644 --- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java +++ b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java @@ -186,6 +186,8 @@ public class CustomerService { } catch (IOException e) { System.out.println("error writing to " + wh.getValue() + " " + wh.get()); if (wh.increment()) { +// the max error count reached; purging the output resource +e.printStackTrace(); try { wh.getValue().close(); } catch (IOException e2) { @@ -205,6 +207,8 @@ public class CustomerService { } catch (IOException e) { System.out.println("error writing to " + wh.getValue() + " " + wh.get()); if (wh.increment()) { +// the max error count reached; purging the output resource +e.printStackTrace(); try { wh.getValue().getOutputStream().close(); } catch (IOException e2) {
[1/2] cxf git commit: Fix a typo in FIXED_PARAMETER_ORDER This closes #122
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 15f7ffb2f -> d7e2821f8 Fix a typo in FIXED_PARAMETER_ORDER This closes #122 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/75a4e817 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/75a4e817 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/75a4e817 Branch: refs/heads/3.1.x-fixes Commit: 75a4e817380c78c33c62dd21acc5467fd15850ec Parents: 15f7ffb Author: Tomas RohovskyAuthored: Tue Mar 15 13:32:54 2016 +0100 Committer: Daniel Kulp Committed: Wed Mar 16 10:51:58 2016 -0400 -- core/src/main/java/org/apache/cxf/message/Message.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/75a4e817/core/src/main/java/org/apache/cxf/message/Message.java -- diff --git a/core/src/main/java/org/apache/cxf/message/Message.java b/core/src/main/java/org/apache/cxf/message/Message.java index 0c68178..a3d0251 100644 --- a/core/src/main/java/org/apache/cxf/message/Message.java +++ b/core/src/main/java/org/apache/cxf/message/Message.java @@ -146,7 +146,7 @@ public interface Message extends StringMap { String ACCEPT_CONTENT_TYPE = "Accept"; String BASE_PATH = Message.class.getName() + ".BASE_PATH"; String ENCODING = Message.class.getName() + ".ENCODING"; -String FIXED_PARAMETER_ORDER = Message.class.getName() + "FIXED_PARAMETER_ORDER"; +String FIXED_PARAMETER_ORDER = Message.class.getName() + ".FIXED_PARAMETER_ORDER"; String MAINTAIN_SESSION = Message.class.getName() + ".MAINTAIN_SESSION"; String ATTACHMENTS = Message.class.getName() + ".ATTACHMENTS";
cxf git commit: [CXF-6795] Enable loopback mode for multicast sockets. This closes #113
Repository: cxf Updated Branches: refs/heads/master 330272d73 -> bafe76605 [CXF-6795] Enable loopback mode for multicast sockets. This closes #113 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bafe7660 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bafe7660 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bafe7660 Branch: refs/heads/master Commit: bafe766056ffb5bc060af36db41c5c0fe6948257 Parents: 330272d Author: Nick BirnieAuthored: Mon Feb 22 16:34:36 2016 + Committer: Daniel Kulp Committed: Wed Mar 16 10:50:39 2016 -0400 -- .../src/main/java/org/apache/cxf/transport/udp/UDPConduit.java | 4 .../main/java/org/apache/cxf/transport/udp/UDPDestination.java | 1 + .../java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java | 2 ++ 3 files changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/bafe7660/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java -- diff --git a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java index 0326bb9..4df1900 100644 --- a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java +++ b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java @@ -243,6 +243,10 @@ public class UDPConduit extends AbstractConduit { socket.setSendBufferSize(this.size()); socket.setReceiveBufferSize(64 * 1024); socket.setBroadcast(true); +socket.setReuseAddress(true); +if (multicast != null) { +((MulticastSocket)socket).setLoopbackMode(false); +} if (multicast == null) { Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); http://git-wip-us.apache.org/repos/asf/cxf/blob/bafe7660/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPDestination.java -- diff --git a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPDestination.java b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPDestination.java index 3442ab2..8f8dfd8 100644 --- a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPDestination.java +++ b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPDestination.java @@ -172,6 +172,7 @@ public class UDPDestination extends AbstractDestination { socket.setReceiveBufferSize(64 * 1024); socket.setSendBufferSize(64 * 1024); socket.setTimeToLive(1); +socket.setLoopbackMode(false); socket.bind(new InetSocketAddress(isa.getPort())); socket.setNetworkInterface(findNetworkInterface()); socket.joinGroup(isa.getAddress()); http://git-wip-us.apache.org/repos/asf/cxf/blob/bafe7660/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java -- diff --git a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java index f44217d..3673206 100644 --- a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java +++ b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java @@ -110,6 +110,8 @@ public final class WSDiscoveryClientTest { MulticastSocket s = new MulticastSocket(Integer.parseInt(PORT)); s.setBroadcast(true); s.setNetworkInterface(findIpv4Interface()); +s.setLoopbackMode(false); +s.setReuseAddress(true); s.joinGroup(address); s.setReceiveBufferSize(64 * 1024); s.setSoTimeout(5000);
cxf git commit: Fixing Sagger2 systests
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 5d0ac9e12 -> e3ce885aa Fixing Sagger2 systests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e3ce885a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e3ce885a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e3ce885a Branch: refs/heads/3.1.x-fixes Commit: e3ce885aaf241dee8c163568199adc4b6aa51805 Parents: 5d0ac9e Author: Francesco ChicchiriccòAuthored: Fri Mar 18 15:51:13 2016 +0100 Committer: Francesco Chicchiriccò Committed: Fri Mar 18 17:15:10 2016 +0100 -- .../AbstractSwagger2ServiceDescriptionTest.java | 1 + ...gger2NonAnnotatedServiceDescriptionTest.java | 2 +- .../jaxrs/description/swagger2-noano-yaml.txt | 4 ++- .../systest/jaxrs/description/swagger2-yaml.txt | 33 ++-- 4 files changed, 36 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e3ce885a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java index 3332f47..bf4b168 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java @@ -55,6 +55,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus this.runAsFilter = runAsFilter; } +@Override protected void run() { final JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(BookStoreSwagger2.class); http://git-wip-us.apache.org/repos/asf/cxf/blob/e3ce885a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java index f47af93..dd56fe2 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java @@ -77,6 +77,6 @@ public class Swagger2NonAnnotatedServiceDescriptionTest extends AbstractSwagger2 @Override protected String getExpectedFileYaml() { -return "swagger2-noano-json.txt"; +return "swagger2-noano-yaml.txt"; } } http://git-wip-us.apache.org/repos/asf/cxf/blob/e3ce885a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt -- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt index 8bd33ee..5ef0eb4 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt @@ -29,12 +29,14 @@ paths: /bookstore/names: get: operationId: "getBookNames" + produces: + - "application/json" parameters: - name: "page" in: "query" required: false type: "integer" -default: "1" +default: 1 format: "int32" responses: default: http://git-wip-us.apache.org/repos/asf/cxf/blob/e3ce885a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt -- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt index 75c34d0..1947c41 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt @@ -29,7 +29,7 @@ paths: description: "Page
[2/2] cxf git commit: Several Swagger-related improvements: swagger-jaxrs upgraded to 1.5.8, now working properly even as filter, prepared Swagger2Feature for extension
Several Swagger-related improvements: swagger-jaxrs upgraded to 1.5.8, now working properly even as filter, prepared Swagger2Feature for extension Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e515c136 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e515c136 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e515c136 Branch: refs/heads/3.0.x-fixes Commit: e515c136504d2854a6db42c5351adf7aa00cddb3 Parents: 0afa9d2 Author: Francesco ChicchiriccòAuthored: Wed Mar 16 16:40:02 2016 +0100 Committer: Francesco Chicchiriccò Committed: Wed Mar 16 16:40:02 2016 +0100 -- parent/pom.xml | 2 +- .../cxf/jaxrs/swagger/Swagger2Feature.java | 82 .../cxf/jaxrs/swagger/Swagger2Serializers.java | 14 ++-- 3 files changed, 57 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e515c136/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 1a49ffa..18abcc7 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -159,7 +159,7 @@ 1.3.1.RELEASE spring-test 1.3.13 -1.5.4 +1.5.8 1.7 4.4.1 3.1.4 http://git-wip-us.apache.org/repos/asf/cxf/blob/e515c136/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java -- diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java index 701701b..df5ea1e 100644 --- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java +++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java @@ -32,6 +32,7 @@ import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.PreMatching; import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; @@ -44,6 +45,7 @@ import org.apache.cxf.jaxrs.model.doc.DocumentationProvider; import org.apache.cxf.jaxrs.model.doc.JavaDocProvider; import org.apache.cxf.jaxrs.provider.ServerProviderFactory; import org.apache.cxf.jaxrs.utils.InjectionUtils; +import org.apache.cxf.jaxrs.utils.JAXRSUtils; import io.swagger.jaxrs.config.BeanConfig; import io.swagger.jaxrs.config.DefaultReaderConfig; @@ -52,6 +54,12 @@ import io.swagger.jaxrs.listing.ApiListingResource; public class Swagger2Feature extends AbstractSwaggerFeature { +protected boolean dynamicBasePath; + +protected boolean replaceTags; + +protected DocumentationProvider javadocProvider; + private String host; private String[] schemes; @@ -62,33 +70,24 @@ public class Swagger2Feature extends AbstractSwaggerFeature { private String ignoreRoutes; -private boolean dynamicBasePath; - -private boolean replaceTags; - -private DocumentationProvider javadocProvider; - @Override protected void addSwaggerResource(Server server) { -List cris = Collections.emptyList(); -if (!runAsFilter) { -List serviceBeans = new ArrayList(); -ApiListingResource apiListingResource = new ApiListingResource(); -serviceBeans.add(apiListingResource); -JAXRSServiceFactoryBean sfb = -(JAXRSServiceFactoryBean) server.getEndpoint().get(JAXRSServiceFactoryBean.class.getName()); -sfb.setResourceClassesFromBeans(serviceBeans); -cris = sfb.getClassResourceInfo(); +ApiListingResource apiListingResource = new ApiListingResource(); +JAXRSServiceFactoryBean sfb = +(JAXRSServiceFactoryBean) server.getEndpoint().get(JAXRSServiceFactoryBean.class.getName()); + sfb.setResourceClassesFromBeans(Collections.singletonList(apiListingResource)); +List cris = sfb.getClassResourceInfo(); + +List providers = new ArrayList(); +if (runAsFilter) { +providers.add(new SwaggerContainerRequestFilter()); +} else { for (ClassResourceInfo cri : cris) { if (ApiListingResource.class == cri.getResourceClass()) { -InjectionUtils.injectContextProxiesAndApplication(cri, apiListingResource, null); +InjectionUtils.injectContextProxies(cri, apiListingResource); } } } -List providers = new ArrayList(); -if (runAsFilter) { -providers.add(new SwaggerContainerRequestFilter()); -}
[04/10] cxf git commit: [CXF-6435]Support base64 for attachment encoding in CXF
[CXF-6435]Support base64 for attachment encoding in CXF (cherry picked from commit 2e9bf6487060dc79d837b3f35c09cd8ad71ff60e) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fdc1e622 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fdc1e622 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fdc1e622 Branch: refs/heads/3.0.x-fixes Commit: fdc1e6227b774212ab81359200fe2a522a75ecb9 Parents: 03fe259 Author: Freeman FangAuthored: Mon Mar 7 08:54:31 2016 +0800 Committer: Daniel Kulp Committed: Wed Mar 16 11:01:27 2016 -0400 -- .../cxf/attachment/AttachmentSerializer.java| 44 +- .../interceptor/AttachmentOutInterceptor.java | 5 + .../java/org/apache/cxf/message/Message.java| 6 + .../apache/cxf/systest/jaxb/MTOMBase64Test.java | 146 +++ .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 2 +- 5 files changed, 200 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/fdc1e622/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java -- diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java index 539fcc6..34402dc 100644 --- a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java +++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java @@ -20,6 +20,7 @@ package org.apache.cxf.attachment; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.io.StringWriter; import java.io.Writer; @@ -32,13 +33,20 @@ import java.util.Map; import javax.activation.DataHandler; +import org.apache.cxf.common.util.Base64Utility; +import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.message.Attachment; import org.apache.cxf.message.Message; + + + public class AttachmentSerializer { // http://tools.ietf.org/html/rfc2387 private static final String DEFAULT_MULTIPART_TYPE = "multipart/related"; +private static String contentTransferEncoding = "binary"; + private Message message; private String bodyBoundary; private OutputStream out; @@ -49,6 +57,7 @@ public class AttachmentSerializer { private boolean xop = true; private boolean writeOptionalTypeParameters = true; + public AttachmentSerializer(Message messageParam) { message = messageParam; } @@ -175,6 +184,10 @@ public class AttachmentSerializer { private static String escapeQuotes(String s) { return s.indexOf('"') != 0 ? s.replace("\"", "\\\"") : s; } + +public static void setContentTransferEncoding(String cte) { +contentTransferEncoding = cte; +} private String getHeaderValue(String name, String defaultValue) { List value = rootHeaders.get(name); @@ -195,7 +208,7 @@ public class AttachmentSerializer { Map headers, Writer writer) throws IOException { writer.write("\r\nContent-Type: "); writer.write(contentType); -writer.write("\r\nContent-Transfer-Encoding: binary\r\n"); +writer.write("\r\nContent-Transfer-Encoding: " + contentTransferEncoding + "\r\n"); if (attachmentId != null) { attachmentId = checkAngleBrackets(attachmentId); @@ -262,7 +275,11 @@ public class AttachmentSerializer { writeHeaders(handler.getContentType(), a.getId(), headers, writer); out.write(writer.getBuffer().toString().getBytes(encoding)); -handler.writeTo(out); +if ("base64".equals(contentTransferEncoding)) { +encodeBase64(handler.getInputStream(), out, IOUtils.DEFAULT_BUFFER_SIZE); +} else { +handler.writeTo(out); +} } } StringWriter writer = new StringWriter(); @@ -273,6 +290,29 @@ public class AttachmentSerializer { out.flush(); } +private int encodeBase64(InputStream input, OutputStream output, int bufferSize) throws IOException { +int avail = input.available(); +if (avail > 262144) { +avail = 262144; +} +if (avail > bufferSize) { +bufferSize = avail; +} +final byte[] buffer = new byte[bufferSize]; +int n = 0; +n = input.read(buffer); +int total = 0; +while (-1 != n) { +if (n == 0) { +throw new IOException("0 bytes read in violation of InputStream.read(byte[])"); +} +
cxf git commit: fix the test error by adjusting its setup for CXF-5855
Repository: cxf Updated Branches: refs/heads/master 62ca4018b -> aafcec2b3 fix the test error by adjusting its setup for CXF-5855 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aafcec2b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aafcec2b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aafcec2b Branch: refs/heads/master Commit: aafcec2b3466bddb4c0de34417391c9c3d595b77 Parents: 62ca401 Author: Akitoshi YoshidaAuthored: Thu Mar 17 11:17:57 2016 +0100 Committer: Akitoshi Yoshida Committed: Thu Mar 17 11:17:57 2016 +0100 -- .../websocket/atmosphere/DefaultProtocolInterceptorTest.java | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/aafcec2b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java -- diff --git a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java index e6b70af..1dee1de 100644 --- a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java +++ b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java @@ -25,7 +25,10 @@ import java.util.Map; import org.apache.cxf.transport.websocket.WebSocketUtils; import org.atmosphere.cpr.AtmosphereRequest; +import org.atmosphere.cpr.AtmosphereResource; +import org.atmosphere.cpr.AtmosphereResourceImpl; import org.atmosphere.cpr.AtmosphereResponse; +import org.atmosphere.cpr.FrameworkConfig; import org.junit.Assert; import org.junit.Test; @@ -40,6 +43,9 @@ public class DefaultProtocolInterceptorTest extends Assert { DefaultProtocolInterceptor dpi = new DefaultProtocolInterceptor(); AtmosphereRequest request = AtmosphereRequest.newInstance(); AtmosphereResponse response = AtmosphereResponse.newInstance(); +AtmosphereResourceImpl resource = new AtmosphereResourceImpl(); +resource.transport(AtmosphereResource.TRANSPORT.WEBSOCKET); +request.localAttributes().put(FrameworkConfig.ATMOSPHERE_RESOURCE, resource); response.request(request); String payload = "hello cxf"; String contentType = "text/plain";
cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample
Repository: cxf Updated Branches: refs/heads/master 4f5b60aba -> 5404ada11 [CXF-5855] enable atmosphere's sse handling; update the sample Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5404ada1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5404ada1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5404ada1 Branch: refs/heads/master Commit: 5404ada11eb5f78828a0b480601b3ab01ebcdf10 Parents: 4f5b60a Author: Akitoshi YoshidaAuthored: Thu Mar 17 00:11:58 2016 +0100 Committer: Akitoshi Yoshida Committed: Thu Mar 17 00:41:07 2016 +0100 -- .../jax_rs/websocket/src/test/resources/client.js | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/5404ada1/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js -- diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js index 7eb55f3..8e8d653 100644 --- a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js +++ b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js @@ -8,7 +8,7 @@ "use strict"; -var HOST_URL = 'http://localhost:9100/'; +var HOST_URL = 'http://localhost:9000/'; var reader = require('readline'); var prompt = reader.createInterface(process.stdin, process.stdout); @@ -25,13 +25,13 @@ var isopen = false; const TRANSPORT_NAMES = ["websocket", "sse"]; const COMMAND_LIST = -[["add name", "Add a new consumer and return the customer instance."], - ["delete id", "Delete the customer."], - ["get id", "Return the customere."], +[["add name", "Add a new consumer and return the customer instance. (e.g., add green)"], + ["delete id", "Delete the customer. (e.g., delete 124)"], + ["get id", "Return the customere. (e.g., get 123)"], ["quit", "Quit the application."], - ["subscribe", "Subscribe to the customer updatese."], - ["unsubscribe","Unsubscribe from the customer updatese."], - ["update id name", "Update the customer."]]; + ["subscribe", "Subscribe to the customer queries."], + ["unsubscribe","Unsubscribe from the customer queries."], + ["update id name", "Update the customer. (e.g., update 125 red)"]]; function selectOption(c, opts) { var i = parseInt(c);
[2/5] cxf-fediz git commit: Split getting the RP token from serializing it
Split getting the RP token from serializing it Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/5d8fb365 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/5d8fb365 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/5d8fb365 Branch: refs/heads/master Commit: 5d8fb3652f55f1c5299f9f02cffea03d6efcf922 Parents: 86c268b Author: Colm O hEigeartaighAuthored: Fri Mar 18 12:13:28 2016 + Committer: Colm O hEigeartaigh Committed: Fri Mar 18 12:13:28 2016 + -- .../cxf/fediz/service/idp/IdpSTSClient.java | 29 ++--- .../service/idp/beans/STSClientAction.java | 44 ++ .../service/idp/beans/TokenSerializer.java | 62 .../flows/federation-validate-request.xml | 2 + .../WEB-INF/flows/saml-validate-request.xml | 2 + 5 files changed, 90 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/5d8fb365/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java -- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java index c4b9346..b8450b4 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java @@ -18,33 +18,23 @@ */ package org.apache.cxf.fediz.service.idp; -import java.io.StringWriter; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; +import org.w3c.dom.Element; import org.apache.cxf.Bus; import org.apache.cxf.ws.security.tokenstore.SecurityToken; import org.apache.cxf.ws.security.trust.STSClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class IdpSTSClient extends STSClient { -private static final Logger LOG = LoggerFactory.getLogger(IdpSTSClient.class); - public IdpSTSClient(Bus b) { super(b); } -public String requestSecurityTokenResponse() throws Exception { +public Element requestSecurityTokenResponse() throws Exception { return requestSecurityTokenResponse(null); } -public String requestSecurityTokenResponse(String appliesTo) throws Exception { +public Element requestSecurityTokenResponse(String appliesTo) throws Exception { String action = null; if (isSecureConv) { action = namespace + "/RST/SCT"; @@ -52,20 +42,11 @@ public class IdpSTSClient extends STSClient { return requestSecurityTokenResponse(appliesTo, action, "/Issue", null); } -public String requestSecurityTokenResponse(String appliesTo, String action, +public Element requestSecurityTokenResponse(String appliesTo, String action, String requestType, SecurityToken target) throws Exception { STSResponse response = issue(appliesTo, null, "/Issue", null); -StringWriter sw = new StringWriter(); -try { -Transformer t = TransformerFactory.newInstance().newTransformer(); -t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); -t.transform(response.getResponse(), new StreamResult(sw)); -} catch (TransformerException te) { -LOG.warn("nodeToString Transformer Exception"); -} -return sw.toString(); - +return getDocumentElement(response.getResponse()); } } http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/5d8fb365/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java -- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java index 58a69f3..818c0e3 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java @@ -18,9 +18,7 @@ */ package org.apache.cxf.fediz.service.idp.beans; -import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.InputStream; import java.io.StringReader; import java.net.MalformedURLException; import java.net.URL; @@ -35,7 +33,6 @@ import javax.xml.stream.XMLStreamException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; -import
cxf git commit: [CXF-6836] Temporarily disabling Swagger tests
Repository: cxf Updated Branches: refs/heads/master 4799fef82 -> 05cf29dc4 [CXF-6836] Temporarily disabling Swagger tests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/05cf29dc Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/05cf29dc Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/05cf29dc Branch: refs/heads/master Commit: 05cf29dc41a5a6212a10d46b6a749dc8a1039dd1 Parents: 4799fef Author: Sergey BeryozkinAuthored: Fri Mar 18 17:04:37 2016 + Committer: Sergey Beryozkin Committed: Fri Mar 18 17:04:37 2016 + -- .../description/AbstractSwagger2ServiceDescriptionTest.java | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/05cf29dc/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java index bf4b168..c4bfd95 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java @@ -28,6 +28,8 @@ import javax.ws.rs.core.Response.Status; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; +import org.apache.cxf.feature.Feature; +import org.apache.cxf.feature.LoggingFeature; import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.apache.cxf.jaxrs.client.WebClient; @@ -43,6 +45,7 @@ import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.yaml.snakeyaml.Yaml; + public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBusClientServerTestBase { @Ignore @@ -95,6 +98,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus protected abstract String getExpectedFileYaml(); @Test +@Ignore public void testApiListingIsProperlyReturnedJSON() throws Exception { final WebClient client = createWebClient("/swagger.json"); try { @@ -110,6 +114,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus } @Test +@Ignore public void testApiListingIsProperlyReturnedYAML() throws Exception { final WebClient client = createWebClient("/swagger.yaml"); @@ -132,7 +137,9 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends AbstractBus private WebClient createWebClient(final String url) { return WebClient .create("http://localhost:; + getPort() + url, -Arrays.< Object >asList(new JacksonJsonProvider())) +Arrays.< Object >asList(new JacksonJsonProvider()), +Arrays.< Feature >asList(new LoggingFeature()), +null) .accept(MediaType.APPLICATION_JSON).accept("application/yaml"); }
[10/10] cxf git commit: Recording .gitmergeinfo Changes
Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0afa9d25 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0afa9d25 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0afa9d25 Branch: refs/heads/3.0.x-fixes Commit: 0afa9d25d677e4688ab96689e04d6d710f5f1f9c Parents: f643f99 Author: Daniel KulpAuthored: Wed Mar 16 11:05:11 2016 -0400 Committer: Daniel Kulp Committed: Wed Mar 16 11:05:38 2016 -0400 -- .gitmergeinfo | 83 ++ 1 file changed, 83 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/0afa9d25/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index 1998546..0b68346 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -9,42 +9,54 @@ B 01956cc9af68f80d4f12018a3779c12f36d5308e B 033815a0e180b8e1abfcc0c1acdbeb0219ad256d B 035154fb466fb9c833804d1bc747804df9e9992b B 0384a69b7bc0b4846e89469f974ace534e7734d7 +B 03a3cf4f94236f94fc35c39b5c075ff79c82e0dc B 03bd1b4f0beaddf4df112f7c08d5749862805dfa B 03d63bca6fd9497ddeba1a0657929150d02827d2 +B 04300f6e34a3243418f764640f85be60eb7e05df B 04771f9b93c86197b194791d502fd224dbb1eacc +B 04932cc6e66a6bca0ae25f2bf68e97f6241736eb B 04960b3a04731e3e0f030c17ac25f154defb5568 B 04f0ef2e32f55d51f14cfc6d7a14616b62a6cce5 B 05a7ad32b06dc800d31cffbb39df5be16f847849 B 0642440cd3114db0ca86ca99987617d98634697f B 06e74f175c476c82c773c4ac31cf656ef593d424 B 07297f3c75c3d16a6d81b423d545ababd714f5b9 +B 073529c953211160cf9392334a1f9546cb4e0a45 B 07c6322a52c12077567a48c9a87e832ea9362886 B 08246e10e00396811bddf64a3e131b580afb12db B 0848bdb305b5d6e542da417ff5fd9e7c9ace5381 +B 084ad67a648c736e911fa0a419d6e5cca345c1b2 B 088dcdf8c7a3626adf650e80b98a9efd51d48653 B 08d98fbb13440de2da3b19915d8dfe21531cb284 B 091f8bef03e671f151e21a890159e5033b1c5d86 +B 09355c667243314e64e2c54f8e21abb22f463d37 B 0985e79ab47124fbe0a08b9653ae7d4d1c2b5b97 B 09c7f359ed84a1df2cab07387b3ad135846df0db B 0aaa2b5742a53bf31704939e4bc21906100bbc54 B 0ab9416fda31298e485f2a6864c263447e4b32de B 0ac5dde071c9c2731fca757a2108f5dd698f8af5 +B 0b7e0e914328aa7a78a2eab00bb1040c703e9b63 B 0ba19453f17be19aa2e46848b1908f776a6abb64 B 0befccd8a70d7896d9210f554e19375e5d8cc168 B 0c0555f4ac850ec8e38302d73207170affe4376a +B 0c542f82652995db0d7ce6681dafab086c178b13 B 0cad194ee50841f1c740097430780044fa1e9eaf +B 0cdd2c03fed0ca51386312e1772ac49edccf1ae3 B 0d0bc938103b0ea9311c3b73f6c385aa3e12260c B 0d2a6ccabc752708484e2b2c44deb5b48e71b76e B 0d72569d3fdd360e60d1fcea59c354b754f2a386 B 0ddd071dd1e7c475d8a0463564a991d62c96e3b0 B 0de0309f28e1543660c763c158f4353d6d2189be B 0e639399027b2b43ece5b21f73effa6381a5bf0c +B 0f88d05f0a6b04701f01075703a9da532d53c4d5 B 0ff6a3c8609507351d29903d04198fd71b650ae5 B 10ee2d5b3f76f020d0463fb5fbe7194b43965d22 B 11243052a6e1656657776bc3a0c586cba962c49f B 11ea395d0fa226c040f4ca3c4c6114a90ce34e06 B 1214338f24a3a7973f2bd72ca01fc57644bcc45a B 12206c314d34f2e210f7292fcb7a3e894fafd4e7 +B 12225d4f560c30839fd8f2ecb6657663d7559a27 +B 12c325a12e897b3fac6afbd9ec2fe34dcaaa9d02 B 12d7631bb74f7034c2635f1f253eef79b0fae0ca B 1308529e8b6a325143fea8256c98e37f79016170 B 1319cddeeca993b6c6f67a392a4807fc46e2e329 @@ -55,10 +67,13 @@ B 13dfe0f9fcaa0aee4c603072436d85861a0ab734 B 13e01e23ea87ea5b06953f18bef4b173fca55b4d B 105de684d0a266cbbfbb415e09121412d577 B 1487fccd43c3bcc463f12cdc1573cde68323f8b6 +B 14ed2e2c44b6da7641c95fb57212f8b5a5e77f3d B 159089a4c0bcf4d30ed819f064f0e31c6c3dc2af +B 15e4db9688617af6764f82c234e5a9582692a6e2 B 15ebdfafcd3c54406bcb7ca3405f8aa4fe13ae35 B 161e10bb2d87573974b8a1748f023c47ebbe5d49 B 162bbb5ea63cfeb6c258d750627c77c9e694f928 +B 165ebbf9d0b5541b6abdd5c140cfe921d92cf869 B 1674e7fb3353fc9e5d2b81deb2d02617cc09a373 B 16d789c4a913e0cac51bcf929331abe84010ce1e B 1770c6f6cdfd8ddcbefb36b25f7313edd7fd927e @@ -73,6 +88,7 @@ B 1960703149a11052490cf16ec3682408470298f9 B 1a5708e21708a9ed96991cd56ff89b3fd4eac15a B 1a8fd7c02bc6a620e276086b665d430217116767 B 1b3f01b4f640beea1f1247416ad9891e615f816c +B 1b7d4d1488db897ac7c824288556bed2df851309 B 1c17a94b0adf40fd6193b9fcf2a87ce9a686a131 B 1c7a34e313062edff246c2c1943d43b71b0f8aa7 B 1d29dfaa8e686570c1b2ec2da4c31ba380e0b9b0 @@ -92,6 +108,7 @@ B 205c61c48b2aad973572aa74d8c9dfa83c2dd7bd B 222137cb2ee577e6582a644b7ae73bbc0a75d4d1 B 22d0c244d3b60aafbd3c070e9599012019de486c B 2302aa5820661975bb04857fa6d48bb68bebb4f7 +B 23112f714cc6c52bef8678739f216f5a8ef26d49 B 2345b6e4ff4adf48e9adf5e0b9245da3f7afa011 B 237ace40ea2c204f68848309b9483c322499b524 B 23849faa6058427381cd3a737d2f37b551db9938 @@ -152,6 +169,7 @@ B 2fe88ec153b6193a8c80f7c1226db19600e0839a B 3019c331c0f069ed63611b5263df3ee4d427e4a7 B
cxf git commit: [CXF-6832] Supporting Content-Disposition headers with dashes
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 7a35d3314 -> cd62f0a6c [CXF-6832] Supporting Content-Disposition headers with dashes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cd62f0a6 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cd62f0a6 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cd62f0a6 Branch: refs/heads/3.1.x-fixes Commit: cd62f0a6cce4dbfb83fa3af4d35fd1ccf1a701c3 Parents: 7a35d33 Author: Sergey BeryozkinAuthored: Wed Mar 16 16:05:31 2016 + Committer: Sergey Beryozkin Committed: Wed Mar 16 16:06:39 2016 + -- .../java/org/apache/cxf/attachment/ContentDisposition.java| 2 +- .../cxf/jaxrs/ext/multipart/ContentDispositionTest.java | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/cd62f0a6/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java -- diff --git a/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java b/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java index 330822d..f7cfd97 100644 --- a/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java +++ b/core/src/main/java/org/apache/cxf/attachment/ContentDisposition.java @@ -28,7 +28,7 @@ import java.util.regex.Pattern; public class ContentDisposition { private static final String CD_HEADER_PARAMS_EXPRESSION = -"(([\\w]+( )?\\*?=( )?\"[^\"]+\")|([\\w]+( )?\\*?=( )?[^;]+))"; +"(([\\w-]+( )?\\*?=( )?\"[^\"]+\")|([\\w-]+( )?\\*?=( )?[^;]+))"; private static final Pattern CD_HEADER_PARAMS_PATTERN = Pattern.compile(CD_HEADER_PARAMS_EXPRESSION); http://git-wip-us.apache.org/repos/asf/cxf/blob/cd62f0a6/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java -- diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java index bae9020..bd89162 100644 --- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java +++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/multipart/ContentDispositionTest.java @@ -47,4 +47,11 @@ public class ContentDispositionTest extends Assert { assertEquals("baz1", cd.getParameter("baz")); } +@Test +public void testContentDispositionWithCreationDate() { +ContentDisposition cd = new ContentDisposition(" attachment ; creation-date=\"21:08:08 14:00:00\""); +assertEquals("attachment", cd.getType()); +assertEquals("21:08:08 14:00:00", cd.getParameter("creation-date")); +} + }