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

Eugene Goldfarb edited comment on CXF-2113 at 8/4/09 10:48 AM:
---------------------------------------------------------------

I submitted a similar issue earlier (CXF-1647), and showed how the developers 
at the Mule project were able to solve it 
(http://www.mulesource.org/jira/browse/MULE-1887?focusedCommentId=15746&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_15746).
  The solution requires modifications to the schema.

      was (Author: egoldfarb):
    I submitted a similar issue earlier (CXF-1647), and showed how the 
developers at the Mule project were able to solve it.  The solution requires 
modifications to the schema.
  
> 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
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.0.12, 2.1.6, 2.2.3
>
>   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.

Reply via email to