From 47f6879e357c5f878e3e43164e243cd41e056df0 Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 13 Jul 2010 09:12:08 +0000 Subject: 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 --- .../tuscany/sca/runtime/RuntimeEndpoint.java | 24 +++++++++++++++++++++ .../sca/runtime/RuntimeEndpointReference.java | 25 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) (limited to 'sca-java-2.x/trunk/modules/core-spi') 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(); -- cgit v1.2.3