Author: midon
Date: Thu Jul 24 22:42:06 2008
New Revision: 679670
URL: http://svn.apache.org/viewvc?rev=679670&view=rev
Log:
ODE-295, add all property pairs so that new properties (with string value) are
automatically handled (i.e no translation needed)
Modified:
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
Modified:
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java?rev=679670&r1=679669&r2=679670&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
(original)
+++
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
Thu Jul 24 22:42:06 2008
@@ -39,6 +39,7 @@
import java.util.Map;
import java.util.List;
import java.util.Collection;
+import java.util.Iterator;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Alexis Midon</a>
@@ -103,8 +104,8 @@
String host = proxy.getProxyHostName();
if (host == null || host.length() == 0) {
// disable proxy if the host is not null
- proxy=null;
- if(log.isDebugEnabled()) log.debug("Proxy host is null. Proxy
will not be taken into account.");
+ proxy = null;
+ if (log.isDebugEnabled()) log.debug("Proxy host is null. Proxy
will not be taken into account.");
}
}
@@ -120,6 +121,12 @@
public static Options translate(Map<String, String> properties,
Options options) {
if (log.isDebugEnabled()) log.debug("Translating Properties for
Axis2");
if (properties.isEmpty()) return options;
+
+ /*first add all property pairs so that new properties (with string
value)
+ are automatically handled (i.e no translation needed) */
+ for (Map.Entry<String, String> e : properties.entrySet()) {
+ options.setProperty(e.getKey(), e.getValue());
+ }
if (properties.containsKey(PROP_HTTP_CONNECTION_TIMEOUT)) {
final String value =
properties.get(PROP_HTTP_CONNECTION_TIMEOUT);
try {
@@ -175,9 +182,15 @@
}
public static HttpParams translate(Map<String, String> properties,
HttpParams p) {
- if (log.isDebugEnabled()) log.debug("Translating Properties for
HttpClient. Properties size="+properties.size());
+ if (log.isDebugEnabled()) log.debug("Translating Properties for
HttpClient. Properties size=" + properties.size());
if (properties.isEmpty()) return p;
+ /*first add all property pairs so that new properties (with string
value)
+ are automatically handled (i.e no translation needed) */
+ for (Map.Entry<String, String> e : properties.entrySet()) {
+ p.setParameter(e.getKey(), e.getValue());
+ }
+
// initialize the collection of headers
p.setParameter(HostParams.DEFAULT_HEADERS, new ArrayList());