AuthSSLProtocolSocketFactory is a reasonable example. But I found it
inadequate for serious use, so I implemented a
SecureProtocolSocketFactory. Sorry, I can't post it.
I recently noticed that it's not necessary to specialize the
GeneratedClient. You can get a port and then set its HttpClient, like
this:
GeneratedPortType port = (new
GeneratedClient()).getServiceHttpPort(server);
((HttpChannel) Client.getInstance(port).getOutChannel()).setProperty
(CommonsHttpMessageSender.HTTP_CLIENT, httpClient);
- John Kristian
-----Original Message-----
From: Bernd Schuller [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 03, 2007 1:17 AM
To: [email protected]
Subject: Re: [xfire-user] unique SSL setting per connection
Hi John,
this is rather cool stuff. Can you post some example code on how to set
up the
HostConfiguration? Do I have to use AuthSSLProtocolSocketFactory or
would you
recommend some other class?
Thanks,
Bernd.
John Kristian wrote:
> It's possible. I found it rather difficult. I use a specialized
> client, to get a port that contains the SSL settings.
>
> class SpecializedClient extends GeneratedClient
> {
> @Override
> public Object getEndpoint(Endpoint endpoint)
> {
> Object port = super.getEndpoint(endpoint);
> Client client = Client.getInstance(port);
> if (client != null) {
> Channel channel = client.getOutChannel();
> if (channel instanceof HttpChannel) {
> ((HttpChannel) channel).setProperty
> (CommonsHttpMessageSender.HTTP_CLIENT, httpClient);
> }
> }
> return port;
> }
>
> httpClient is an org.apache.commons.httpclient.HttpClient that
contains
> a specialized HostConfiguration, similar to
>
org.apache.commons.httpclient.contrib.ssl.HostConfigurationWithHostFacto
> ry, which contains the SSL settings.
>
> This requires Commons HTTP Client version 3.1-rc1 or later;
specifically
> the fix for http://issues.apache.org/jira/browse/HTTPCLIENT-634
>
> Adding XFire Client properties for all the parameters of the Commons
> HTTP Client seems like a bad idea, since the parameters are numerous,
> structured and evolving.
>
> - John Kristian
>
> -----Original Message-----
> From: lucheng [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 03, 2007 11:53 AM
> To: [email protected]
> Subject: Re: [xfire-user] unique SSL setting per connection
>
> Since x-fire uses apache http client is it possible to expose the
client
> setting for unique SSL settings (keystores, key types) per connection
--
Dr. Bernd Schuller
Central Institute for Applied Mathematics
Forschungszentrum Juelich GmbH
mail [EMAIL PROTECTED]
phone +49 2461 61 8736
fax +49 2461 61 6656
blog http://www.jroller.com/page/gridhaus
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email