Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5408817749 for ; Mon, 20 Oct 2014 15:47:28 +0000 (UTC) Received: (qmail 34224 invoked by uid 500); 20 Oct 2014 15:47:28 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 34163 invoked by uid 500); 20 Oct 2014 15:47:28 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 34154 invoked by uid 99); 20 Oct 2014 15:47:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2014 15:47:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2014 15:46:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 22A702388993 for ; Mon, 20 Oct 2014 15:46:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r926226 [1/2] - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-data-bindings.html docs/jax-rs-search.html docs/tls-configuration.html docs/ws-securitypolicy.html Date: Mon, 20 Oct 2014 15:46:54 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141020154655.22A702388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Mon Oct 20 15:46:54 2014 New Revision: 926226 Log: Production update by buildbot for cxf Modified: websites/production/cxf/content/cache/docs.pageCache websites/production/cxf/content/docs/jax-rs-data-bindings.html websites/production/cxf/content/docs/jax-rs-search.html websites/production/cxf/content/docs/tls-configuration.html websites/production/cxf/content/docs/ws-securitypolicy.html Modified: websites/production/cxf/content/cache/docs.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/cxf/content/docs/jax-rs-data-bindings.html ============================================================================== --- websites/production/cxf/content/docs/jax-rs-data-bindings.html (original) +++ websites/production/cxf/content/docs/jax-rs-data-bindings.html Mon Oct 20 15:46:54 2014 @@ -117,12 +117,12 @@ Apache CXF -- JAX-RS Data Bindings
-

 

 

 

JAX-RS : Data Bindings

 

 

 

+/*]]>*/

JAXB support

The request and response can be marshalled and unmarshalled to/from Java object using JAXB.

There's a number of ways to tell to the JAXB provider how objects can be serialized. The simplest way is to mark a given type with @XmlRootElement annotation.

For example:

@@ -428,7 +428,7 @@ public JsonObject getBook(@PathParam(&qu public Response addBook(@Context final UriInfo uriInfo, JsonObject obj) { // Implementation here }]]> -

The JsrJsonpProvider provider could be used on server side or on a client side. By default, the provider uses JSR-353 Java API for JSON Processing reference implementation to read/write message bodies.

JSON With Padding (JSONP)

One option for supporting "JSON With Padding" (JSONP) is to extend the default JSONProvider and override its writeTo method as follows:

+

The JsrJsonpProvider provider could be used on server side or on a client side. By default, the provider uses JSR-353 Java API for JSON Processing reference implementation to read/write message bodies.

Simple JsonMapObject support

org.apache.cxf.jaxrs.provider.json.JsonMapObjectProvider is available starting from CXF 3.0.3 and CXF 3.1.0. This provider can read or write JSON into/from org.apache.cxf.jaxrs.provider.json.JsonMapObject which is a simple Map wrapper.

JsonMapObject can detect duplicate JSON sibling properties which can be useful in certain applications.

JSON With Padding (JSONP)

One option for supporting "JSON With Padding" (JSONP< /a>) is to extend the default JSONProvider and override its writeTo method as follows:

-

 

Second, only when using FIQL, a count extension can be used. For example, one may want to find 'all the books written by at least two authors or all the books with no reviews'.
If a collection entity such as BookReview has a non primitive type, then typing "reviews==0" is all what is needed, otherwise a count extension needs to be used, for example: "count(authors)=ge=2"

Lucene

Mapping of FIQL/OData expressions to Lucene (4.0.0-BETA) Query is supported starting from CXF 2.7.1.

org.apache.cxf.jaxrs.ext.search.lucene.LuceneQueryVisitor can be used to support the default (content) field or specific custom field queries.
Queries for specific terms and phrases are supported.

Example, "find the documents containing a 'text' term":

 

Second, only when using FIQL, a count extension can be used. For example, one may want to find 'all the books written by at least two authors or all the books with no reviews'.
If a collection entity such as BookReview has a non primitive type, then typing "reviews==0" is all what is needed, otherwise a count extension needs to be used, for example: "count(authors)=ge=2"

Lucene

Mapping of FIQL/OData expressions to Lucene (4.0.0-BETA) Query is supported starting from CXF 2.7.1. Please notice that starting from CXF 3.0.2, the Lucene version has been upgraded to 4.9.0 in order to benefit from query builders and other improvements.

org.apache.cxf.jaxrs.ext.search.lucene.LuceneQueryVisitor can be used to support the default (content) field or specific custom field queries.
Queries for specific terms and phrases are supported.

Example, "find the documents conta ining a 'text' term":

In this example, the visitor is requested to create Lucene org.apache.lucene.search.PhraseQuery against the specified contents field ("contents"). The visitor can also accept a contentsFieldMap map property when different phrases may need to be checked against different contents fields.

The current limitation is that no typed Date queries are supported yet (except for the equality match), for example, "find all the documents issued before a given date", to be supported shortly.

LDAP

Mapping of FIQL/OData expressions to LDAP queries as defined by RFC-4515 is supported starting from CXF 2.7.1 with the help of org.apache.cxf.jaxrs.ext.search.ldap.LdapQueryVisitor. Use this visitor when working with LDAP or OSGI.

Here is a summary of LDAP filter operators:

Operator

Description

"="

Equal

"!"

Not Equal

"<="

Less Or Equal

">="

Greater or Equal

"&"

AND

"|"

OR

FIQL "=le=" and "=lt=" will both map to "<=", while "=ge=" and "=gt=" to ">=".

For example:

FIQL

LDAP

"name==bar*"

"(name=bar*)"

"name!=bar"

"(!name=bar)"

"name!=bar;id=gt=10"

"(&(!name=bar)(id>=10))"

"name!=bar;(id=gt=10,id=lt=5)"

"(&(!name =bar)(|(id>=10)(id<=5)))"

The converter is created like all other converters:

+

In this example, the visitor is requested to create Lucene org.apache.lucene.search.PhraseQuery against the specified contents field ("contents"). The visitor can also accept a contentsFieldMap map property when different phrases may need to be checked against different contents fields.

Starting from CXF 3.0.2, the typed Date range queries are supported by LuceneQueryVisitor. However, this feature should be used together with 'primitiveFieldTypeMap' in order to hint the visitor which fields are temporal and should be treated as such in the filter expressions. For example:

+ +

LuceneQueryVisitor supports wide range of date formats, still providing the option to customize it using 'search.date-format' property. This property accepts the date/time pattern expression in the SimpleDateFormat format. Also, since CXF 3.0.2, the LuceneQueryVisitor  could be configured to use the Lucene analyzer. The reason to use analyzer is that during Lucene query construction the visitor can use the per-field filters and tokenizers, taking into account stemming, stop-worlds, lower-casing, etc., as such properly processing the filter expression. For example:

+ +

 

LDAP

Mapping of FIQL/OData expressions to LDAP queries as defined by RFC-4515 is supported starting from CXF 2.7.1 with the help of org.apache.cxf.jaxrs.ext.search.ldap.LdapQueryVisitor. Use this visitor when working with LDAP or OSGI.

Here is a summary of LDAP filter operators:

Operator

Description

"="

Equal

"!"

Not Equal

"<="

Less Or Equal

">="

Greater or Equal

"&"

AND

"|"

OR

FIQL "=le=" and "=lt=" will both map to "<=", while "=ge=" and "=gt=" to ">=".

For example:

FIQL

LDAP

"name==bar*"

"(name=ba r*)"

"name!=bar"

"(!name=bar)"

"name!=bar;id=gt=10"

"(&(!name=bar)(id>=10))"

"name!=bar;(id=gt=10,id=lt=5)"

"(&(!name=bar)(|(id>=10)(id<=5)))"

The converter is created like all other converters:

-

Alternative query languages

Custom org.apache.cxf.jaxrs.ext.search.SearchConditionParser implementations can be registered as a "search.parser" contextual property starting from CXF 3.0.0-milestone2.

+

Alternative query languages

Custom org.apache.cxf.jaxrs.ext.search.SearchConditionParser implementations can be registered as a "search.parser" contextual property starting from CXF 3.0.0-milestone2.

Content Extraction

Starting from CXF 3.0.2, the content extraction support has been added in order to complement the search capabilites with text extraction from various document formats (PDF, ODF, DOC,TXT,RTF,...). It is based on Apache Tika and is available in two shapes: raw content extraction (TikaContentExtractor) and Lucene document content extraction (TikaLuceneContentExtractor).

Using TikaContentExtractor

The purpose of Tika content extractor is to provide the essential support of text extraction from supported document formats. Additionally, the metadata is being extracted as well depending on the doc ument format (author, modified, created, pages, ...). The TikaContentExtractor accepts the list of supported parsers and returns the extracted metadata together with the desired extracted content format (by default raw text). For example:

+ +

By default, the TikaContentExtractor  also performs the content type detection and validation, which could be turned off using the 'validateMediaType' constructor argument.

Using TikaLuceneContentExtractor

The TikaLuceneContentExtractor is very similar to TikaContentExtractor but instead of raw content and metadata it returns prepared Lucene document. However, in order to properly create the Lucene document which is ready to be indexed, TikaLuceneContentExtractor  accepts an additional parameter, LuceneDocumentMetadata, with the field types and type converters. For example:

+ +

At this point, the document is ready to be analyzed and indexed. The TikaLuceneContentExtractor uses LuceneDocumentMetadata to create the properly typed document fields and currently supports DoubleField, FloatField, LongField, IntField, IntField, TextField (for content) and StringField (also used to store dates).

To demonstrate the full power of the CXF 3.0.2 content extraction and search capabiities, the demo project 'jax_rs_search' has been developed and is distributed in the samples bundle. The project could be found in the official Apache CXF Github repository. It integrates together Apache CXF, Apache Lucene and Apache Tika showing off some advanced features related to custom analyzers and different filter criteria (keyword and  phrase search).

 
Modified: websites/production/cxf/content/docs/tls-configuration.html ============================================================================== --- websites/production/cxf/content/docs/tls-configuration.html (original) +++ websites/production/cxf/content/docs/tls-configuration.html Mon Oct 20 15:46:54 2014 @@ -116,12 +116,12 @@ Apache CXF -- TLS Configuration
-
+/*]]>*/

- -

TLS Parameters common to both Clients and Servers

- -

The TLS Parameters common to both Clients and Servers are given here:

- -

Attribute

Default

Description

keyManagers

JVM default Key Managers

Key Managers to hold X509 certificates.

trustManagers

JVM default Trust Managers

TrustManagers to validate peer X509 certificates.

jsseProvider

JVM default provider associated with protocol

JSSE provider name.

cipherSuites

JVM default cipher suites

CipherSuites that will be supported.

cipherSuitesFilter

 

filters of the supported CipherSuites that will be supported and used if available.

certConstraints

 

Certificate Constrain ts specification.

secureRandomParameters

JVM default Secure Random

SecureRandom specification.

secureSocketProtocol

"TLS"

Protocol Name. Most common example are "SSL", "TLS" or "TLSv1".

certAlias

 

Cert alias to use. Useful when keystore has multiple certs.

- - -

Key Managers

- -

The Key Managers configuration item is used to retrieve key information. It is required for a Server, but is only required for a Client when the Server requires Client Authentication.

- -
Key Manager sample
- -
- -

Trust Managers

- -

The Trust Managers configuration item is used to validate trust in peer X.509 certificates. It is required for both Servers and Clients.

- -
Trust Manager sample
- -
- -

CipherSuites Filter

- -

The CipherSuites Filter is used to either include or exclude particular CipherSuites.

- -
CipherSuites Filter sample
- -
- -

Cert Constraints

- -

Cert constraints can be used by either the client or server to impose constraints on the peer certificates. This can be done by specifying a set of regular expressions on either the Subject DN (Distinguished Name) or the Issuer DN (or both) of the certificate. A "combinator" attribute can also be specified for either the SubjectDNConstraints or IssuerDNConstraints Elements. This attribute can be either "ANY" or "ALL", and refers to whether any or all of the defined regular expressions should apply. The default value is "ALL".

- -
CipherSuites Filter sample
- -
- - -

Client TLS Parameters

- -

In addition to the TLS Parameters common to both Clients and Servers, there are some parameters that are specific to Clients:

- -

Attribute

Default

Description

disableCNCheck

false

Indicates whether that the hostname given in the HTTPS URL will be checked against the service's Common Name (CN) given in its certificate during requests, and failing if there is a mismatch. If set to true (not recommended for production use), such checks will be bypassed. That will allow you, for example, to use a URL such as localhost during development.

sslSocketFactory

 

A SSLSocketFactory to use. All other bean properties are ignored if this is set.

sslCacheTimeout

86400 seconds (24 hours)

SSL Cache Timeout in seconds.

useHttpsURLConnectionDefaultSslSocketFactory

false

This attribute specifies if HttpsURLConnection. getDefaultSSLSocketFactory() should be used to create https connections. If 'true', 'jsseProvider', 'secureSocketProtocol', 'trustManagers', 'keyManagers', 'secureRandom', 'cipherSuites' and 'cipherSuitesFilter' configuration parameters are ignored.

useHttpsURLConnectionDefaultHostnameVerifier

false

This attribute specifies if HttpsURLConnection.getDefaultHostnameVerifier() should be used to create https connections. If 'true', 'disableCNCheck' configuration parameter is ignored.

- - -

Disable CN Check

- -

disableCNCheck is a parameterized boolean, you can use a fixed variable true|false as well as a Spring externalized property variable (e.g. ${disable-https-hostname-verification}) or a Spring expression (e.g. #{systemProperties['dev-mode']}).

- -
HTTP conduit configuration disabling HTTP URL hostname verification (usage of localhost, etc)
- -
- -

Server TLS Parameters

- -

In addition to the TLS Parameters common to both Clients and Servers, there are some parameters that are specific to Servers:

- -

Attribute

Default

Description

clientAuthentication

Not "wanted" or "required"

Allows you to configure whether client authentication is "wanted" and/or "required.

- - -

Client Authentication

- -

This allows you to define whether client authentication is wanted and/or required.

- -
Client Authentication sample
-