summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/interface-wsdl-xml/src
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-01 20:40:23 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-01 20:40:23 +0000
commit3eed74bfd74934ffd8c859b69b1a64d1cc073ccc (patch)
tree5918abc2035e2e00c2fb56973cc255fff0de5663 /java/sca/modules/interface-wsdl-xml/src
parentf1dc976167fcaf5f51909db1adadca98c0612f9c (diff)
Enable interface-wsdl to work with older WSDL4J implementations like wsdl4j 1.4 (as well as the latest wsdl4j 1.6.x). That's what's included in some application servers like WebSphere 6.1 for example, and 1.4 doesn't have WSDLElement or extension attributes.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@691052 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/interface-wsdl-xml/src')
-rw-r--r--java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java8
1 files changed, 6 insertions, 2 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();