cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kieselhorst (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2113) http:client configuration with Spring PropertyPlaceholderConfigurer
Date Mon, 30 Mar 2009 18:53:50 GMT

    [ https://issues.apache.org/jira/browse/CXF-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693875#action_12693875
] 

Dennis Kieselhorst commented on CXF-2113:
-----------------------------------------

I tried to configure the ReceiveTimeout with a PropertyPlaceholder. It seems that this is
also not possible at the moment.

> http:client configuration with Spring PropertyPlaceholderConfigurer
> -------------------------------------------------------------------
>
>                 Key: CXF-2113
>                 URL: https://issues.apache.org/jira/browse/CXF-2113
>             Project: CXF
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.1.4
>         Environment: any
>            Reporter: Sven Reinhardt
>            Priority: Minor
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> -Problem:
> changing configuration of proxy in conduit client with spring PropertyPlaceholderConfigurer
> -Backgound:
> to avoid rebuild of the application for differnt environments configurations are externalized
in property files like this:
> <bean
> 	class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> 	<property name="locations" value="classpath:ws_client.properties" />
> </bean>
> <http:conduit ... >
> 	<http:client 
> 		ProxyServer="${ws.client.ProxyServer}" 
> 		ProxyServerPort="${ws.client.ProxyServer}" />
> </http:conduit>
> ws_client.properties:
> ws.client.ProxyServer=proxy
> ws.client.ProxyServerPort=8080
> But this fails for two reasons:
> 1. 
> org.apache.cxf.transports.http.configuration.HTTPClientPolicy getProxyServerPort() is
an integer
> ProxyServerPort="${ws.client.ProxyServer}" fails because the xml is validated in advance
of the placeholder replacement (this might be a spring issue or else)
> it could work if there would be a setProxyServerPortStr(String port) mehode
> 2.
> if there is no proxy it cant be "undone" because
> org.apache.cxf.transport.http.HTTPConduit  getProxy(HTTPClientPolicy) only cheks ProxyServer
via HTTPClientPolicy.isSetProxyServer for  null
> if properties are set to:
> ws.client.ProxyServer=
> ws.client.ProxyServerPort=0
> it results in a connection refused, because the empty String proxy does not exist
> if properties are commented out spring complains about it 
> - Proposed solution:
> add methode setProxyServerPortStr(String port)
> HTTPClientPolicy.isSetProxyServer also checks is proxyServer.length>0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message