Author: midon
Date: Wed Jan 14 16:31:05 2009
New Revision: 734583
URL: http://svn.apache.org/viewvc?rev=734583&view=rev
Log:
ODE-487: create a new property to disable WS-Addressing headers.
Modified:
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.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=734583&r1=734582&r2=734583&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
Wed Jan 14 16:31:05 2009
@@ -78,6 +78,7 @@
public static final String PROP_SECURITY_POLICY = "security.policy";
public static final String PROP_JMS_REPLY_DESTINATION =
"jms.reply.destination";
public static final String PROP_JMS_REPLY_TIMEOUT = "jms.reply.timeout";
+ public static final String PROP_SEND_WS_ADDRESSING_HEADERS =
"ws-adddressing.headers";
protected static final Log log = LogFactory.getLog(Properties.class);
@@ -188,6 +189,10 @@
log.warn("Mal-formatted Property: [" +
Properties.PROP_JMS_REPLY_TIMEOUT + "=" + value + "]. Long expected. Property
will be skipped.");
}
}
+ if(properties.containsKey(PROP_SEND_WS_ADDRESSING_HEADERS)){
+ String value = properties.get(PROP_SEND_WS_ADDRESSING_HEADERS);
+ options.setProperty(PROP_SEND_WS_ADDRESSING_HEADERS,
Boolean.parseBoolean(value));
+ }
// iterate through the properties to get Headers & Proxy
information
Object[] o = getProxyAndHeaders(properties);
Modified:
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java?rev=734583&r1=734582&r2=734583&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java
(original)
+++
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java
Wed Jan 14 16:31:05 2009
@@ -34,6 +34,7 @@
import org.apache.ode.bpel.epr.WSAEndpoint;
import org.apache.ode.bpel.iapi.EndpointReference;
import org.apache.ode.utils.Namespaces;
+import org.apache.ode.axis2.Properties;
/**
* An outgoing handler adding session id information in the message
@@ -46,6 +47,13 @@
public InvocationResponse invoke(MessageContext messageContext) throws
AxisFault {
+ // Skip this handler if ask to do so
+ Boolean shouldSendWSAddrHeaders =
((Boolean)messageContext.getProperty(Properties.PROP_SEND_WS_ADDRESSING_HEADERS));
+ if(shouldSendWSAddrHeaders!=null &&
!shouldSendWSAddrHeaders.booleanValue()){
+ if(__log.isDebugEnabled()) __log.debug("WS-Adressing Headers
skipped");
+ return InvocationResponse.CONTINUE;
+ }
+
EndpointReference otargetSession = (EndpointReference)
messageContext.getProperty("targetSessionEndpoint");
EndpointReference ocallbackSession = (EndpointReference)
messageContext.getProperty("callbackSessionEndpoint");
if (otargetSession == null)
@@ -128,6 +136,6 @@
__log.debug(messageContext.getEnvelope().toString());
}
- return InvocationResponse.CONTINUE;
+ return InvocationResponse.CONTINUE;
}
}