Author: supun
Date: Fri May 14 08:40:57 2010
New Revision: 944154
URL: http://svn.apache.org/viewvc?rev=944154&view=rev
Log:
ommiting patch for SYNAPSE-647. Thanks Kasun for contribution
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java?rev=944154&r1=944153&r2=944154&view=diff
==============================================================================
---
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
(original)
+++
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
Fri May 14 08:40:57 2010
@@ -208,16 +208,16 @@ public class Axis2FlexibleMEPClient {
endpoint.getCharSetEncoding());
}
- if (endpoint.getAddress() != null) {
- // add rest request' suffix URI
- Object restSuffix =
-
axisOutMsgCtx.getProperty(NhttpConstants.REST_URL_POSTFIX);
- boolean isRest =
SynapseConstants.FORMAT_REST.equals(endpoint.getFormat());
+ // add rest request' suffix URI
+ Object restSuffix =
+ axisOutMsgCtx.getProperty(NhttpConstants.REST_URL_POSTFIX);
+ boolean isRest =
SynapseConstants.FORMAT_REST.equals(endpoint.getFormat());
- if (!isRest) {
- isRest = isRequestRest(originalInMsgCtx);
- }
+ if (!isRest) {
+ isRest = isRequestRest(originalInMsgCtx);
+ }
+ if (endpoint.getAddress() != null) {
if (isRest && restSuffix != null && !"".equals(restSuffix)) {
axisOutMsgCtx.setTo(
new EndpointReference(endpoint.getAddress() +
restSuffix));
@@ -227,8 +227,16 @@ public class Axis2FlexibleMEPClient {
}
axisOutMsgCtx.setProperty(NhttpConstants.ENDPOINT_PREFIX,
endpoint.getAddress());
+ } else {
+ // Supporting RESTful invocation
+ if (isRest && restSuffix != null && !"".equals(restSuffix)) {
+ EndpointReference epr = axisOutMsgCtx.getTo();
+ if (epr != null) {
+ axisOutMsgCtx.setTo(new
EndpointReference(epr.getAddress() + restSuffix));
+ }
+ }
}
-
+
if (endpoint.isUseSeparateListener()) {
axisOutMsgCtx.getOptions().setUseSeparateListener(true);
}