diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-21 21:42:27 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-21 21:42:27 +0000 |
commit | 59d7eb7566b4c3ebda6916731d40c167e92fb27d (patch) | |
tree | ed7453a32a28283e77bf8ef839eca438636040ed /sca-java-2.x/trunk/modules/binding-ws-runtime-axis2 | |
parent | eb439b7b7b108101e7cb4a43ede255e4c8fcb0f1 (diff) |
Add a workaround to support callback endpoint over WS
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@947187 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-axis2')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java index 712eba0cea..5b7cc5b3b0 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java @@ -40,6 +40,7 @@ import org.apache.axis2.client.OperationClient; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.MessageContext; +import org.apache.tuscany.sca.assembly.ComponentService; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; import org.apache.tuscany.sca.interfacedef.util.FaultException; @@ -131,6 +132,14 @@ public class Axis2ReferenceBindingInvoker implements Invoker { operationClient.setOptions(options); Endpoint callbackEndpoint = msg.getFrom().getCallbackEndpoint(); + + // [rfeng] This is a hack to populate the callback endpoint + if (callbackEndpoint == null) { + ComponentService callbackService = msg.getFrom().getReference().getCallbackService(); + if (callbackService != null && !callbackService.getEndpoints().isEmpty()) { + callbackEndpoint = callbackService.getEndpoints().get(0); + } + } // add WS-Addressing header //FIXME: is there any way to use the Axis2 addressing support for this? |