diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-13 09:12:08 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-13 09:12:08 +0000 |
commit | 47f6879e357c5f878e3e43164e243cd41e056df0 (patch) | |
tree | e3328adfcd5a92c5103d112c0b1e73925719311b /sca-java-2.x/trunk/modules/core-spi | |
parent | 6aeeb05d754515b86100efe8e2efc397556076ee (diff) |
TUSCANY-3616 - Add code to check that that interface contracts a reference and reference binding and at service and service binding match. Motivated by BWS_2007. TO do this properly we have to test that the interfaces are described using the same IDL and if not convert to WSDL1.1 are required by the SCA specifications. There are a lot of changes here as doing this upset quite a few tests. Further work is required to look at the details of our WSDL generation process which looks a little suspect around wrapper namespaces.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@963624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi')
2 files changed, 49 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java index 6712b71efd..928880214d 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java @@ -58,10 +58,34 @@ public interface RuntimeEndpoint extends Endpoint, Invocable, Serializable { */ InterfaceContract getComponentTypeServiceInterfaceContract(); + + /** + * Check that endpoint has compatible interface at the component and binding ends. + * The user can specify the interfaces at both ends so there is a danger that they won't be compatible. + */ + void validateServiceInterfaceCompatibility(); + /** * Get the composite context for the composite that contains this endpoint. This * is useful for accessing various composite level objects from within the * runtime code */ CompositeContext getCompositeContext(); + + /** + * to allow for remote interface comparison we convert a Endpoint's Java interface + * to WSDL at build time. + * + * @param wsdlContract + */ +// void setGeneratedWSDLContract(InterfaceContract wsdlContract); + + /** + * to allow for remote interface comparison we convert a Endpoint's Java interface + * to WSDL at build time. + * + * @preturn wsdlContract + */ +// InterfaceContract getGeneratedWSDLContract(); + } diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpointReference.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpointReference.java index e852a47cf8..fb9b9992c6 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpointReference.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpointReference.java @@ -49,6 +49,7 @@ public interface RuntimeEndpointReference extends EndpointReference, Invocable, */ InterfaceContract getBindingInterfaceContract(); + /** * Get the interface contract of the reference of the source component type, i.e., the * componentType.reference.interfaceContract. This represents the data types that the @@ -57,6 +58,30 @@ public interface RuntimeEndpointReference extends EndpointReference, Invocable, */ InterfaceContract getComponentTypeReferenceInterfaceContract(); + /** + * Check that endpoint reference has compatible interface at the component and binding ends. + * The user can specify the interfaces at both ends so there is a danger that they won't be compatible. + * There is checking in the activator but of course endpoint references may not have a binding assigned + * until final resolution. + */ + public void validateReferenceInterfaceCompatibility(); + + /** + * to allow for remote interface comparison we convert a Endpoint Reference's Java interface + * to WSDL at build time. + * + * @param wsdlContract + */ +// void setGeneratedWSDLContract(InterfaceContract wsdlContract); + + /** + * to allow for remote interface comparison we convert a Endpoint Reference's Java interface + * to WSDL at build time. + * + * @preturn wsdlContract + */ +// InterfaceContract getGeneratedWSDLContract(); + boolean isOutOfDate(); void rebuild(); boolean isStarted(); |