You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Matt Parker <pa...@gmail.com> on 2015/06/04 21:07:27 UTC

JAX-RS 2.0 Client API and TLS configuration

Hi all,

I'm attempting to configure the TLS parameters of the client. I know how to
do this using the TLSClientParameters and the HTTPConduit obtained through
the CXF WebClient API. However, I'd like to stick with using the JAX-RS 2.0
spec API. I'm hoping there's some way to get at this using the
Configuration exposed by the spec (or any other spec-compliant way).

Thanks in advance,

-Matt

Re: JAX-RS 2.0 Client API and TLS configuration

Posted by Matt Parker <pa...@gmail.com>.
That's exactly what I was looking for, thanks. I'm on 3.0.2 now (non-maven)
so I'll use WebClient until we upgrade to the version that supports that.

Cheers

On Fri, Jun 5, 2015 at 3:35 AM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> Or, the CXF specific way, pass a 2.0 Client to WebClient.getConfig()
>
> The list or properties can also be extended as neded, if you have anything
> specific in mind then let me know please
> Thanks, Sergey
>
> On 05/06/15 10:27, Sergey Beryozkin wrote:
>
>> Hi
>>
>> Romain asked to support it earlier, so we have these properties:
>>
>> "http.connection.timeout";
>> "http.receive.timeout";
>> "http.proxy.server.uri";
>> "http.proxy.server.port";
>>
>> they can be set as JAX-RS 2.0 Configurable properties, see
>>
>> https://issues.apache.org/jira/browse/CXF-6353,
>>
>> will update the docs now
>>
>> Thanks, Sergey
>>
>> On 04/06/15 22:50, Matt Parker wrote:
>>
>>> Thanks for the quick reply, as always, Sergey. A related question: how
>>> would I go about setting other socket options, not necessarily related to
>>> SSL (connection timeout, etc) using the spec API? I see many examples on
>>> the web which show implementation-specific examples (RESTeasy, Jersey)
>>> but
>>> not for CXF, or for generic clients. The accepted answer to
>>>
>>> http://stackoverflow.com/questions/22672664/setting-request-timeout-for-jax-rs-2-0-client-api
>>>
>>> is for RESTeasy, but is pretty much what I'm looking for in CXF.
>>>
>>> On Thu, Jun 4, 2015 at 2:22 PM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>
>>>  Hi
>>>>
>>>> Here is a test:
>>>>
>>>>
>>>>
>>>> https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java
>>>>
>>>>
>>>> There should be some examples on the web too
>>>>
>>>> Cheers, Sergey
>>>>
>>>> On 04/06/15 20:07, Matt Parker wrote:
>>>>
>>>>  Hi all,
>>>>>
>>>>> I'm attempting to configure the TLS parameters of the client. I know
>>>>> how
>>>>> to
>>>>> do this using the TLSClientParameters and the HTTPConduit obtained
>>>>> through
>>>>> the CXF WebClient API. However, I'd like to stick with using the JAX-RS
>>>>> 2.0
>>>>> spec API. I'm hoping there's some way to get at this using the
>>>>> Configuration exposed by the spec (or any other spec-compliant way).
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> -Matt
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>> Blog: http://sberyozkin.blogspot.com
>>>>
>>>>
>>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>

Re: JAX-RS 2.0 Client API and TLS configuration

Posted by Sergey Beryozkin <sb...@gmail.com>.
Or, the CXF specific way, pass a 2.0 Client to WebClient.getConfig()

The list or properties can also be extended as neded, if you have 
anything specific in mind then let me know please
Thanks, Sergey
On 05/06/15 10:27, Sergey Beryozkin wrote:
> Hi
>
> Romain asked to support it earlier, so we have these properties:
>
> "http.connection.timeout";
> "http.receive.timeout";
> "http.proxy.server.uri";
> "http.proxy.server.port";
>
> they can be set as JAX-RS 2.0 Configurable properties, see
>
> https://issues.apache.org/jira/browse/CXF-6353,
>
> will update the docs now
>
> Thanks, Sergey
>
> On 04/06/15 22:50, Matt Parker wrote:
>> Thanks for the quick reply, as always, Sergey. A related question: how
>> would I go about setting other socket options, not necessarily related to
>> SSL (connection timeout, etc) using the spec API? I see many examples on
>> the web which show implementation-specific examples (RESTeasy, Jersey)
>> but
>> not for CXF, or for generic clients. The accepted answer to
>> http://stackoverflow.com/questions/22672664/setting-request-timeout-for-jax-rs-2-0-client-api
>>
>> is for RESTeasy, but is pretty much what I'm looking for in CXF.
>>
>> On Thu, Jun 4, 2015 at 2:22 PM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Here is a test:
>>>
>>>
>>> https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java
>>>
>>>
>>> There should be some examples on the web too
>>>
>>> Cheers, Sergey
>>>
>>> On 04/06/15 20:07, Matt Parker wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm attempting to configure the TLS parameters of the client. I know
>>>> how
>>>> to
>>>> do this using the TLSClientParameters and the HTTPConduit obtained
>>>> through
>>>> the CXF WebClient API. However, I'd like to stick with using the JAX-RS
>>>> 2.0
>>>> spec API. I'm hoping there's some way to get at this using the
>>>> Configuration exposed by the spec (or any other spec-compliant way).
>>>>
>>>> Thanks in advance,
>>>>
>>>> -Matt
>>>>
>>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>> Blog: http://sberyozkin.blogspot.com
>>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: JAX-RS 2.0 Client API and TLS configuration

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

Romain asked to support it earlier, so we have these properties:

"http.connection.timeout";
"http.receive.timeout";
"http.proxy.server.uri";
"http.proxy.server.port";

they can be set as JAX-RS 2.0 Configurable properties, see

https://issues.apache.org/jira/browse/CXF-6353,

will update the docs now

Thanks, Sergey

On 04/06/15 22:50, Matt Parker wrote:
> Thanks for the quick reply, as always, Sergey. A related question: how
> would I go about setting other socket options, not necessarily related to
> SSL (connection timeout, etc) using the spec API? I see many examples on
> the web which show implementation-specific examples (RESTeasy, Jersey) but
> not for CXF, or for generic clients. The accepted answer to
> http://stackoverflow.com/questions/22672664/setting-request-timeout-for-jax-rs-2-0-client-api
> is for RESTeasy, but is pretty much what I'm looking for in CXF.
>
> On Thu, Jun 4, 2015 at 2:22 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> Hi
>>
>> Here is a test:
>>
>>
>> https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java
>>
>> There should be some examples on the web too
>>
>> Cheers, Sergey
>>
>> On 04/06/15 20:07, Matt Parker wrote:
>>
>>> Hi all,
>>>
>>> I'm attempting to configure the TLS parameters of the client. I know how
>>> to
>>> do this using the TLSClientParameters and the HTTPConduit obtained through
>>> the CXF WebClient API. However, I'd like to stick with using the JAX-RS
>>> 2.0
>>> spec API. I'm hoping there's some way to get at this using the
>>> Configuration exposed by the spec (or any other spec-compliant way).
>>>
>>> Thanks in advance,
>>>
>>> -Matt
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: JAX-RS 2.0 Client API and TLS configuration

Posted by Matt Parker <pa...@gmail.com>.
Thanks for the quick reply, as always, Sergey. A related question: how
would I go about setting other socket options, not necessarily related to
SSL (connection timeout, etc) using the spec API? I see many examples on
the web which show implementation-specific examples (RESTeasy, Jersey) but
not for CXF, or for generic clients. The accepted answer to
http://stackoverflow.com/questions/22672664/setting-request-timeout-for-jax-rs-2-0-client-api
is for RESTeasy, but is pretty much what I'm looking for in CXF.

On Thu, Jun 4, 2015 at 2:22 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> Hi
>
> Here is a test:
>
>
> https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java
>
> There should be some examples on the web too
>
> Cheers, Sergey
>
> On 04/06/15 20:07, Matt Parker wrote:
>
>> Hi all,
>>
>> I'm attempting to configure the TLS parameters of the client. I know how
>> to
>> do this using the TLSClientParameters and the HTTPConduit obtained through
>> the CXF WebClient API. However, I'd like to stick with using the JAX-RS
>> 2.0
>> spec API. I'm hoping there's some way to get at this using the
>> Configuration exposed by the spec (or any other spec-compliant way).
>>
>> Thanks in advance,
>>
>> -Matt
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>

Re: JAX-RS 2.0 Client API and TLS configuration

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

Here is a test:

https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java

There should be some examples on the web too

Cheers, Sergey
On 04/06/15 20:07, Matt Parker wrote:
> Hi all,
>
> I'm attempting to configure the TLS parameters of the client. I know how to
> do this using the TLSClientParameters and the HTTPConduit obtained through
> the CXF WebClient API. However, I'd like to stick with using the JAX-RS 2.0
> spec API. I'm hoping there's some way to get at this using the
> Configuration exposed by the spec (or any other spec-compliant way).
>
> Thanks in advance,
>
> -Matt
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com