Index: ProxyConfiguration.java =================================================================== --- ProxyConfiguration.java (revision 663911) +++ ProxyConfiguration.java (working copy) @@ -65,7 +65,16 @@ // // Credentials proxyCred = null; + + //Using Java Networking Properties as default + String host = System.getProperty(HTTP_PROXY_HOST); + if (host != null) { + this.setProxyHost(host); + proxyCred = new UsernamePasswordCredentials("",""); + } + String port = System.getProperty(HTTP_PROXY_PORT); + //Getting configuration values from Axis2.xml Parameter param = messageContext.getConfigurationContext().getAxisConfiguration() .getParameter(ATTR_PROXY); @@ -141,7 +150,7 @@ .getProperty(HTTPConstants.PROXY); if (proxyProperties != null) { - String host = proxyProperties.getProxyHostName(); + host = proxyProperties.getProxyHostName(); if (host == null || host.length() == 0) { throw new AxisFault(ProxyConfiguration.class.getName() + " Proxy host is not available. Host is a MUST parameter"); @@ -171,16 +180,6 @@ } - //Using Java Networking Properties - - String host = System.getProperty(HTTP_PROXY_HOST); - if (host != null) { - this.setProxyHost(host); - proxyCred = new UsernamePasswordCredentials("",""); - } - - String port = System.getProperty(HTTP_PROXY_PORT); - if (port != null) { this.setProxyPort(Integer.parseInt(port)); }