summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java8
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLObject.java5
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java24
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLObjectImpl.java5
4 files changed, 33 insertions, 9 deletions
diff --git a/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java b/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
index 0004774afa..9c23458743 100644
--- a/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
+++ b/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
@@ -128,8 +128,12 @@ public class WSDLModelResolver implements ModelResolver {
wsdlExtensionRegistry.registerDeserializer(Types.class, schema, deserializer);
}
// ---- Policy WSDL Extensions
- wsdlExtensionRegistry.registerExtensionAttributeType(PortType.class, Q_POLICY_ATTRIBUTE_EXTENSION, AttributeExtensible.LIST_OF_QNAMES_TYPE);
- wsdlExtensionRegistry.registerExtensionAttributeType(Operation.class, Q_POLICY_END_CONVERSATION_ATTRIBUTE_EXTENSION, AttributeExtensible.STRING_TYPE);
+ try {
+ wsdlExtensionRegistry.registerExtensionAttributeType(PortType.class, Q_POLICY_ATTRIBUTE_EXTENSION, AttributeExtensible.LIST_OF_QNAMES_TYPE);
+ wsdlExtensionRegistry.registerExtensionAttributeType(Operation.class, Q_POLICY_END_CONVERSATION_ATTRIBUTE_EXTENSION, AttributeExtensible.STRING_TYPE);
+ } catch (NoSuchMethodError e) {
+ // That method does not exist on older WSDL4J levels
+ }
// ---- BPEL additions
serializer = new BPELExtensionHandler();
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;