diff options
Diffstat (limited to 'java/sca/modules/interface-wsdl')
3 files changed, 27 insertions, 7 deletions
diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLObject.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLObject.java index 9253f58702..0b707163da 100644 --- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLObject.java +++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLObject.java @@ -19,14 +19,15 @@ package org.apache.tuscany.sca.interfacedef.wsdl; +import java.io.Serializable; + import javax.wsdl.Definition; -import javax.wsdl.WSDLElement; /** * Model for objects in a WSDL definition * @version $Rev$ $Date$ */ -public interface WSDLObject<T extends WSDLElement> { +public interface WSDLObject<T extends Serializable> { /** * Get the owning definition where the element is declared * @return The owning definition diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java index 5b0d95ac46..18fce72f90 100644 --- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java +++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java @@ -85,7 +85,13 @@ public class WSDLInterfaceIntrospectorImpl { } private void processIntents(WSDLInterface wsdlInterface, PortType portType) { - Object o = portType.getExtensionAttribute(POLICY_REQUIRES); + 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; @@ -113,7 +119,13 @@ public class WSDLInterfaceIntrospectorImpl { private boolean isConversational(PortType portType) { boolean conversational = false; - Object o = portType.getExtensionAttribute(POLICY_REQUIRES); + 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; @@ -129,7 +141,13 @@ public class WSDLInterfaceIntrospectorImpl { private boolean isEndConversation(javax.wsdl.Operation operation) { boolean endConversation = false; - Object o = operation.getExtensionAttribute(POLICY_END_CONVERSATION); + 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); } diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLObjectImpl.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLObjectImpl.java index b41d79c3ba..f18eaef27b 100644 --- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLObjectImpl.java +++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLObjectImpl.java @@ -19,15 +19,16 @@ package org.apache.tuscany.sca.interfacedef.wsdl.impl; +import java.io.Serializable; + import javax.wsdl.Definition; -import javax.wsdl.WSDLElement; import org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject; /** * @version $Rev$ $Date$ */ -public class WSDLObjectImpl<T extends WSDLElement> implements WSDLObject<T> { +public class WSDLObjectImpl<T extends Serializable> implements WSDLObject<T> { private Definition definition; private T element; |