diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca')
3 files changed, 7 insertions, 61 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java index 76d42f2f44..dd19407abe 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java @@ -29,7 +29,6 @@ import javax.xml.namespace.QName; 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 @@ import org.apache.tuscany.sca.xsd.XSDFactory; */ 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 @@ public class WSDLInterfaceIntrospectorImpl { 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 @@ public class WSDLInterfaceIntrospectorImpl { 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 @@ public class WSDLInterfaceIntrospectorImpl { 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; + // Add each intent to the list + Intent intent = policyFactory.createIntent(); + intent.setName(intentName); + + wsdlInterface.getRequiredIntents().add(intent); } } - - return conversational; - } - - 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); - } - - return endConversation; - } } diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java index a223b5cbd7..3fd476c46f 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java @@ -36,7 +36,6 @@ import javax.xml.namespace.QName; 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 @@ public class WSDLOperationIntrospectorImpl { operationModel.setName(operation.getName()); operationModel.setFaultTypes(getFaultTypes()); operationModel.setNonBlocking(oneway); - operationModel.setConversationSequence(ConversationSequence.CONVERSATION_NONE); operationModel.setInputType(getInputType()); operationModel.setOutputType(getOutputType()); diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java index b9f724c82a..a04b3136d7 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java @@ -373,7 +373,7 @@ public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfa 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(), |