You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2010/02/20 00:38:01 UTC

svn commit: r912034 - in /tuscany/sca-java-2.x/trunk/modules: assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/ assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ ...

Author: rfeng
Date: Fri Feb 19 23:38:00 2010
New Revision: 912034

URL: http://svn.apache.org/viewvc?rev=912034&view=rev
Log:
Align the interfaceContractMapper to the spec
Remove the conversation related legacy code

Added:
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java   (with props)
Removed:
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ConversationSequence.java
Modified:
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Interface.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/InterfaceContractMapper.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ContractCompatibilityTestCase.java
    tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeWireApplierImpl.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireBuilderImpl.java
    tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireMatcherImpl.java
    tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java
    tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java

Added: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java?rev=912034&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java (added)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java Fri Feb 19 23:38:00 2010
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.interfacedef;
+
+/**
+ * Types of compatibility
+ */
+public enum Compatibility {
+    SUPERSET,       // The source is a superset of the target    
+    SUBSET,         // The source is a subset of the target
+    MUTUAL,          // The source is the same set as the target
+    INCOMPATIBLE     // The source is not compatible with the target   
+}
\ No newline at end of file

Propchange: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Compatibility.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Interface.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Interface.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Interface.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Interface.java Fri Feb 19 23:38:00 2010
@@ -57,19 +57,6 @@
      */
     boolean isRemotableSet();
 
-    // FIXME: [rfeng] We need to re-consider the conversational as an intent
-    /**
-     * Test if the interface is conversational
-     * @return
-     */
-    boolean isConversational();
-
-    /**
-     * Set whether the interface is conversational
-     * @param conversational
-     */
-    void setConversational(boolean conversational);
-
     /**
      * Returns the operations defined on this interface.
      *

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/InterfaceContractMapper.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/InterfaceContractMapper.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/InterfaceContractMapper.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/InterfaceContractMapper.java Fri Feb 19 23:38:00 2010
@@ -26,64 +26,9 @@
  */
 public interface InterfaceContractMapper {
     /**
-     * Check the compatibility of the source and the target interface contracts.
-     * <p>
-     * A wire may only connect a source to a target if the target implements an
-     * interface that is compatible with the interface required by the source.
-     * The source and the target are compatible if: <p/>
-     * <ol>
-     * <li>the source interface and the target interface MUST either both be
-     * remotable or they are both local
-     * <li>the methods on the target interface MUST be the same as or be a
-     * superset of the methods in the interface specified on the source
-     * <li>compatibility for the individual method is defined as compatibility
-     * of the signature, that is method name, input types, and output types MUST
-     * BE the same.
-     * <li>the order of the input and output types also MUST BE the same.
-     * <li>the set of Faults and Exceptions expected by the source MUST BE the
-     * same or be a superset of those specified by the service.
-     * <li>other specified attributes of the two interfaces MUST match,
-     * including Scope and Callback interface
-     * </ol>
-     * <p/>
-     * <p>
-     * This relationship implies that the source contract is a subset of the target
-     * contract - ie all the operations of the source must be present in the target, but
-     * the target can in principle contain additional operations not present in the 
-     * source
-     * </p>
-     * <p>
-     * Please note this test is not symmetric: the success of isCompatible(A, B)
-     * does NOT imply isCompatible(B, A)
-     * 
      * @param source The source interface contract
      * @param target The target interface contract
-     * @return true if the source contract can be supported by the target
-     *         contract
-     */
-    boolean isCompatible(InterfaceContract source, InterfaceContract target);
-    
-    /**
-     * Check that two interface contracts are equal. The contracts are equal if the two contracts have the 
-     * same set of operations, with each operation having the same signature. 
-     * @param source - the source contract
-     * @param target - the target contract
-     * @return
-     */
-    boolean isEqual(InterfaceContract source, InterfaceContract target);
-
-    /**
-     * Check that two interfaces are equal. The interfaces are equal if the two interfaces have the 
-     * same set of operations, with each operation having the same signature. 
-     * @param source an interface
-     * @param target a second interface
-     * @return true if the two interfaces are equal, otherwise return false
-     */
-    public boolean isEqual(Interface source, Interface target);
-    
-    /**
-     * @param source
-     * @param target
+     * @param compatibility The compatibility style 
      * @param ignoreCallback
      * @param silent
      * @return
@@ -91,6 +36,7 @@
      */
     boolean checkCompatibility(InterfaceContract source,
                                InterfaceContract target,
+                               Compatibility compatibility,
                                boolean ignoreCallback,
                                boolean silent) throws IncompatibleInterfaceContractException;
 
@@ -106,34 +52,149 @@
      * 
      * @param source The source data type
      * @param target The target data type
-     * @return
+     * @param passByValue A flag to indicate how the compatibility is checked
+     * <ul>
+     * <li>true: Check the two types as compatible "by-value" (can be copied)
+     * <li>false: Check the two types as compatible "by-reference" (can be assigned)
+     * </ul> 
+     * @return true if the source data type is the same or subtype of the target data type 
      */
-    boolean isCompatible(DataType<?> source, DataType<?> target, boolean remotable);
+    boolean isCompatible(DataType<?> source, DataType<?> target, boolean passByValue);
 
     /**
-     * Check if source operation is compatible with the target operation
+     * Check if source operation is compatible with the target operation. A source operation is 
+     * compatible with the target operation means the following:
+     * 
+     * <ol>
+     * <li>compatibility for the two operations is defined as compatibility 
+     * of the signature, i.e., the operation name, the input types, and the output types are the same
+     * 
+     * <li>the order of the input and output types of the source operation is the same as the order of 
+     * the input and output types for the corresponding target operation
+     * <li>the set of Faults and Exceptions expected by the source operation is the same as or is 
+     * a SUPERSET of the set of Faults and Exceptions specified by the corresponding target operation
+     * </ol>
+     * 
+     * Simply speaking, any request from the source operation can be processed by the target operation and
+     * the normal response or fault/exception from the target operation can be handled by the source operation.
+     * 
+     * Please note this compatibility check is NOT symmetric.  
      * 
      * @param source The source operation
      * @param target The target operation
+     * @param compatibilityType TODO
      * @return true if the source operation is compatible with the target
      *         operation
      */
-    boolean isCompatible(Operation source, Operation target, boolean remotable);
+    boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType);
 
     /**
-     * @param source
-     * @param target
-     * @return
+     * An interface A is a Compatible Subset of a second interface B if and only if all of points 1 through 6 
+     * in the following list apply:
+     * <ol>
+     * <li>interfaces A and B are either both remotable or else both local
+     * <li>the set of operations in interface A is the same as or is a subset of the set of operations in 
+     * interface B
+     * <li>compatibility for individual operations of the interfaces A and B is defined as compatibility 
+     * of the signature, i.e., the operation name, the input types, and the output types are the same
+     * <li>the order of the input and output types for each operation in interface A is the same as the 
+     * order of the input and output types for the corresponding operation in interface B
+     * <li>the set of Faults and Exceptions expected by each operation in interface A is the same as or is 
+     * a superset of the set of Faults and Exceptions specified by the corresponding operation in interface B
+     * <li>for checking the compatibility of 2 remotable interfaces which are in different interface 
+     * languages, both are mapped to WSDL 1.1 (if not already WSDL 1.1) and compatibility checking is done 
+     * between the WSDL 1.1 mapped interfaces.<br>
+     * For checking the compatibility of 2 local interfaces which are in different interface languages, the 
+     * method of checking compatibility is defined by the specifications which define those interface types, 
+     * which must define mapping rules for the 2 interface types concerned.
+     * 
+     * </ol>
+     * 
+     * <b>The callback interfaces are not considered her.</b>
+     * 
+     * @param source The source interface 
+     * @param target The target interface 
+     * @return true if the source interface is a compatible subset of the target interface 
+     */
+    boolean isCompatibleSubset(Interface source, Interface target);
+
+    /**
+     * An interface A is a Compatible Subset of a second interface B if and only if all of points 1 through 7 
+     * in the following list apply:
+     * <ol>
+     * <li>interfaces A and B are either both remotable or else both local
+     * <li>the set of operations in interface A is the same as or is a subset of the set of operations in 
+     * interface B
+     * <li>compatibility for individual operations of the interfaces A and B is defined as compatibility 
+     * of the signature, i.e., the operation name, the input types, and the output types are the same
+     * <li>the order of the input and output types for each operation in interface A is the same as the 
+     * order of the input and output types for the corresponding operation in interface B
+     * <li>the set of Faults and Exceptions expected by each operation in interface A is the same as or is 
+     * a superset of the set of Faults and Exceptions specified by the corresponding operation in interface B
+     * <li>for checking the compatibility of 2 remotable interfaces which are in different interface 
+     * languages, both are mapped to WSDL 1.1 (if not already WSDL 1.1) and compatibility checking is done 
+     * between the WSDL 1.1 mapped interfaces.<br>
+     * For checking the compatibility of 2 local interfaces which are in different interface languages, the 
+     * method of checking compatibility is defined by the specifications which define those interface types, 
+     * which must define mapping rules for the 2 interface types concerned.
+     * <li>if either interface A or interface B declares a callback interface then both interface
+     * A and interface B declare callback interfaces and the callback interface declared on interface B is a 
+     * compatible subset of the callback interface declared on interface A, according to points 1 through 6 
+     * above
+     * </ol>
+     * 
+     * @param source The source interface contract
+     * @param target The target interface contract
+     * @return true if the source interface contract is a compatible subset of the target interface contract
      */
-    boolean isCompatible(Interface source, Interface target);
+    boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target);
 
     /**
-     * Map the source operation to a compatible operation in the target
-     * interface
+     * Check that two interfaces are mutually compatible. The interfaces are mutually compatible if the two 
+     * interfaces have the same set of operations, with each operation having the same signature (name, input 
+     * types, output types and fault/exception types).
+     * 
+     * @param source an interface
+     * @param target a second interface
+     * @return true if the two interfaces are mutually compatible, otherwise return false
+     */
+    public boolean isMutuallyCompatible(Interface source, Interface target);
+
+    /**
+     * An interface A is Compatible with a second interface B if and only if all of points 1 through 7 in the
+     * following list apply:<p>
+     * <ol>
+     * <li>interfaces A and B are either both remotable or else both local
+     * <li>the set of operations in interface A is the same as the set of operations in interface B
+     * <li>compatibility for individual operations of the interfaces A and B is defined as compatibility 
+     * of the signature, i.e., the operation name, the input types, and the output types are the same
+     * <li>the order of the input and output types for each operation in interface A is the same as the 
+     * order of the input and output types for the corresponding operation in interface B
+     * <li>the set of Faults and Exceptions expected by each operation in interface A is the
+     * same as the set of Faults and Exceptions specified by the corresponding operation in interface B
+     * <li>for checking the compatibility of 2 remotable interfaces which are in different interface 
+     * languages, both are mapped to WSDL 1.1 (if not already WSDL 1.1) and compatibility checking is done 
+     * between the WSDL 1.1 mapped interfaces.
+     * <br>For checking the compatibility of 2 local interfaces which are in different interface languages, 
+     * the method of checking compatibility is defined by the specifications which define those interface types, 
+     * which must define mapping rules for the 2 interface types concerned.
+     * <li>if either interface A or interface B declares a callback interface then both interface
+     * A and interface B declare callback interfaces and the callback interface declared on interface A is 
+     * compatible with the callback interface declared on interface B, according to points 1 through 6 above
+     *  
+     * @param source - the source interface contract
+     * @param target - the target interface contract
+     * @return true if the source and target interface contracts are mutually compatible
+     */
+    boolean isMutuallyCompatible(InterfaceContract source, InterfaceContract target);
+
+    /**
+     * Map the source operation to a compatible operation in the target interface
      * 
      * @param target The target interface
      * @param source The source operation
-     * @return A compatible operation
+     * @return A compatible operation if the target interface is compatible superset of the source interface
      */
     Operation map(Interface target, Operation source);
+
 }

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java Fri Feb 19 23:38:00 2010
@@ -111,18 +111,6 @@
     void setInterface(Interface interfaze);
 
     /**
-     * Get the sequence of the conversation
-     * @return
-     */
-    ConversationSequence getConversationSequence();
-
-    /**
-     * Set the sequence of conversation for the operation
-     * @param sequence
-     */
-    void setConversationSequence(ConversationSequence sequence);
-
-    /**
      * Indicate if the operation is non-blocking
      * @return
      */

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java Fri Feb 19 23:38:00 2010
@@ -21,6 +21,7 @@
 
 import java.util.List;
 
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
 import org.apache.tuscany.sca.interfacedef.Interface;
@@ -33,24 +34,24 @@
  */
 public class InterfaceContractMapperImpl implements InterfaceContractMapper {
 
-    public boolean isCompatible(DataType source, DataType target, boolean remotable) {
+    public boolean isCompatible(DataType source, DataType target, boolean passByValue) {
         if (source == target) {
             return true;
         }
-        if (!remotable) {
+        if (!passByValue) {
             if (source == null || target == null) {
                 return false;
             }
             // For local case
             return target.getPhysical().isAssignableFrom(source.getPhysical());
         } else {
-            // FIXME: How to test if two remotable data type is compatible?
-            // return target.getLogical().equals(source.getLogical());
+            // FIXME: [rfeng] How to test if two remotable data type is compatible?
+            // We will need to understand the different typing system used by the databindings
+            // We should probably delegate to some extensions here
             return true;
         }
 
     }
-    
 
     /**
      * Check that two interface contracts are equal. The contracts are equal if the two contracts have the 
@@ -60,21 +61,21 @@
      * @param target
      * @return
      */
-    public boolean isEqual(InterfaceContract source, InterfaceContract target) {
-    	// Are the forward interfaces equal?
-    	if( isEqual( source.getInterface(), target.getInterface()) ) {
-    		// Is there a Callback interface?
-    		if( source.getCallbackInterface() == null && target.getCallbackInterface() == null ) {
-    			return true;
-    		} else {
-    			if( isEqual( source.getCallbackInterface(), target.getCallbackInterface()) ) {
-    				return true;
-    			} // end if
-    		} // end if
-    	} // end if
-    	return false;
+    public boolean isMutuallyCompatible(InterfaceContract source, InterfaceContract target) {
+        // Are the forward interfaces equal?
+        if (isMutuallyCompatible(source.getInterface(), target.getInterface())) {
+            // Is there a Callback interface?
+            if (source.getCallbackInterface() == null && target.getCallbackInterface() == null) {
+                return true;
+            } else {
+                if (isMutuallyCompatible(source.getCallbackInterface(), target.getCallbackInterface())) {
+                    return true;
+                } // end if
+            } // end if
+        } // end if
+        return false;
     } // end method isEqual
-    
+
     /**
      * Check that two interfaces are equal. The interfaces are equal if the two interfaces have the 
      * same set of operations, with each operation having the same signature. 
@@ -82,13 +83,13 @@
      * @param target
      * @return
      */
-    public boolean isEqual(Interface source, Interface target) {
+    public boolean isMutuallyCompatible(Interface source, Interface target) {
         if (source == target) {
             // Shortcut for performance
             return true;
         } // end if
         if (source == null || target == null) {
-       		return false;
+            return false;
         } // end if
 
         if (source.isDynamic() || target.isDynamic()) {
@@ -98,26 +99,23 @@
         if (source.isRemotable() != target.isRemotable()) {
             return false;
         }
-        if (source.isConversational() != target.isConversational()) {
+        if (source.getOperations().size() != target.getOperations().size()) {
             return false;
         }
-        if( source.getOperations().size() != target.getOperations().size() ) {
-        	return false;
-        }
 
         for (Operation operation : source.getOperations()) {
             Operation targetOperation = getOperation(target.getOperations(), operation.getName());
             if (targetOperation == null) {
                 return false;
             }
-            if (!isCompatible(operation, targetOperation, source.isRemotable())) {
+            if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) {
                 return false;
             }
         }
         return true;
     } // end method isEqual
 
-    public boolean isCompatible(Operation source, Operation target, boolean remotable) {
+    public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType) {
         if (source == target) {
             return true;
         }
@@ -135,6 +133,8 @@
             return false;
         }
 
+        boolean remotable = source.getInterface().isRemotable();
+
         //        if (source.getInterface().isRemotable()) {
         //            return true;
         //        }
@@ -212,22 +212,23 @@
 
     public boolean checkCompatibility(InterfaceContract source,
                                       InterfaceContract target,
+                                      Compatibility compatibility,
                                       boolean ignoreCallback,
                                       boolean silent) throws IncompatibleInterfaceContractException {
         if (source == target) {
             // Shortcut for performance
             return true;
         }
-        
-        if (source == null || target == null){
+
+        if (source == null || target == null) {
             return false;
         }
-        
-        if (source.getInterface() == target.getInterface()){
+
+        if (source.getInterface() == target.getInterface()) {
             return ignoreCallback || isCallbackCompatible(source, target, silent);
         }
-        
-        if (source.getInterface() == null || target.getInterface() == null){
+
+        if (source.getInterface() == null || target.getInterface() == null) {
             return false;
         }
 
@@ -242,13 +243,6 @@
                 return false;
             }
         }
-        if (source.getInterface().isConversational() != target.getInterface().isConversational()) {
-            if (!silent) {
-                throw new IncompatibleInterfaceContractException("Interaction scopes do not match", source, target);
-            } else {
-                return false;
-            }
-        }
 
         for (Operation operation : source.getInterface().getOperations()) {
             Operation targetOperation = map(target.getInterface(), operation);
@@ -261,7 +255,7 @@
             }
             if (!source.getInterface().isRemotable()) {
                 // FIXME: for remotable operation, only compare name for now
-                if (!isCompatible(operation, targetOperation, false)) {
+                if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) {
                     if (!silent) {
                         throw new IncompatibleInterfaceContractException("Target operations are not compatible",
                                                                          source, target);
@@ -275,8 +269,8 @@
         return ignoreCallback || isCallbackCompatible(source, target, silent);
     }
 
-
-    protected boolean isCallbackCompatible(InterfaceContract source, InterfaceContract target, boolean silent) throws IncompatibleInterfaceContractException {
+    protected boolean isCallbackCompatible(InterfaceContract source, InterfaceContract target, boolean silent)
+        throws IncompatibleInterfaceContractException {
         if (source.getCallbackInterface() == null && target.getCallbackInterface() == null) {
             return true;
         }
@@ -288,14 +282,6 @@
             }
         }
 
-        if (source.getCallbackInterface().isConversational() != target.getCallbackInterface().isConversational()) {
-            if (!silent) {
-                throw new IncompatibleInterfaceContractException("Interaction scopes do not match", source, target);
-            } else {
-                return false;
-            }
-        }
-
         for (Operation operation : source.getCallbackInterface().getOperations()) {
             Operation targetOperation =
                 getOperation(target.getCallbackInterface().getOperations(), operation.getName());
@@ -322,7 +308,7 @@
         return true;
     }
 
-    public boolean isCompatible(Interface source, Interface target) {
+    public boolean isCompatibleSubset(Interface source, Interface target) {
         if (source == target) {
             // Shortcut for performance
             return true;
@@ -338,25 +324,22 @@
         if (source.isRemotable() != target.isRemotable()) {
             return false;
         }
-        if (source.isConversational() != target.isConversational()) {
-            return false;
-        }
 
         for (Operation operation : source.getOperations()) {
             Operation targetOperation = getOperation(target.getOperations(), operation.getName());
             if (targetOperation == null) {
                 return false;
             }
-            if (!isCompatible(operation, targetOperation, source.isRemotable())) {
+            if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) {
                 return false;
             }
         }
         return true;
     }
 
-    public boolean isCompatible(InterfaceContract source, InterfaceContract target) {
+    public boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target) {
         try {
-            return checkCompatibility(source, target, false, false);
+            return checkCompatibility(source, target, Compatibility.SUBSET, false, false);
         } catch (IncompatibleInterfaceContractException e) {
             return false;
         }
@@ -379,7 +362,7 @@
             return null;
         } else {
             for (Operation op : target.getOperations()) {
-                if (isCompatible(source, op, target.isRemotable())) {
+                if (isCompatible(source, op, Compatibility.SUBSET)) {
                     return op;
                 }
             }

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java Fri Feb 19 23:38:00 2010
@@ -26,7 +26,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -49,7 +48,6 @@
     private DataType<List<DataType>> inputType;
     private List<DataType> faultTypes;
     private Interface interfaze;
-    private ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE;
     private boolean nonBlocking;
     private boolean wrapperStyle;
     private WrapperInfo wrapper;
@@ -146,20 +144,6 @@
     }
 
     /**
-     * @return the conversationSequence
-     */
-    public ConversationSequence getConversationSequence() {
-        return conversationSequence;
-    }
-
-    /**
-     * @param conversationSequence the conversationSequence to set
-     */
-    public void setConversationSequence(ConversationSequence conversationSequence) {
-        this.conversationSequence = conversationSequence;
-    }
-
-    /**
      * @return the nonBlocking
      */
     public boolean isNonBlocking() {

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ContractCompatibilityTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ContractCompatibilityTestCase.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ContractCompatibilityTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/interfacedef/impl/ContractCompatibilityTestCase.java Fri Feb 19 23:38:00 2010
@@ -29,6 +29,7 @@
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
 import org.apache.tuscany.sca.interfacedef.Interface;
@@ -58,7 +59,7 @@
     public void testNoOperation() throws Exception {
         InterfaceContract source = new MockContract("FooContract");
         InterfaceContract target = new MockContract("FooContract");
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     @Test
@@ -73,7 +74,7 @@
         Map<String, Operation> targetOperations = new HashMap<String, Operation>();
         targetOperations.put("op1", opSource2);
         target.getInterface().getOperations().addAll(targetOperations.values());
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     @Test
@@ -89,7 +90,7 @@
         targetOperations.put("op2", opSource2);
         target.getInterface().getOperations().addAll(targetOperations.values());
         try {
-            mapper.checkCompatibility(source, target, false, false);
+            mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
             fail();
         } catch (IncompatibleInterfaceContractException e) {
             // expected
@@ -118,7 +119,7 @@
         Map<String, Operation> targetOperations = new HashMap<String, Operation>();
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     @Test
@@ -144,7 +145,7 @@
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
         try {
-            mapper.checkCompatibility(source, target, false, false);
+            mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
             fail();
         } catch (IncompatibleInterfaceContractException e) {
             // expected
@@ -202,7 +203,7 @@
         Map<String, Operation> targetOperations = new HashMap<String, Operation>();
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     /**
@@ -250,7 +251,7 @@
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
         try {
-            mapper.checkCompatibility(source, target, false, false);
+            mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
             fail();
         } catch (IncompatibleInterfaceContractException e) {
             // expected
@@ -279,7 +280,7 @@
         Map<String, Operation> targetOperations = new HashMap<String, Operation>();
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     @Test
@@ -299,7 +300,7 @@
         Map<String, Operation> targetOperations = new HashMap<String, Operation>();
         targetOperations.put("op1", opTarget);
         target.getInterface().getOperations().addAll(targetOperations.values());
-        mapper.checkCompatibility(source, target, false, false);
+        mapper.checkCompatibility(source, target, Compatibility.SUBSET, false, false);
     }
 
     /**

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java Fri Feb 19 23:38:00 2010
@@ -41,7 +41,6 @@
 import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
-import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
@@ -225,28 +224,6 @@
             wsBinding.setBindingInterfaceContract(icontract);
         }
         
-        // TODO - fix up the conversational flag and operation sequences in case the contract has come from WSDL
-        // as we don't yet support requires="conversational" or sca:endConversation annotations
-        // in WSDL interface descriptions (see section 1.5.4 of the Assembly Specification V1.0)
-        if (contract.getInterfaceContract().getInterface() != null ) {
-            icontract.getInterface().setConversational(contract.getInterfaceContract().getInterface().isConversational());
-            
-            for (Operation operation : icontract.getInterface().getOperations()){
-                Operation serviceOperation = null;
-                
-                for (Operation tmpOp : contract.getInterfaceContract().getInterface().getOperations()){
-                    if (operation.getName().equals(tmpOp.getName())) {
-                        serviceOperation = tmpOp;
-                        break;
-                    }
-                }
-                
-                if (serviceOperation != null ){
-                    operation.setConversationSequence(serviceOperation.getConversationSequence());
-                }
-            }
-        }
-
         /*
         // Look at all the Web Service bindings of the SCA service to see if any
         // of them have an existing generated WSDL definitions document.  If found,
@@ -328,7 +305,6 @@
         wsdlDefinition.setDefinition(def);
         wsdlInterface.setWsdlDefinition(wsdlDefinition);
         wsdlInterface.setRemotable(true);
-        wsdlInterface.setConversational(contract.getInterface().isConversational());
         wsdlInterface.setUnresolved(false);
         wsdlInterface.setRemotable(true);
         PortType portType = (PortType)def.getAllPortTypes().values().iterator().next();

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java Fri Feb 19 23:38:00 2010
@@ -59,6 +59,7 @@
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 import org.apache.tuscany.sca.definitions.Definitions;
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -1119,7 +1120,7 @@
             boolean isCompatible = true;
             String incompatibilityReason = "";
             try{
-                isCompatible = interfaceContractMapper.checkCompatibility(topInterfaceContract, bottomInterfaceContract, false, false);
+                isCompatible = interfaceContractMapper.checkCompatibility(topInterfaceContract, bottomInterfaceContract, Compatibility.SUBSET, false, false);
             } catch (IncompatibleInterfaceContractException ex){
                 isCompatible = false;
                 incompatibilityReason = ex.getMessage();
@@ -1139,7 +1140,7 @@
     /**
      * Interface contract from higher in the implementation hierarchy takes precedence
      * When it comes to checking compatibility the top level reference interface is a 
-     * superset of the promoted reference interface so treat the treat the promoted
+     * superset of the promoted reference interface so treat the promoted
      * (bottom) interface as the source    
      * 
      * @param topContract the top contract 
@@ -1159,7 +1160,7 @@
             boolean isCompatible = true;
             String incompatibilityReason = "";
             try{
-                isCompatible = interfaceContractMapper.checkCompatibility(bottomInterfaceContract, topInterfaceContract, false, false);
+                isCompatible = interfaceContractMapper.checkCompatibility(bottomInterfaceContract, topInterfaceContract, Compatibility.SUBSET, false, false);
             } catch (IncompatibleInterfaceContractException ex){
                 isCompatible = false;
                 incompatibilityReason = ex.getMessage();

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java Fri Feb 19 23:38:00 2010
@@ -46,6 +46,7 @@
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 import org.apache.tuscany.sca.definitions.Definitions;
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -426,7 +427,7 @@
             boolean isCompatible = true;
             String incompatibilityReason = "";
             try{
-                isCompatible = interfaceContractMapper.checkCompatibility(topInterfaceContract, bottomInterfaceContract, false, false);
+                isCompatible = interfaceContractMapper.checkCompatibility(topInterfaceContract, bottomInterfaceContract, Compatibility.SUBSET, false, false);
             } catch (IncompatibleInterfaceContractException ex){
                 isCompatible = false;
                 incompatibilityReason = ex.getMessage();
@@ -464,7 +465,7 @@
             boolean isCompatible = true;
             String incompatibilityReason = "";
             try{
-                isCompatible = interfaceContractMapper.checkCompatibility(bottomInterfaceContract, topInterfaceContract, false, false);
+                isCompatible = interfaceContractMapper.checkCompatibility(bottomInterfaceContract, topInterfaceContract, Compatibility.SUBSET, false, false);
             } catch (IncompatibleInterfaceContractException ex){
                 isCompatible = false;
                 incompatibilityReason = ex.getMessage();

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeWireApplierImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeWireApplierImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeWireApplierImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeWireApplierImpl.java Fri Feb 19 23:38:00 2010
@@ -192,7 +192,7 @@
                 // a superset of
                 // the component reference interface
                 if (resolvedReference.getInterfaceContract() == null || interfaceContractMapper
-                    .isCompatible(resolvedReference.getInterfaceContract(), resolvedService.getInterfaceContract())) {
+                    .isCompatibleSubset(resolvedReference.getInterfaceContract(), resolvedService.getInterfaceContract())) {
 
                     //resolvedReference.getTargets().add(resolvedService);
                     if (wire.isReplace()) {

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java Fri Feb 19 23:38:00 2010
@@ -216,7 +216,7 @@
     
                     for (ComponentService targetComponentService : targetComponent.getServices()) {
                         if (reference.getInterfaceContract() == null || 
-                            interfaceContractMapper.isCompatible(reference.getInterfaceContract(), 
+                            interfaceContractMapper.isCompatibleSubset(reference.getInterfaceContract(), 
                                                                  targetComponentService.getInterfaceContract())) {
                             
                             if (intentsMatch(reference.getRequiredIntents(), targetComponentService.getRequiredIntents())) {                            

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireBuilderImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireBuilderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireBuilderImpl.java Fri Feb 19 23:38:00 2010
@@ -302,7 +302,7 @@
                 // a superset of
                 // the component reference interface
                 if (resolvedReference.getInterfaceContract() == null || interfaceContractMapper
-                    .isCompatible(resolvedReference.getInterfaceContract(), resolvedService.getInterfaceContract())) {
+                    .isCompatibleSubset(resolvedReference.getInterfaceContract(), resolvedService.getInterfaceContract())) {
 
                     //resolvedReference.getTargets().add(resolvedService);
                     if (wire.isReplace()) {
@@ -350,7 +350,7 @@
                     continue;
 
                 for (ComponentService targetComponentService : targetComponent.getServices()) {
-                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatible(reference
+                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatibleSubset(reference
                         .getInterfaceContract(), targetComponentService.getInterfaceContract())) {
                         
                         if (intentsMatch(reference.getRequiredIntents(), targetComponentService.getRequiredIntents())) {
@@ -405,7 +405,7 @@
 
                 if (targetComponentService != null) {
                     // Check that target component service provides a superset of the component reference interface
-                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatible(reference
+                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatibleSubset(reference
                         .getInterfaceContract(), targetComponentService.getInterfaceContract())) {
 
                         if (bindingName != null) {
@@ -532,7 +532,7 @@
 
                     // Check that the target component service provides
                     // a superset of the component reference interface
-                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatible(reference
+                    if (reference.getInterfaceContract() == null || interfaceContractMapper.isCompatibleSubset(reference
                         .getInterfaceContract(), targetComponentService.getInterfaceContract())) {
                         if (bindingName != null) {
                             // the user has selected a binding as part of the target name

Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireMatcherImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireMatcherImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireMatcherImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/WireMatcherImpl.java Fri Feb 19 23:38:00 2010
@@ -50,7 +50,7 @@
     public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) {
         InterfaceContract sourceIC = endpointReference.getComponentReferenceInterfaceContract();
         InterfaceContract targetIC = endpoint.getComponentServiceInterfaceContract();
-        if (!interfaceContractMapper.isCompatible(sourceIC, targetIC)) {
+        if (!interfaceContractMapper.isCompatibleSubset(sourceIC, targetIC)) {
             return false;
         }
         for (PolicyBuilder policyBuilder : builderExtensionPoint.getPolicyBuilders()) {

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java Fri Feb 19 23:38:00 2010
@@ -56,18 +56,6 @@
      */
     CompositeContext getCompositeContext();
     
-
-    /**
-     * Get the node URI
-     * @return The node URI
-     */
-    String getNodeURI();
-    /**
-     * Get the domain URI
-     * @return The domain URI
-     */
-    String getDomainURI();
-
     /**
      * Unbind the invocable from the composite context
      */

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java Fri Feb 19 23:38:00 2010
@@ -46,6 +46,7 @@
 import org.apache.tuscany.sca.core.invocation.RuntimeInvoker;
 import org.apache.tuscany.sca.core.invocation.impl.InvocationChainImpl;
 import org.apache.tuscany.sca.core.invocation.impl.PhaseManager;
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -99,9 +100,6 @@
     protected InterfaceContract bindingInterfaceContract;
     protected InterfaceContract serviceInterfaceContract;
     
-    private String domainURI;
-    private String nodeURI;
-
     /**
      * No-arg constructor for Java serilization
      */
@@ -131,8 +129,6 @@
         this.policySets = copy.policySets;
 
         this.uri = copy.uri;
-        this.nodeURI = copy.nodeURI;
-        this.domainURI = copy.domainURI;
         this.remote = copy.remote;
         this.unresolved = copy.unresolved;
 
@@ -148,12 +144,6 @@
 
     public void bind(CompositeContext compositeContext) {
         this.compositeContext = compositeContext;
-        if (nodeURI != null) {
-            this.nodeURI = compositeContext.getNodeURI();
-        }
-        if (domainURI != null) {
-            this.domainURI = compositeContext.getDomainURI();
-        }
         bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
     }
 
@@ -211,7 +201,7 @@
             for (InvocationChain chain : getInvocationChains()) {
                 Operation op = chain.getTargetOperation();
 
-                if (interfaceContractMapper.isCompatible(operation, op, op.getInterface().isRemotable())) {
+                if (interfaceContractMapper.isCompatible(operation, op, Compatibility.SUBSET)) {
                     invocationChainMap.put(operation, chain);
                     return chain;
                 }
@@ -583,12 +573,4 @@
         }
     }
 
-    public String getDomainURI() {
-        return domainURI;
-    }
-
-    public String getNodeURI() {
-        return nodeURI;
-    }
-
 }

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java Fri Feb 19 23:38:00 2010
@@ -47,6 +47,7 @@
 import org.apache.tuscany.sca.core.invocation.RuntimeInvoker;
 import org.apache.tuscany.sca.core.invocation.impl.InvocationChainImpl;
 import org.apache.tuscany.sca.core.invocation.impl.PhaseManager;
+import org.apache.tuscany.sca.interfacedef.Compatibility;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -99,9 +100,6 @@
 
     protected InterfaceContract bindingInterfaceContract;
     protected InterfaceContract referenceInterfaceContract;
-    private String domainURI;
-    private String nodeURI;
-
     private String xml;
 
     /**
@@ -133,8 +131,6 @@
         this.policySets = copy.policySets;
 
         this.uri = copy.uri;
-        this.domainURI = copy.domainURI;
-        this.nodeURI = copy.nodeURI;
         this.remote = copy.remote;
         this.unresolved = copy.unresolved;
         this.status = copy.status;
@@ -151,12 +147,6 @@
 
     public void bind(CompositeContext compositeContext) {
         this.compositeContext = compositeContext;
-        if (nodeURI != null) {
-            this.nodeURI = compositeContext.getNodeURI();
-        }
-        if (domainURI != null) {
-            this.domainURI = compositeContext.getDomainURI();
-        }
         bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
     }
 
@@ -201,7 +191,7 @@
         if (cached == null) {
             for (InvocationChain chain : getInvocationChains()) {
                 Operation op = chain.getSourceOperation();
-                if (interfaceContractMapper.isCompatible(operation, op, op.getInterface().isRemotable())) {
+                if (interfaceContractMapper.isCompatible(operation, op, Compatibility.SUBSET)) {
                     invocationChainMap.put(operation, chain);
                     return chain;
                 }
@@ -541,13 +531,5 @@
             }
         }
     }
-    
-    public String getDomainURI() {
-        return domainURI;
-    }
-
-    public String getNodeURI() {
-        return nodeURI;
-    }
 
 }

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java Fri Feb 19 23:38:00 2010
@@ -596,7 +596,7 @@
         }
              
         boolean match = false;
-        match = interfaceContractMapper.isCompatible(endpointReference.getReference().getInterfaceContract(), 
+        match = interfaceContractMapper.isCompatibleSubset(endpointReference.getReference().getInterfaceContract(), 
                                                      endpoint.getComponentServiceInterfaceContract());
         
         if (!match){

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java Fri Feb 19 23:38:00 2010
@@ -82,8 +82,7 @@
             Interface implType = javaInterfaceFactory.createJavaInterface(impl.getJavaClass());
             // Ignore the remotable/conversational testing
             implType.setRemotable(iface.isRemotable());
-            implType.setConversational(iface.isConversational());
-            return interfaceContractMapper.isCompatible(iface, implType);
+            return interfaceContractMapper.isCompatibleSubset(iface, implType);
         } catch (InvalidInterfaceException e) {
             logger.log(Level.WARNING, e.getMessage(), e);
             return false;

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java Fri Feb 19 23:38:00 2010
@@ -26,7 +26,6 @@
 import org.apache.tuscany.sca.core.scope.ScopeContainer;
 import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
-import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
@@ -70,7 +69,6 @@
         if (op == null) {
             op = this.operation;
         }
-        ConversationSequence sequence = op.getConversationSequence();
         Object payload = msg.getBody();
 
         Object contextId = null;
@@ -129,27 +127,6 @@
                 }
             } 
             
-            if (sequence != ConversationSequence.CONVERSATION_NONE ){
-                try {
-//                    // If the exception is not a business exception then end the conversation
-//                    boolean businessException = false;
-//                    
-//                    for (DataType dataType : operation.getFaultTypes()){
-//                        if ((dataType.getPhysical() == e.getCause().getClass()) &&
-//                            (contextId != null) ){
-//                            businessException = true;
-//                            break;
-//                        }
-//                    }
-                    
-                    if (!isChecked && contextId != null) {
-                        scopeContainer.remove(contextId);
-                    }
-                } catch (Exception ex){
-                    // TODO - sure what the best course of action is here. We have
-                    //        a system exception in the middle of a business exception 
-                }
-            }
             if (!isChecked) {
                 if (cause instanceof RuntimeException) {
                     throw (RuntimeException)cause;

Modified: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java Fri Feb 19 23:38:00 2010
@@ -29,7 +29,6 @@
 
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
@@ -47,8 +46,6 @@
  */
 public class WSDLInterfaceIntrospectorImpl {
     private static final QName POLICY_REQUIRES 			= new QName("http://docs.oasis-open.org/ns/opencsa/sca/200912", "requires");
-    private static final QName POLICY_CONVERSATIONAL 	= new QName("http://docs.oasis-open.org/ns/opencsa/sca/200912", "conversational");
-    public  static final QName POLICY_END_CONVERSATION 	= new QName("http://docs.oasis-open.org/ns/opencsa/sca/200912", "endsConversation");
     
     private static final QName CALLBACK_ATTRIBUTE 		= new QName("http://docs.oasis-open.org/ns/opencsa/sca/200912", "callback" );
     
@@ -68,9 +65,6 @@
         for (Object o : portType.getOperations()) {
             javax.wsdl.Operation wsdlOp = (javax.wsdl.Operation)o;
             Operation operation = getOperation(wsdlOp, wsdlDefinition, resolver, xsdFactory, monitor);
-            if(isEndConversation(wsdlOp)) {
-                operation.setConversationSequence(ConversationSequence.CONVERSATION_END);
-            }
             operations.add(operation);
         }
         return operations;
@@ -82,7 +76,6 @@
         wsdlInterface.setPortType(portType);
         wsdlInterface.setCallbackInterface(callback);
         wsdlInterface.getOperations().addAll(introspectOperations(portType, wsdlDefinition, resolver, monitor));
-        wsdlInterface.setConversational(isConversational(portType));
     }
 
     public static Operation getOperation(javax.wsdl.Operation wsdlOp,
@@ -126,62 +119,17 @@
             Vector<QName> policyAttributes = (Vector<QName>) o;
             
             Enumeration<QName> policyItents = policyAttributes.elements();
-            while(policyItents.hasMoreElements()) {
+            while (policyItents.hasMoreElements()) {
                 QName intentName = policyItents.nextElement();
-                
-                //ignores conversational, as it will have it's own
-                //attribute in the wsdl interface model
-                if(! intentName.equals(POLICY_CONVERSATIONAL)) {
-
-                    // Add each intent to the list
-                    Intent intent = policyFactory.createIntent();
-                    intent.setName(intentName);
-                    
-                    wsdlInterface.getRequiredIntents().add(intent);
-                }
-            }
-            
-        }
-    }
-    
-    private boolean isConversational(PortType portType) {
-        boolean conversational = false;
-        
-        Object o;
-        try {
-            o =  portType.getExtensionAttribute(POLICY_REQUIRES);
-        } catch (NoSuchMethodError e) {
-            // That method does not exist on older WSDL4J levels
-            o =null;
-        }
-        if(o != null && o instanceof Vector) {
-            Vector<QName> policyAttributes = (Vector<QName>) o;
-            
-            if(policyAttributes.contains(POLICY_CONVERSATIONAL)) {
-                return true;
-            }
-            
-        }
 
-        return conversational;
-    }
+                // Add each intent to the list
+                Intent intent = policyFactory.createIntent();
+                intent.setName(intentName);
 
-    private boolean isEndConversation(javax.wsdl.Operation operation) {
-        boolean endConversation = false;
-        
-        Object o;
-        try {
-            o =  operation.getExtensionAttribute(POLICY_END_CONVERSATION);
-        } catch (NoSuchMethodError e) {
-            // That method does not exist on older WSDL4J levels
-            o = null;
-        }
-        if(o != null && o instanceof String) {
-            endConversation = Boolean.valueOf((String)o);            
+                wsdlInterface.getRequiredIntents().add(intent);
+            }
+            
         }
-
-        return endConversation;
-        
     }
     
 }

Modified: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java Fri Feb 19 23:38:00 2010
@@ -36,7 +36,6 @@
 
 import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
@@ -220,7 +219,6 @@
             operationModel.setName(operation.getName());
             operationModel.setFaultTypes(getFaultTypes());
             operationModel.setNonBlocking(oneway);
-            operationModel.setConversationSequence(ConversationSequence.CONVERSATION_NONE);
             operationModel.setInputType(getInputType());
             operationModel.setOutputType(getOutputType());
 

Modified: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java Fri Feb 19 23:38:00 2010
@@ -373,7 +373,7 @@
         	if( wsdlCallbackInterface != null ) {
         		// If there is both a callback interface declared on the forward interface and also one declared on the
         		// interface.wsdl element, then the two interfaces must match [ASM80011]
-        		if( !interfaceContractMapper.isEqual(intrinsicWSDLCallbackInterface, wsdlCallbackInterface) ) {
+        		if( !interfaceContractMapper.isMutuallyCompatible(intrinsicWSDLCallbackInterface, wsdlCallbackInterface) ) {
                     Monitor.error(context.getMonitor(), WSDLInterfaceProcessor.class.getName(), 
                 			"interface-wsdlxml-validation-messages", "IncompatibleCallbacks", 
                 			intrinsicWSDLCallbackInterface.getName().toString(), 

Modified: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java Fri Feb 19 23:38:00 2010
@@ -26,9 +26,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
-import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
-import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
 import org.apache.tuscany.sca.interfacedef.wsdl.xml.AbstractWSDLTestCase;
@@ -67,7 +65,6 @@
     public final void testIntrospectPortType() throws InvalidInterfaceException {
         WSDLInterface contract = wsdlFactory.createWSDLInterface(portType, definition, resolver, context.getMonitor());
         Assert.assertEquals(contract.getName().getLocalPart(), "StockQuotePortType");
-        Assert.assertTrue(contract.isConversational());
         
         boolean foundIntent = false;
         
@@ -79,11 +76,5 @@
         
         Assert.assertTrue(foundIntent);
         
-        for(Operation operation : contract.getOperations()) {
-            if(operation.getName().equals("cancel")) {
-                Assert.assertEquals(operation.getConversationSequence(), ConversationSequence.CONVERSATION_END);
-            }
-        }
-        
     }
 }

Modified: tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java?rev=912034&r1=912033&r2=912034&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java Fri Feb 19 23:38:00 2010
@@ -254,16 +254,19 @@
         if (rsaEvent.getExportReference() != null) {
             ep = rsaEvent.getExportReference().getExportedEndpoint();
         }
-        props.put("endpoint.service.id", ep.getServiceId());
-        props.put("endpoint.framework.uuid", ep.getFrameworkUUID());
-        props.put("endpoint.id", ep.getId());
-        props.put("objectClass", ep.getInterfaces());
-        props.put("service.imported.configs", ep.getConfigurationTypes());
-        props.put("timestamp", Long.valueOf(System.currentTimeMillis()));
-        Object bindings = ep.getProperties().get("org.osgi.sca.bindings");
-        if (bindings != null) {
-            props.put("org.osgi.sca.bindings", bindings);
+        
+        if (ep != null) {
+            props.put("endpoint.service.id", ep.getServiceId());
+            props.put("endpoint.framework.uuid", ep.getFrameworkUUID());
+            props.put("endpoint.id", ep.getId());
+            props.put("objectClass", ep.getInterfaces());
+            props.put("service.imported.configs", ep.getConfigurationTypes());
+            Object bindings = ep.getProperties().get("org.osgi.sca.bindings");
+            if (bindings != null) {
+                props.put("org.osgi.sca.bindings", bindings);
+            }
         }
+        props.put("timestamp", Long.valueOf(System.currentTimeMillis()));
         props.put("event", rsaEvent);
         return new Event(topic, props);
     }