diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-13 15:17:41 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-13 15:17:41 +0000 |
commit | f46bb6227703a0be5121628bc4a8d987be74a1cb (patch) | |
tree | b39cfa8a45699db129be3abd516f7e439b726ff9 /sca-java-2.x/trunk/modules | |
parent | 06a34ee20b1ed1d27938bd73f3c7194b10322122 (diff) |
Fixes to set the callback interface based on the interface constructed when the @Callback WSDL annotations is processed. Makes BWS_2022 work.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@963756 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
3 files changed, 10 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java index 9a2ff7b12e..d528516160 100644 --- a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java @@ -434,6 +434,7 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem warning(monitor, "InvalidInterfaceException", wsdlFactory, model.getName(), e.getMessage()); } interfaceContract.setInterface(wsdlInterface); + interfaceContract.setCallbackInterface(wsdlInterface.getCallbackInterface()); model.setBindingInterfaceContract(interfaceContract); } diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 4809241432..ce50c6223e 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -482,19 +482,22 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint if ((serviceContract != null) && (bindingContract != null)){ + + boolean bindingHasCallback = bindingContract.getCallbackInterface() != null; + try { if ((serviceContract.getClass() != bindingContract.getClass()) && (serviceContract instanceof JavaInterfaceContract)) { interfaceContractMapper.checkCompatibility(getGeneratedWSDLContract(serviceContract), bindingContract, Compatibility.SUBSET, - true, // we ignore callbacks as binding iface won't have one + !bindingHasCallback, // ignore callbacks if binding doesn't have one false); } else { interfaceContractMapper.checkCompatibility(serviceContract, bindingContract, Compatibility.SUBSET, - true, // we ignore callbacks as binding iface won't have one + !bindingHasCallback, // ignore callbacks if binding doesn't have one false); } } catch (Exception ex){ diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index 531e4634e1..3873185e6b 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -325,6 +325,8 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen if ((referenceContract != null) && (bindingContract != null)){ + + boolean bindingHasCallback = bindingContract.getCallbackInterface() != null; try { @@ -333,13 +335,13 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen interfaceContractMapper.checkCompatibility(getGeneratedWSDLContract(referenceContract), bindingContract, Compatibility.SUBSET, - true, // we ignore callbacks as binding iface won't have one + !bindingHasCallback, // ignore callbacks if binding doesn't have one false); } else { interfaceContractMapper.checkCompatibility(referenceContract, bindingContract, Compatibility.SUBSET, - true, // we ignore callbacks as binding iface won't have one + !bindingHasCallback, // ignore callbacks if binding doesn't have one false); } |