summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org')
-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.java6
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java12
2 files changed, 17 insertions, 1 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 c7b81ccac1..4397dfaa10 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
@@ -89,6 +89,7 @@ public class Axis2ReferenceBindingInvoker implements Invoker {
public static final QName QNAME_WSA_MESSAGEID =
new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_MESSAGE_ID, AddressingConstants.WSA_DEFAULT_PREFIX);
+ public static final QName QNAME_CALLACK_EP_URI = new QName(org.apache.tuscany.sca.assembly.xml.Constants.SCA11_TUSCANY_NS, "CALLBACK_EP_URI");
private RuntimeEndpointReference endpointReference;
private ServiceClient serviceClient;
@@ -243,6 +244,11 @@ public class Axis2ReferenceBindingInvoker implements Invoker {
if (callbackEndpoint != null) {
// Load the actual callback endpoint URI into an Axis EPR ready to form the content of the wsa:From header
EndpointReference fromEPR = new EndpointReference(callbackEndpoint.getBinding().getURI());
+
+ // pass the callback structure URI as a reference parameter
+ // this allows callback endpoints to be looked up via the registry when
+ // the ws binding is being used as a delegate from the sca binding
+ fromEPR.addReferenceParameter(QNAME_CALLACK_EP_URI, callbackEndpoint.getURI());
addWSAFromHeader( sh, fromEPR );
addWSAActionHeader( sh );
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java
index 9b76f7e7ea..04257f9b55 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java
@@ -252,7 +252,17 @@ public class TuscanyServiceProvider {
if (callbackAddrElement != null) {
callbackAddress = callbackAddrElement.getText();
OMElement refParms = from.getFirstChildWithName(QNAME_WSA_REFERENCE_PARAMETERS);
- if( refParms != null ) msg.getHeaders().put(WS_REF_PARMS, refParms);
+ if( refParms != null ) {
+ msg.getHeaders().put(WS_REF_PARMS, refParms);
+ Iterator iter = refParms.getChildrenWithLocalName("CALLBACK_EP_URI");
+ if (iter != null && iter.hasNext()){
+ OMElement callbackEPURI = (OMElement)iter.next();
+ if (callbackEPURI != null){
+ msg.getHeaders().put("CALLBACK_EP_URI", callbackEPURI.getText());
+ }
+ }
+ }
+
}
} // end if