You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/17 21:36:45 UTC

[14/28] incubator-taverna-common-activities git commit: Temporarily empty repository

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
deleted file mode 100644
index 0b7644f..0000000
--- a/taverna-wsdl-generic/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.taverna.commonactivities</groupId>
-		<artifactId>taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
-	</parent>
-	<artifactId>taverna-wsdl-generic</artifactId>
-	<packaging>bundle</packaging>
-	<name>Apache Taverna WSDL-generic Library</name>
-	<description>
-        Generic WSDL SOAP handling (parsing, calling)
-    </description>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<version>2.3.7</version>
-				<extensions>true</extensions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-plugin</artifactId>
-				<configuration>
-					<excludes>
-						<exclude>**/integration/**</exclude>
-					</excludes>
-				</configuration>
-				<executions>
-					<execution>
-						<id>integration-test</id>
-						<goals>
-							<goal>test</goal>
-						</goals>
-						<phase>integration-test</phase>
-						<configuration>
-							<excludes>
-								<exclude>none</exclude>
-							</excludes>
-							<includes>
-								<include>**/integration/**</include>
-							</includes>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.axis</groupId>
-			<artifactId>com.springsource.org.apache.axis</artifactId>
-			<version>${axis.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-			<version>${log4j.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.jdom</groupId>
-			<artifactId>com.springsource.org.jdom</artifactId>
-			<version>${jdom.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>javax.activation</groupId>
-			<artifactId>com.springsource.javax.activation</artifactId>
-			<version>${activation.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>javax.wsdl</groupId>
-			<artifactId>com.springsource.javax.wsdl</artifactId>
-			<version>${javax.wsdl.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>javax.xml.rpc</groupId>
-			<artifactId>com.springsource.javax.xml.rpc</artifactId>
-			<version>${xml.rpc.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ArrayTypeDescriptor.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ArrayTypeDescriptor.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ArrayTypeDescriptor.java
deleted file mode 100644
index f94d5b8..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ArrayTypeDescriptor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-
-/**
- * A TypeDescriptor that specifically describes an array type
- * 
- */
-public class ArrayTypeDescriptor extends TypeDescriptor {
-	private TypeDescriptor elementType;
-	private boolean wrapped;
-	
-	public boolean isWrapped() {
-		return wrapped;		
-	}
-
-	public void setWrapped(boolean wrapped) {
-		this.wrapped = wrapped;
-	}
-
-	public TypeDescriptor getElementType() {
-		return elementType;
-	}
-
-	public void setElementType(TypeDescriptor elementType) {
-		this.elementType = elementType;
-	}
-
-	@Override
-	public String getName() {
-		String name = super.getName();
-		if (name == null) {
-			return "ArrayOf" + getElementType().getType();
-		}
-		return name;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/AttributeTypeDescriptor.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/AttributeTypeDescriptor.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/AttributeTypeDescriptor.java
deleted file mode 100644
index a8d0c37..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/AttributeTypeDescriptor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-/**
- * A TypeDescriptor specifically for attributes.
- * 
- * @author David Withers
- */
-public class AttributeTypeDescriptor extends TypeDescriptor {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/BaseTypeDescriptor.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/BaseTypeDescriptor.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/BaseTypeDescriptor.java
deleted file mode 100644
index d911c43..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/BaseTypeDescriptor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-
-/**
- * A TypeDescriptor specifically for basic types (e.g. string, float, int,
- * base64binary)
- * 
- */
-public class BaseTypeDescriptor extends TypeDescriptor {
-
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ComplexTypeDescriptor.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ComplexTypeDescriptor.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ComplexTypeDescriptor.java
deleted file mode 100644
index 766c913..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ComplexTypeDescriptor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A TypeDescriptor that specifically describes a complex type
- * 
- */
-public class ComplexTypeDescriptor extends TypeDescriptor {
-	private List<TypeDescriptor> elements = new ArrayList<TypeDescriptor>();
-	private List<TypeDescriptor> attributes = new ArrayList<TypeDescriptor>();
-
-	public List<TypeDescriptor> getElements() {
-		return elements;
-	}
-
-	public void setElements(List<TypeDescriptor> elements) {
-		this.elements = elements;
-	}
-	
-	public TypeDescriptor elementForName(String name) {
-		TypeDescriptor result=null;
-		for (TypeDescriptor desc : getElements()) {
-			if (desc.getName().equals(name)) {
-				result=desc;
-				break;
-			}
-		}
-		return result;
-	}
-
-	public List<TypeDescriptor> getAttributes() {
-		return attributes;
-	}
-
-	public void setAttributes(List<TypeDescriptor> attributes) {
-		this.attributes = attributes;
-	}
-
-	public TypeDescriptor attributeForName(String name) {
-		TypeDescriptor result=null;
-		for (TypeDescriptor desc : getAttributes()) {
-			if (desc.getName().equals(name)) {
-				result=desc;
-				break;
-			}
-		}
-		return result;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/TypeDescriptor.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/TypeDescriptor.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/TypeDescriptor.java
deleted file mode 100644
index 69344f8..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/TypeDescriptor.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * Base class for all descriptors for type
- * 
- */
-public class TypeDescriptor {
-	private String name;
-
-	private String type;
-
-	private boolean optional;
-
-	private boolean unbounded;
-
-	private QName qname;
-
-	private boolean nillable = false;
-	
-	private String documentation;
-
-	public boolean isNillable() {
-		return nillable;
-	}
-
-	public QName getQname() {
-		if (qname != null)
-			return qname;
-		else {
-			return new QName("", type);
-		}
-	}
-
-	public void setQnameFromString(String qname) {
-		String[] split = qname.split("}");
-		if (split.length == 1) {
-			this.qname = new QName("", qname);
-		} else {
-			String uri = split[0];
-			uri = uri.replaceAll("\\{", "");
-			uri = uri.replaceAll("\\}", "");
-			this.qname = new QName(uri, split[1]);
-		}
-	}
-
-	public String getMimeType() {
-		return translateJavaType(determineClassType(this));
-	}
-	
-	public void setQname(QName qname) {
-		this.qname = qname;
-	}
-
-	public String getNamespaceURI() {
-		return getQname().getNamespaceURI();
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		int i;
-		if ((i = name.lastIndexOf('>')) != -1) {
-			this.name = name.substring(i + 1);
-		} else {
-			this.name = name;
-		}
-	}
-	
-	/**
-     * @return the depth determined from the syntactic mime type of the original
-     *         port. i.e text/plain = 0, l('text/plain') = 1, l(l('text/plain')) =
-     *         2, ... etc.
-     */
-    public int getDepth() {
-    	String syntacticType=getMimeType();
-        if (syntacticType == null) {
-                return 0;
-        } else {
-                return syntacticType.split("l\\(").length - 1;
-        }
-    }
-
-	public boolean isOptional() {
-		return optional;
-	}
-
-	public void setOptional(boolean optional) {
-		this.optional = optional;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public boolean isUnbounded() {
-		return unbounded;
-	}
-
-	public void setUnbounded(boolean unbounded) {
-		this.unbounded = unbounded;
-	}
-
-	@Override
-	public String toString() {
-		return name + ":" + type;
-	}
-
-	/**
-	 * Translate a java type into a taverna type string
-	 */
-	public static String translateJavaType(Class<?> type) {
-		if (type.equals(String[].class)) {
-			return "l('text/plain')";
-		} else if (type.equals(org.w3c.dom.Element.class)) {
-			return "'text/xml'";
-		}
-
-		else if (type.equals(org.w3c.dom.Element[].class)) {
-			return "l('text/xml')";
-		} else if (type.equals(byte[].class)) {
-			return "'application/octet-stream'";
-		} else {
-			return "'text/plain'";
-		}
-	}
-
-	public static void retrieveSignature(List<TypeDescriptor> params, String[] names,
-			Class<?>[] types) {
-		for (int i = 0; i < names.length; i++) {
-			TypeDescriptor descriptor = params.get(i);
-			names[i] = descriptor.getName();
-			
-			types[i]=determineClassType(descriptor);
-		}
-	}
-
-	private static Class<?> determineClassType(TypeDescriptor descriptor) {
-		String s = descriptor.getType().toLowerCase();
-		Class<?> type;
-		if (descriptor instanceof ArrayTypeDescriptor) {
-			if (((ArrayTypeDescriptor) descriptor).getElementType() instanceof BaseTypeDescriptor) {
-				type = String[].class;
-			} else if (((ArrayTypeDescriptor) descriptor).isUnbounded()) {
-				type = org.w3c.dom.Element[].class;
-			}
-			else {
-				type = org.w3c.dom.Element.class;
-			}
-		} else {
-			if ("string".equals(s)) {
-				type = String.class;
-			} else if ("double".equals(s) || "decimal".equals(s)) {
-				type = Double.TYPE;
-			} else if ("float".equals(s)) {
-				type = Float.TYPE;
-			} else if ("int".equals(s) || "integer".equals(s)) {
-				type = Integer.TYPE;
-			} else if ("boolean".equals(s)) {
-				type = Boolean.TYPE;
-			} else if ("base64binary".equals(s)) {
-				type = byte[].class;
-			} else {
-				//treat any other basetype as a String.
-				if (descriptor instanceof BaseTypeDescriptor) {
-					type=String.class;
-				}
-				else {
-					type = org.w3c.dom.Element.class;
-				}
-			}
-		}
-		return type;
-	}
-
-	/**
-	 * Determines whether the descriptor describes a data structure that is
-	 * cyclic, i.e. contains inner elements that contain references to outer
-	 * elements, leading to a state of infinate recursion.
-	 * 
-	 * @param descriptor
-	 * @return
-	 */
-	public static boolean isCyclic(TypeDescriptor descriptor) {
-		boolean result = false;
-		if (!(descriptor instanceof BaseTypeDescriptor)) {
-			if (descriptor instanceof ComplexTypeDescriptor) {
-				result = testForCyclic((ComplexTypeDescriptor) descriptor,
-						new ArrayList<String>());
-			} else {
-				result = testForCyclic((ArrayTypeDescriptor) descriptor,
-						new ArrayList<String>());
-			}
-		}
-		return result;
-	}
-
-	@SuppressWarnings("unchecked")
-	private static boolean testForCyclic(ComplexTypeDescriptor descriptor,
-			List<String> parents) {
-		boolean result = false;
-		String descKey = descriptor.getQname().toString();
-		if (parents.contains(descKey))
-			result = true;
-		else {
-			parents.add(descKey);
-			List elements = descriptor.getElements();
-			for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
-				TypeDescriptor elementDescriptor = (TypeDescriptor) iterator
-						.next();
-				if (elementDescriptor instanceof ComplexTypeDescriptor) {
-					result = testForCyclic(
-							(ComplexTypeDescriptor) elementDescriptor, parents);
-				} else if (elementDescriptor instanceof ArrayTypeDescriptor) {
-					result = testForCyclic(
-							(ArrayTypeDescriptor) elementDescriptor, parents);
-				}
-
-				if (result)
-					break;
-			}
-
-			parents.remove(descKey);
-		}
-		return result;
-	}
-
-	private static boolean testForCyclic(ArrayTypeDescriptor descriptor,
-			List<String> parents) {
-		boolean result = false;
-		String descKey = descriptor.getQname().toString();
-		if (parents.contains(descKey))
-			result = true;
-		else {
-			parents.add(descKey);
-
-			TypeDescriptor elementDescriptor = descriptor
-					.getElementType();
-			if (elementDescriptor instanceof ComplexTypeDescriptor) {
-				result = testForCyclic(
-						(ComplexTypeDescriptor) elementDescriptor, parents);
-			} else if (elementDescriptor instanceof ArrayTypeDescriptor) {
-				result = testForCyclic((ArrayTypeDescriptor) elementDescriptor,
-						parents);
-			}
-
-			parents.remove(descKey);
-		}
-		return result;
-	}
-
-	public void setNillable(boolean nillable) {
-		this.nillable  = nillable;
-		
-		
-	}
-
-	public String getDocumentation() {
-		return documentation;
-	}
-
-	public void setDocumentation(String documentation) {
-		this.documentation = documentation;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/UnknownOperationException.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/UnknownOperationException.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/UnknownOperationException.java
deleted file mode 100644
index 049a7a1..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/UnknownOperationException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-/**
- * Exception thrown when a given service operation name cannot be found for that
- * WSDL
- * 
- * @author Stuart Owen
- * 
- */
-
-public class UnknownOperationException extends Exception {
-	private static final long serialVersionUID = -9119188266154359132L;
-
-	UnknownOperationException(String val) {
-		super(val);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java
deleted file mode 100644
index b5b028c..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java
+++ /dev/null
@@ -1,936 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.parser;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.Operation;
-import javax.wsdl.Part;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.WSDLException;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.extensions.soap.SOAPBinding;
-import javax.wsdl.extensions.soap.SOAPBody;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.axis.wsdl.gen.NoopFactory;
-import org.apache.axis.wsdl.symbolTable.BindingEntry;
-import org.apache.axis.wsdl.symbolTable.CollectionElement;
-import org.apache.axis.wsdl.symbolTable.CollectionType;
-import org.apache.axis.wsdl.symbolTable.ContainedAttribute;
-import org.apache.axis.wsdl.symbolTable.DefinedElement;
-import org.apache.axis.wsdl.symbolTable.DefinedType;
-import org.apache.axis.wsdl.symbolTable.ElementDecl;
-import org.apache.axis.wsdl.symbolTable.Parameter;
-import org.apache.axis.wsdl.symbolTable.Parameters;
-import org.apache.axis.wsdl.symbolTable.SymbolTable;
-import org.apache.axis.wsdl.symbolTable.TypeEntry;
-import org.apache.log4j.Logger; //import org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis;
-//import org.apache.wsif.util.WSIFPluggableProviders;
-import org.xml.sax.SAXException;
-
-import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
-import com.ibm.wsdl.extensions.soap.SOAPOperationImpl;
-import org.apache.axis.wsdl.symbolTable.SchemaUtils;
-
-/**
- * A Parser for processing WSDL files to determine information about available
- * services and the required types needed to invoke that particular service.
- * Handles Complex Types and wsdl imports.
- * 
- * @author Stuart Owen
- * @author Stian Soiland-Reyes
- * @author Asger Askov-Bleking
- * 
- */
-
-@SuppressWarnings("unchecked")
-public class WSDLParser {
-
-	private static final String GET_SERVICE_SECURITY_METADATA_REQUEST = "GetServiceSecurityMetadataRequest";
-
-	private static final String GET_SERVICE_SECURITY_METADATA = "getServiceSecurityMetadata";
-
-	private static final String SET_TERMINATION_TIME = "SetTerminationTime";
-
-	private static final String GET_RESOURCE_PROPERTY = "GetResourceProperty";
-
-	private static final String DESTROY = "Destroy";
-
-	private static final String SERVICE_SECURITY_URI = "http://security.introduce.cagrid.nci.nih.gov/ServiceSecurity/";
-
-	private static final String RESOURCE_LIFETIME_URI = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/";
-
-	private static final String RESOURCE_PROPERTIES_URI = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/";
-
-	private static Logger logger = Logger.getLogger(WSDLParser.class);
-
-	private String wsdlLocation;
-
-	/**
-	 * Cache for SymbolTable to remove the need for reprocessing each time.
-	 */
-	private static Map<String, SymbolTable> symbolTableMap = Collections
-			.synchronizedMap(new HashMap<String, SymbolTable>());
-
-	/**
-	 * Cache for operations, to remove the need for reprocessing each time.
-	 */
-	private static Map<String, List<Operation>> operationMap = Collections
-			.synchronizedMap(new HashMap<String, List<Operation>>());
-
-	private static Map<String, Map<String, Binding>> bindingMap = Collections
-			.synchronizedMap(new HashMap<String, Map<String, Binding>>());
-
-	private static Map<String, String> styleMap = Collections
-			.synchronizedMap(new HashMap<String, String>());
-
-	private static Map<String, Map<String, PortType>> portTypeMap = Collections
-			.synchronizedMap(new HashMap<String, Map<String, PortType>>());
-
-	private Map<String, ComplexTypeDescriptor> cachedComplexTypes = Collections
-			.synchronizedMap(new HashMap<String, ComplexTypeDescriptor>());
-
-	private Map<String, BindingOperation> bindingOperations = Collections
-			.synchronizedMap(new HashMap<String, BindingOperation>());
-
-	private boolean isWsrfService;
-
-	public boolean isWsrfService() {
-		return isWsrfService;
-	}
-
-	/**
-	 * Constructor which takes the location of the base wsdl file, and begins to
-	 * process it
-	 * 
-	 * @param wsdlLocation
-	 *            - the location of the wsdl file
-	 * @throws ParserConfigurationException
-	 * @throws WSDLException
-	 * @throws IOException
-	 * @throws SAXException
-	 */
-	public WSDLParser(String wsdlLocation) throws ParserConfigurationException,
-			WSDLException, IOException, SAXException {
-
-		this.wsdlLocation = wsdlLocation;
-
-		// WSIFPluggableProviders.overrideDefaultProvider(
-		// "http://schemas.xmlsoap.org/wsdl/soap/",
-		// new WSIFDynamicProvider_ApacheAxis());
-
-		if (!symbolTableMap.containsKey(wsdlLocation)) {
-			SymbolTable symbolTable = new SymbolTable(new NoopFactory()
-					.getBaseTypeMapping(), true, false, false);
-
-			// Avoid printouts like
-			// {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl}GetMultipleResourcePropertiesResponse
-			// already exists
-			symbolTable.setQuiet(true);
-
-			symbolTable.populate(wsdlLocation);
-			symbolTableMap.put(wsdlLocation, symbolTable);
-			operationMap.put(wsdlLocation, determineOperations());
-		}
-		checkWSRF();
-	}
-
-	/**
-	 * flushes all the caches of entries associated with provided wsdl location
-	 * 
-	 * @param wsdlLocation
-	 */
-	public synchronized static void flushCache(String wsdlLocation) {
-		operationMap.remove(wsdlLocation);
-		bindingMap.remove(wsdlLocation);
-		styleMap.remove(wsdlLocation);
-		portTypeMap.remove(wsdlLocation);
-		symbolTableMap.remove(wsdlLocation);
-	}
-
-	/**
-	 * @return a list of WSDLOperations for all operations for this service,
-	 */
-	public List<Operation> getOperations() {
-		return operationMap.get(getWSDLLocation());
-	}
-
-	/**
-	 * @return the wsdl location for which this parser was constructed
-	 */
-	public String getWSDLLocation() {
-		return wsdlLocation;
-	}
-
-	/**
-	 * @return the Definition for this service
-	 */
-	public Definition getDefinition() {
-		return getSymbolTable().getDefinition();
-	}
-
-	public List<String> getOperationEndpointLocations(String operationName) {
-		List<String> result = new ArrayList<String>();
-		Collection<Service> services = getDefinition().getServices().values();
-		Binding binding = getBinding(operationName);
-		for (Service service : services) {
-			Collection<Port> ports = service.getPorts().values();
-			for (Port port : ports) {
-				if (port.getBinding().equals(binding)) {
-					for (Object obj : port.getExtensibilityElements()) {
-						if (obj instanceof SOAPAddress) {
-							SOAPAddress address = (SOAPAddress) obj;
-							String endpoint = address.getLocationURI();
-							result.add(endpoint);
-						}
-					}
-				}
-			}
-		}
-		return result;
-	}
-
-	private Binding getBinding(String operationName) {
-		Binding result = null;
-		Map<String, Binding> bindingToOpMap = bindingMap.get(getWSDLLocation());
-		if (bindingToOpMap != null) {
-			result = bindingToOpMap.get(operationName);
-		}
-		return result;
-	}
-
-	/**
-	 * 
-	 * @return the style, i.e. document or rpc
-	 */
-	public String getStyle() {
-		return styleMap.get(getWSDLLocation());
-	}
-
-	/**
-	 * Provides the PortType for a given operation.
-	 * 
-	 * @param operationName
-	 *            the name of the operation the PortType is required for.
-	 * @return the PortType
-	 */
-	public PortType getPortType(String operationName) {
-		PortType result = null;
-		Map<String, PortType> portToOpMap = portTypeMap.get(getWSDLLocation());
-		if (portToOpMap != null) {
-			result = portToOpMap.get(operationName);
-		}
-		return result;
-	}
-
-	/**
-	 * Returns a List of the TypeDescriptors representing the parameters for the
-	 * inputs to the service
-	 * 
-	 * @param operationName
-	 * @return List of TypeDescriptor
-	 * @throws UnknownOperationException
-	 *             if no operation matches the name
-	 * @throws IOException
-	 * 
-	 */
-	public List<TypeDescriptor> getOperationInputParameters(String operationName)
-			throws UnknownOperationException, IOException {
-		Operation operation = getOperation(operationName);
-		List<TypeDescriptor> result = new ArrayList<TypeDescriptor>();
-		if (operation == null) {
-			throw new UnknownOperationException("operation called "
-					+ operationName + " does not exist for this wsdl");
-		}
-
-		Parameters parameters = getSymbolTable().getOperationParameters(
-				operation, "", new BindingEntry(getBinding(operationName)));
-
-		for (Iterator iterator = parameters.list.iterator(); iterator.hasNext();) {
-			Parameter param = (Parameter) iterator.next();
-			if (param.getMode() == Parameter.IN) {
-				TypeDescriptor typeDescriptor = processParameter(param);
-				if (typeDescriptor instanceof ComplexTypeDescriptor
-						&& getStyle().equals("document")) {
-					// for document based, if operation requires no parameters
-					// the param still exists (representing the operation) but
-					// with empty inner elements
-					if (((ComplexTypeDescriptor) typeDescriptor).getElements()
-							.size() > 0) {
-						result.add(typeDescriptor);
-					}
-				} else {
-					result.add(typeDescriptor);
-				}
-			} else if (param.getMode() == Parameter.INOUT) {
-				result.add(processParameter(param));
-			}
-
-		}
-
-		cachedComplexTypes.clear();
-		return result;
-	}
-
-	/**
-	 * Returns a List of the TypeDescriptors representing the parameters for the
-	 * outputs of the service
-	 * 
-	 * @param operationName
-	 * @return List of TypeDescriptor
-	 * @throws UnknownOperationException
-	 *             if no operation matches the name
-	 * @throws IOException
-	 */
-	public List<TypeDescriptor> getOperationOutputParameters(
-			String operationName) throws UnknownOperationException, IOException {
-		Operation operation = getOperation(operationName);
-		List<TypeDescriptor> result = new ArrayList<TypeDescriptor>();
-		if (operation == null) {
-			throw new UnknownOperationException("operation called "
-					+ operationName + " does not exist for this wsdl");
-		}
-
-		Parameters parameters = getSymbolTable().getOperationParameters(
-				operation, "", new BindingEntry(getBinding(operationName)));
-
-		for (Iterator iterator = parameters.list.iterator(); iterator.hasNext();) {
-			Parameter param = (Parameter) iterator.next();
-			if (param.getMode() == Parameter.OUT)
-				result.add(processParameter(param));
-			else if (param.getMode() == Parameter.INOUT) {
-				result.add(processParameter(param));
-			}
-
-		}
-		if (parameters.returnParam != null) {
-			result.add(processParameter(parameters.returnParam));
-		}
-
-		cachedComplexTypes.clear();
-		return result;
-	}
-
-	/**
-	 * returns the namespace uri for the given operation name, throws
-	 * UnknownOperationException if the operationName is not matched to one
-	 * described by the WSDL.
-	 * <p>
-	 * Note that if you need the namespace for constructing the fully qualified
-	 * element name of the operation, you might want to use
-	 * {@link #getOperationQname(String)} instead.
-	 * 
-	 * @see #getOperationQname(String)
-	 * @param operationName
-	 * @return
-	 * @throws UnknownOperationException
-	 */
-	public String getOperationNamespaceURI(String operationName)
-			throws UnknownOperationException {
-
-		String result = null;
-		if (getStyle().equals("document")) {
-			try {
-				// this lovely line of code gets the correct namespace ....
-				result = ((Part) getBindingOperation(operationName)
-						.getOperation().getInput().getMessage()
-						.getOrderedParts(null).get(0)).getElementName()
-						.getNamespaceURI();
-			} catch (Exception e) {
-				// .... but this gets a good approximation if the above fails
-				result = getDefinition().getTargetNamespace();
-			}
-		} else {
-			BindingOperation binding = getBindingOperation(operationName);
-			List extElements = binding.getBindingInput()
-					.getExtensibilityElements();
-			if (extElements != null && extElements.size() > 0) {
-				SOAPBody body = (SOAPBody) extElements.get(0);
-				result = body.getNamespaceURI();
-			} else {
-				extElements = binding.getBindingOutput()
-						.getExtensibilityElements();
-				if (extElements != null && extElements.size() > 0) {
-					SOAPBody body = (SOAPBody) extElements.get(0);
-					result = body.getNamespaceURI();
-				}
-			}
-
-			if (result == null) {
-				// as a fall back, this almost always gives the right namespace
-				result = getDefinition().getTargetNamespace();
-			}
-		}
-
-		return result;
-	}
-
-	public QName getOperationQname(String operationName)
-			throws UnknownOperationException {
-		if (getStyle().equals("document")) {
-			try {
-				// Get the QName of the first element of the input message
-				return ((Part) getBindingOperation(operationName)
-						.getOperation().getInput().getMessage()
-						.getOrderedParts(null).get(0)).getElementName();
-			} catch (RuntimeException e) {
-				logger.warn("Could not find qname of message for operation "
-						+ operationName, e);
-				String ns = getDefinition().getTargetNamespace();
-				return new QName(ns, operationName);
-			}
-		} else {
-			String ns = getOperationNamespaceURI(operationName);
-			return new QName(ns, operationName);
-		}
-	}
-
-	/**
-	 * Returns either literal or encoded, describing the 'use' for this
-	 * operation
-	 * 
-	 * @param operationName
-	 * @return
-	 * @throws UnknownOperationException
-	 */
-	public String getUse(String operationName) throws UnknownOperationException {
-		String result = null;
-
-		BindingOperation binding = getBindingOperation(operationName);
-		List extElements = binding.getBindingInput().getExtensibilityElements();
-		if (extElements != null && extElements.size() > 0) {
-			SOAPBody body = (SOAPBody) extElements.get(0);
-			result = body.getUse();
-		} else {
-			extElements = binding.getBindingOutput().getExtensibilityElements();
-			if (extElements != null && extElements.size() > 0) {
-				SOAPBody body = (SOAPBody) extElements.get(0);
-				result = body.getUse();
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * Returns the actionURI for the given operation
-	 * 
-	 * @param operationName
-	 * @return
-	 * @throws UnknownOperationException
-	 */
-	public String getSOAPActionURI(String operationName)
-			throws UnknownOperationException {
-		String result = null;
-		BindingOperation op = getBindingOperation(operationName);
-		List elements = op.getExtensibilityElements();
-		for (Iterator elIterator = elements.iterator(); elIterator.hasNext();) {
-			SOAPOperationImpl extension = (SOAPOperationImpl) elIterator.next();
-			result = extension.getSoapActionURI();
-			break;
-		}
-		return result;
-	}
-
-	/**
-	 * Provides the documentation for the given operation name, or returns an
-	 * empty string if no documentation is provided by the WSDL.
-	 * 
-	 * @param operationName
-	 * @return
-	 * @throws UnknownOperationException
-	 */
-	public String getOperationDocumentation(String operationName)
-			throws UnknownOperationException {
-		String result = "";
-
-		Operation operation = getOperation(operationName);
-		if (operation.getDocumentationElement() != null) {
-			if (operation.getDocumentationElement().getFirstChild() != null) {
-				result = operation.getDocumentationElement().getFirstChild()
-						.getNodeValue();
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * Returns a WSDLOperation descriptor for an operation that matches the
-	 * operationName.
-	 * 
-	 * @param operationName
-	 * @return a matching WSDLOperation descriptor
-	 * @throws UnknownOperationException
-	 *             if no operation matches the name
-	 */
-	public Operation getOperation(String operationName)
-			throws UnknownOperationException {
-		Operation result = null;
-
-		for (Iterator iterator = getOperations().iterator(); iterator.hasNext();) {
-			Operation op = (Operation) iterator.next();
-			if (op.getName().equals(operationName)) {
-				result = op;
-				break;
-			}
-		}
-		if (result == null)
-			throw new UnknownOperationException("No operation named: "
-					+ operationName + " exists");
-		return result;
-	}
-
-	/**
-	 * SOAP actions/operations that if present indicates a WSRF service.
-	 * <p>
-	 * Used by {@link #checkWSRF()}
-	 * 
-	 * @return A {@link Map} mapping SOAP operation name to SOAP action URI.
-	 */
-	protected Map<String, String> getWSRFPredictorOperations() {
-		Map<String, String> operations = new HashMap<String, String>();
-
-		operations.put(GET_RESOURCE_PROPERTY, RESOURCE_PROPERTIES_URI
-				+ GET_RESOURCE_PROPERTY);
-		
-		operations.put(DESTROY, RESOURCE_LIFETIME_URI + DESTROY);
-		
-		operations.put(SET_TERMINATION_TIME, RESOURCE_LIFETIME_URI
-				+ SET_TERMINATION_TIME);
-		
-		operations.put(GET_SERVICE_SECURITY_METADATA, SERVICE_SECURITY_URI
-				+ GET_SERVICE_SECURITY_METADATA_REQUEST);
-
-		return operations;
-	}
-
-	/**
-	 * Check if this is a WSRF-resource property supporting binding.
-	 * <p>
-	 * The service is determined to be WSRF-supporting if the WSDL contains at
-	 * least one of the operations specified by
-	 * {@link #getWSRFPredictorOperations()}.
-	 * 
-	 */
-	protected void checkWSRF() {
-		isWsrfService = false;
-		for (Entry<String, String> resourceEntry : getWSRFPredictorOperations()
-				.entrySet()) {
-			String actionURI;
-			try {
-				actionURI = getSOAPActionURI(resourceEntry.getKey());
-			} catch (UnknownOperationException e) {
-				continue;
-			}
-			isWsrfService = resourceEntry.getValue().equals(actionURI);
-			if (isWsrfService) {
-				// Just need to match one of the predictors
-				break;
-			}
-		}
-	}
-
-	private SymbolTable getSymbolTable() {
-		return symbolTableMap.get(getWSDLLocation());
-	}
-
-	private List<Operation> determineOperations() {
-		List<Operation> result = new ArrayList<Operation>();
-
-		Map<String, PortType> portToOperationMap = portTypeToOperationMap();
-		Map<String, Binding> bindingToOperationMap = bindingToOperationMap();
-
-		Map bindings = getSymbolTable().getDefinition().getBindings();
-		for (Iterator iterator = bindings.values().iterator(); iterator
-				.hasNext();) {
-			Binding binding = (Binding) iterator.next();
-			List extensibilityElementList = binding.getExtensibilityElements();
-			for (Iterator k = extensibilityElementList.iterator(); k.hasNext();) {
-				ExtensibilityElement ee = (ExtensibilityElement) k.next();
-				if (ee instanceof SOAPBindingImpl) {
-					SOAPBinding soapBinding = (SOAPBinding) ee;
-					PortType portType = binding.getPortType();
-
-					setStyleForBinding(soapBinding);
-
-					for (Iterator opIterator = portType.getOperations()
-							.iterator(); opIterator.hasNext();) {
-						Operation op = (Operation) opIterator.next();
-						result.add(op);
-						portToOperationMap.put(op.getName(), portType);
-						bindingToOperationMap.put(op.getName(), binding);
-					}
-				}
-			}
-		}
-
-		Map imports = getSymbolTable().getDefinition().getImports();
-		if (imports != null && imports.size() > 0) {
-			result.addAll(processImports(imports));
-		}
-
-		return result;
-	}
-
-	private void setStyleForBinding(SOAPBinding soapBinding) {
-		String style = soapBinding.getStyle();
-		if (style == null)
-			style = "document"; // soap spec specifies to default to document if
-								// missing.
-		styleMap.put(getWSDLLocation(), style);
-	}
-
-	private Map<String, PortType> portTypeToOperationMap() {
-		Map<String, PortType> portToOperationMap = portTypeMap
-				.get(getWSDLLocation());
-		if (portToOperationMap == null) {
-			portToOperationMap = new HashMap<String, PortType>();
-			portTypeMap.put(getWSDLLocation(), portToOperationMap);
-		}
-		return portToOperationMap;
-	}
-
-	private List<Operation> processImports(Map imports) {
-		List<Operation> result = new ArrayList<Operation>();
-
-		Map<String, PortType> portToOperationMap = portTypeToOperationMap();
-		Map<String, Binding> bindingToOperationMap = bindingToOperationMap();
-
-		for (Iterator iterator = imports.values().iterator(); iterator
-				.hasNext();) {
-			List list = (List) iterator.next();
-			for (Iterator importIterator = list.iterator(); importIterator
-					.hasNext();) {
-				Import imp = (Import) importIterator.next();
-				Map bindings = imp.getDefinition().getBindings();
-				for (Iterator bindingsIterator = bindings.values().iterator(); bindingsIterator
-						.hasNext();) {
-					Binding binding = (Binding) bindingsIterator.next();
-					List extensibilityElementList = binding
-							.getExtensibilityElements();
-					for (Iterator k = extensibilityElementList.iterator(); k
-							.hasNext();) {
-						ExtensibilityElement ee = (ExtensibilityElement) k
-								.next();
-						if (ee instanceof SOAPBindingImpl) {
-							SOAPBinding soapBinding = (SOAPBinding) ee;
-							PortType portType = binding.getPortType();
-
-							setStyleForBinding(soapBinding);
-
-							for (Iterator opIterator = portType.getOperations()
-									.iterator(); opIterator.hasNext();) {
-								Operation op = (Operation) opIterator.next();
-								result.add(op);
-								portToOperationMap.put(op.getName(), portType);
-								bindingToOperationMap
-										.put(op.getName(), binding);
-							}
-						}
-					}
-				}
-
-			}
-		}
-
-		return result;
-	}
-
-	private Map<String, Binding> bindingToOperationMap() {
-		Map<String, Binding> bindingToOperationMap = bindingMap
-				.get(getWSDLLocation());
-		if (bindingToOperationMap == null) {
-			bindingToOperationMap = new HashMap<String, Binding>();
-			bindingMap.put(getWSDLLocation(), bindingToOperationMap);
-		}
-		return bindingToOperationMap;
-	}
-
-	private BindingOperation getBindingOperation(String operationName)
-			throws UnknownOperationException {
-		BindingOperation result = bindingOperations.get(operationName);
-		if (result == null) {
-			Binding binding = getBinding(operationName);
-			if (binding != null) {
-				List bindings = binding.getBindingOperations();
-				for (Iterator iterator = bindings.iterator(); iterator
-						.hasNext();) {
-					BindingOperation bindingOperation = (BindingOperation) iterator
-							.next();
-					if (bindingOperation.getOperation().getName().equals(
-							operationName)) {
-						result = bindingOperation;
-						bindingOperations.put(operationName, result);
-						break;
-					}
-				}
-			}
-		}
-		if (result == null)
-			throw new UnknownOperationException(
-					"Can't find binding operation for '" + operationName + "'");
-		return result;
-	}
-
-	private TypeDescriptor processParameter(Parameter param) {
-		TypeDescriptor typeDesc = constructType(param.getType());
-
-		typeDesc.setName(param.getName());
-
-		return typeDesc;
-	}
-
-	private TypeDescriptor constructType(TypeEntry type) {
-		TypeDescriptor result = null;
-		if (type instanceof CollectionType || type instanceof CollectionElement) {
-			result = constructArrayType(type);
-			result.setType(type.getRefType().getQName().getLocalPart());
-		} else if (type instanceof DefinedType
-				|| type instanceof DefinedElement) {
-			if (type.getComponentType() == null) {
-				if (type instanceof DefinedElement) {
-					if (type.isBaseType()) {
-						result = constructBaseType((DefinedElement) type);
-					} else {
-						result = constructComplexType((DefinedElement) type);
-					}
-				} else {
-					if (type.isSimpleType()) {
-						result = constructForSimpleType(type);
-					} else {
-						result = constructComplexType((DefinedType) type);
-					}
-				}
-			} else {
-				result = constructArrayType(type);
-			}
-		} else {
-			if (type.getQName().getLocalPart().equals("Map")) {
-				// axis treats Map as a base type, Taverna doesn't.
-				result = constructMapType(type);
-			} else {
-				result = constructBaseType(type);
-			}
-		}
-
-		return result;
-	}
-
-	private TypeDescriptor constructForSimpleType(TypeEntry type) {
-		Set nested = type.getNestedTypes(getSymbolTable(), true);
-
-		TypeDescriptor result = constructType((TypeEntry) nested.toArray()[0]);
-		result.setQname(type.getQName());
-		result.setName(type.getQName().getLocalPart());
-		return result;
-	}
-
-	private ArrayTypeDescriptor constructMapType(TypeEntry type) {
-		ArrayTypeDescriptor result = new ArrayTypeDescriptor();
-		TypeEntry mapItem = getSymbolTable().getType(type.getItemQName());
-		if (mapItem == null) {
-			mapItem = getSymbolTable().getType(
-					new QName(type.getQName().getNamespaceURI(), "mapItem"));
-		}
-
-		result.setElementType(constructType(mapItem));
-
-		result.setQname(type.getQName());
-		result.setType(type.getQName().getLocalPart());
-
-		return result;
-	}
-
-	private ComplexTypeDescriptor constructComplexType(DefinedElement type) {
-
-		ComplexTypeDescriptor result = new ComplexTypeDescriptor();
-
-		if (cachedComplexTypes.get(type.getQName().toString()) != null) {
-			result = copyFromCache(type.getQName().toString());
-		} else {
-			// caching the type is not really to improve performance, but is
-			// to handle types that contain elements that reference
-			// itself or another parent. Without the caching, this could lead to
-			// infinate
-			// recursion.
-			cachedComplexTypes.put(type.getQName().toString(), result);
-
-			result.setType(type.getQName().getLocalPart());
-			result.setQname(type.getQName());
-			
-			DefinedType refType = (DefinedType) type.getRefType();
-
-			do {
-				List containedElements = refType.getContainedElements();
-				if (containedElements != null) {
-					result.getElements().addAll(
-							constructElements(containedElements));
-				}
-				List containedAttributes = refType.getContainedAttributes();
-				if (containedAttributes != null) {
-					result.getAttributes().addAll(
-							constructAttributes(containedAttributes));
-				}
-			} while ((refType = (DefinedType) refType
-					.getComplexTypeExtensionBase(getSymbolTable())) != null);
-
-		}
-
-		return result;
-	}
-
-	private ComplexTypeDescriptor constructComplexType(DefinedType type) {
-		ComplexTypeDescriptor result = new ComplexTypeDescriptor();
-
-		if (cachedComplexTypes.get(type.getQName().toString()) != null) {
-			result = copyFromCache(type.getQName().toString());
-		} else {
-			TypeEntry baseTypeEntry = type
-					.getComplexTypeExtensionBase(getSymbolTable());
-			if (baseTypeEntry != null) {
-				ComplexTypeDescriptor baseTypeDescriptor = constructComplexType((DefinedType) baseTypeEntry);
-				result.getElements().addAll(baseTypeDescriptor.getElements());
-				result.getAttributes().addAll(
-						baseTypeDescriptor.getAttributes());
-			}
-			result.setType(type.getQName().getLocalPart());
-			cachedComplexTypes.put(type.getQName().toString(), result);
-			List containedElements = type.getContainedElements();
-			if (containedElements != null) {
-				result.getElements().addAll(
-						constructElements(containedElements));
-			}
-			List containedAttributes = type.getContainedAttributes();
-			if (containedAttributes != null) {
-				result.getAttributes().addAll(
-						constructAttributes(containedAttributes));				
-			}
-			result.setQname(type.getQName());
-		}
-		return result;
-	}
-
-	private List constructElements(List elements) {
-		List result = new ArrayList();
-
-		for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
-			ElementDecl el = (ElementDecl) iterator.next();
-			TypeDescriptor elType = constructType(el.getType());
-			elType.setOptional(el.getOptional() || el.getMinOccursIs0());
-			elType.setNillable(el.getNillable());
-			elType.setUnbounded(el.getMaxOccursIsUnbounded());
-			elType.setName(el.getQName().getLocalPart());
-			elType.setQname(el.getQName());
-			if (el.getDocumentation() != null && !el.getDocumentation().isEmpty()) {
-               elType.setDocumentation(el.getDocumentation());
-           }
-
-			result.add(elType);
-		}
-
-		return result;
-	}
-
-	private List constructAttributes(List elements) {
-		List result = new ArrayList();
-
-		for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
-			ContainedAttribute attribute = (ContainedAttribute) iterator.next();
-			AttributeTypeDescriptor attributeType = new AttributeTypeDescriptor();
-			attributeType.setType(attribute.getQName().getLocalPart());
-			attributeType.setOptional(attribute.getOptional());
-			attributeType.setName(attribute.getQName().getLocalPart());
-			attributeType.setQname(attribute.getQName());
-			result.add(attributeType);
-		}
-
-		return result;
-	}
-
-	private ArrayTypeDescriptor constructArrayType(TypeEntry type) {
-		ArrayTypeDescriptor result = new ArrayTypeDescriptor();
-		result.setElementType(constructType(type.getRefType()));
-		result.setType(type.getQName().getLocalPart());
-		result.setQname(type.getQName());
-
-        //this checks for 2 cases to determine for wrapped -
-        // first whether the axis SchemaUtils identifies it as being wrapped by being defined using the xsd:sequence compositor and containing only elements declarations. (see http://cmedia.glos.ac.uk/software/axis/docs/apiDocs/org/apache/axis/wsdl/symbolTable/SchemaUtils.html#getComplexElementRestrictionBase(org.w3c.dom.Node,%20org.apache.axis.wsdl.symbolTable.SymbolTable)
-        // the second case, for which isWrapped will always return false, is for array definitions that restrict the soapenc:Array type.
-        //    - the second case is not WS-I compliant: http://www.ws-i.org/Profiles/BasicProfile-1.1.html
-        //    - but can be treated equivalent to the first case, so also therefore assumed as being wrapped. IBM recommends manuall editing the WSDL to replace the restricted array definition with one defined using xsd:sequence - see http://www.ibm.com/developerworks/lotus/library/domino8-WS-I/
-        boolean wrapped=SchemaUtils.isWrappedType(type.getNode()) || SchemaUtils.getComplexElementRestrictionBase(type.getNode(), getSymbolTable())!=null;
-        
-		result.setWrapped(wrapped);
-        
-		return result;
-	}
-
-	private BaseTypeDescriptor constructBaseType(TypeEntry type) {
-		BaseTypeDescriptor result = new BaseTypeDescriptor();
-		result.setType(type.getQName().getLocalPart());
-		result.setQname(type.getQName());
-		return result;
-	}
-
-	private BaseTypeDescriptor constructBaseType(DefinedElement type) {
-
-		BaseTypeDescriptor result = null;
-		if (type.getRefType() == null) {
-			result = constructBaseType((TypeEntry) type);
-		} else {
-			result = new BaseTypeDescriptor();
-			result.setType(type.getRefType().getQName().getLocalPart());
-			result.setQname(type.getQName());
-		}
-		return result;
-	}
-
-	private ComplexTypeDescriptor copyFromCache(String key) {
-		ComplexTypeDescriptor cached = cachedComplexTypes.get(key);
-		ComplexTypeDescriptor result = new ComplexTypeDescriptor();
-		result.setQname(cached.getQname());
-		result.setElements(cached.getElements());
-		result.setType(cached.getType());
-		result.setDocumentation(cached.getDocumentation());
-
-		return result;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/package.html
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/package.html b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/package.html
deleted file mode 100644
index 8fc2638..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body>
-Contains classes required to parse a WSDL to discover and describe the operations and their input and output data structures.<br>
-These classes are derived heavily from the original parsing classes from the Taverna 1 WSDLBasedProcessor and have been refactored<br>
-to remove references to to Taverna 1 
-</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/AbstractBodyBuilder.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/AbstractBodyBuilder.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/AbstractBodyBuilder.java
deleted file mode 100644
index 445e158..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/AbstractBodyBuilder.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.soap;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.WSDLException;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.soap.SOAPException;
-
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.BaseTypeDescriptor;
-import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-
-import org.apache.axis.encoding.Base64;
-import org.apache.axis.message.SOAPBodyElement;
-import org.apache.log4j.Logger;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-@SuppressWarnings("unchecked")
-public abstract class AbstractBodyBuilder implements BodyBuilder {
-	
-	private static Logger logger = Logger.getLogger(AbstractBodyBuilder.class);
-
-	private String style;
-	private WSDLParser parser;
-	private String operationName;
-
-	protected enum Style {
-		DOCUMENT, RPC
-	};
-
-	protected enum Use {
-		LITERAL, ENCODED
-	};
-
-	protected Map<String, String> namespaceMappings;
-	protected List<TypeDescriptor> inputDescriptors;
-
-	public AbstractBodyBuilder(String style, WSDLParser parser,
-			String operationName, List<TypeDescriptor> inputDescriptors) {
-		this.style = style;
-		this.parser = parser;
-		this.operationName = operationName;
-		this.inputDescriptors = inputDescriptors;
-	}
-
-	protected Style getStyle() {
-		Style result = Style.DOCUMENT;
-		if (style.equalsIgnoreCase("rpc")) {
-			result = Style.RPC;
-		} else if (style.equalsIgnoreCase("document")) {
-			result = Style.DOCUMENT;
-		}
-		return result;
-	}
-
-	protected abstract Use getUse();
-
-	/**
-	 * 
-	 * @return the namespace for the operation
-	 */
-	private String getOperationNamespace() throws UnknownOperationException {
-		return parser.getOperationNamespaceURI(operationName);
-	}
-	
-	private QName getOperationQname() throws UnknownOperationException {
-		return parser.getOperationQname(operationName);	
-	}
-
-	public SOAPBodyElement build(Map inputMap) throws WSDLException,
-			ParserConfigurationException, SOAPException, IOException,
-			SAXException, UnknownOperationException {
-
-		List inputs = parser.getOperationInputParameters(operationName);
-
-		namespaceMappings = generateNamespaceMappings(inputs);
-
-		QName operationQname = getOperationQname();
-		
-		SOAPBodyElement body = new SOAPBodyElement(operationQname);
-
-		// its important to preserve the order of the inputs!
-		for (Iterator iterator = inputs.iterator(); iterator.hasNext();) {
-			TypeDescriptor descriptor = (TypeDescriptor) iterator.next();
-			String inputName = descriptor.getName();
-			Object dataValue = inputMap.get(inputName);
-
-			body = createBodyElementForData(operationName, namespaceMappings,
-					operationQname.getNamespaceURI(), body, descriptor, inputName, dataValue);
-		}
-
-		return body;
-	}
-
-
-
-	protected SOAPBodyElement createBodyElementForData(String operationName,
-			Map<String, String> namespaceMappings, String operationNamespace,
-			SOAPBodyElement body, TypeDescriptor descriptor, String inputName,
-			Object dataValue) throws ParserConfigurationException,
-			SAXException, IOException, UnknownOperationException, SOAPException {
-		if (dataValue != null) {
-			String mimeType = getMimeTypeForInputName(inputName);
-			String typeName = descriptor.getType();
-
-			Element el = null;
-
-			if (descriptor instanceof ArrayTypeDescriptor) {
-				el = createElementForArrayType(namespaceMappings, inputName,
-						dataValue, descriptor, mimeType, typeName);
-
-			} else {
-				el = createSkeletonElementForSingleItem(namespaceMappings,
-						descriptor, inputName, typeName);
-				populateElementWithObjectData(mimeType, el, dataValue, descriptor);
-			}
-
-			body = addElementToBody(operationNamespace, body, el);
-		}
-		return body;
-	}
-
-	protected abstract SOAPBodyElement addElementToBody(
-			String operationNamespace, SOAPBodyElement body, Element el)
-			throws SOAPException;
-
-	protected abstract Element createSkeletonElementForSingleItem(
-			Map<String, String> namespaceMappings, TypeDescriptor descriptor,
-			String inputName, String typeName);
-
-	/**
-	 * generates an XML DOM Element for an array
-	 * 
-	 * @param namespaceMappings
-	 * @param inputName
-	 * @param dataValue
-	 * @param descriptor
-	 * @param mimeType
-	 * @param typeName
-	 * @return
-	 * @throws ParserConfigurationException
-	 * @throws SAXException
-	 * @throws IOException
-	 */
-	protected abstract Element createElementForArrayType(
-			Map<String, String> namespaceMappings, String inputName,
-			Object dataValue, TypeDescriptor descriptor, String mimeType,
-			String typeName) throws ParserConfigurationException, SAXException,
-			IOException, UnknownOperationException;
-
-	/**
-	 * Populates a DOM XML Element with the contents of a List of dataValues
-	 * 
-	 * @param mimeType -
-	 *            the mime type of the data
-	 * @param element -
-	 *            the Element to be populated
-	 * @param dataValues -
-	 *            the List of Objects containing the data
-	 * @param elementType -
-	 *            the TypeDescriptor for the element being populated
-	 * @throws ParserConfigurationException
-	 * @throws SAXException
-	 * @throws IOException
-	 */
-	protected void populateElementWithList(String mimeType, Element element,
-			List dataValues, TypeDescriptor elementType)
-			throws ParserConfigurationException, SAXException, IOException {
-		for (Iterator dataIterator = dataValues.iterator(); dataIterator
-				.hasNext();) {
-			Object dataItem = dataIterator.next();
-			String tag;
-			if (elementType instanceof BaseTypeDescriptor) {
-				tag = elementType.getType();
-			} else {
-				tag = elementType.getName();
-			}
-
-			Element item = element.getOwnerDocument().createElement(tag);
-			populateElementWithObjectData(mimeType, item, dataItem, elementType);
-			element.appendChild(item);
-		}
-	}
-
-	/**
-	 * Populates a DOM XML Element with dataValue according to its mimetype
-	 * 
-	 * @param mimeType
-	 * @param element
-	 * @param dataValue
-	 * @param descriptor 
-	 * @throws ParserConfigurationException
-	 * @throws SAXException
-	 * @throws IOException
-	 */
-	protected void populateElementWithObjectData(String mimeType,
-			Element element, Object dataValue, TypeDescriptor descriptor)
-			throws ParserConfigurationException, SAXException, IOException {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-		factory.setNamespaceAware(true);
-		DocumentBuilder builder = factory.newDocumentBuilder();
-
-		if (mimeType.equals("'text/xml'")) {
-			Document doc = builder.parse(new ByteArrayInputStream(dataValue
-					.toString().getBytes()));
-			Element documentElement = doc.getDocumentElement();
-			
-			if (descriptor instanceof ComplexTypeDescriptor) {
-				ComplexTypeDescriptor complexType = (ComplexTypeDescriptor) descriptor;
-				NamedNodeMap attributes = documentElement.getAttributes();
-				if (attributes != null) {
-					for (int i = 0; i < attributes.getLength(); i++) {
-						Node attributeNode = attributes.item(i);
-						if (attributeNode instanceof Attr) {
-							Attr attribute = (Attr) attributeNode;
-							TypeDescriptor typeDescriptor = complexType.attributeForName(attribute.getName());
-							if (typeDescriptor != null) {
-								element.setAttributeNS(typeDescriptor.getNamespaceURI(), typeDescriptor.getName(), attribute.getValue());
-							}
-						}
-					}
-				}
-			}
-			
-			Node child = documentElement.getFirstChild();
-
-			while (child != null) {
-				element.appendChild(element.getOwnerDocument().importNode(
-						child, true));
-				child = child.getNextSibling();
-			}
-		} else if (mimeType.equals("'application/octet-stream'")
-				&& dataValue instanceof byte[]) {
-			String encoded = Base64.encode((byte[]) dataValue);
-			element.appendChild(element.getOwnerDocument().createTextNode(
-					encoded));
-		} else {
-			element.appendChild(element.getOwnerDocument().createTextNode(
-					dataValue.toString()));
-		}
-	}
-
-	/**
-	 * Provides the mime type for a given input
-	 * 
-	 * @param inputName
-	 * @return
-	 */
-	protected String getMimeTypeForInputName(String inputName) {
-		for (TypeDescriptor desc : inputDescriptors) {
-			if (desc.getName().equals(inputName))
-				return desc.getMimeType();
-		}
-		return "";
-	}
-
-	/**
-	 * Generates a map of all the namespaces for the operation and all of the
-	 * types required to call the operation. Namesspace prefixes (the key) start
-	 * with ns1 representing the operation, and continue incrementally for all
-	 * additional namespaces (ns2, ns3 ... etc).
-	 * 
-	 * @return
-	 * @param inputs -
-	 *            List of input TypeDescriptor's
-	 * @throws UnknownOperationException
-	 * @throws IOException
-	 */
-	protected Map<String, String> generateNamespaceMappings(List inputs)
-			throws UnknownOperationException, IOException {
-		Map<String, String> result = new HashMap<String, String>();
-		int nsCount = 2;
-
-		result.put(getOperationNamespace(), "ns1");
-		result.put("http://www.w3.org/2001/XMLSchema", "xsd");
-		result.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
-
-		for (Iterator iterator = inputs.iterator(); iterator.hasNext();) {
-			TypeDescriptor descriptor = (TypeDescriptor) iterator.next();
-			nsCount = mapNamespace(descriptor, new ArrayList<TypeDescriptor>(),result, nsCount);
-
-		}
-
-		return result;
-	}
-
-	/**
-	 * creates a namespace prefix and adds the namespace to the namespaceMap for
-	 * a TypeDescriptor. Further recursive calls are made if this type contains
-	 * addition inner elements that are not already mapped.
-	 * 
-	 * @param descriptor
-	 * @param namespaceMap
-	 * @param nsCount
-	 * @return
-	 */
-	protected int mapNamespace(TypeDescriptor descriptor, List<TypeDescriptor> visitedDescriptors,
-			Map<String, String> namespaceMap, int nsCount) {
-		if (!visitedDescriptors.contains(descriptor)) {
-			visitedDescriptors.add(descriptor);
-			String namespace = descriptor.getNamespaceURI();
-			if (namespace != null && namespace.length() > 0
-					&& !namespaceMap.containsKey(namespace)) {
-				namespaceMap.put(namespace, "ns" + nsCount);
-				nsCount++;
-			}
-	
-			if (descriptor instanceof ArrayTypeDescriptor) {
-				nsCount = mapNamespace(((ArrayTypeDescriptor) descriptor)
-						.getElementType(),visitedDescriptors, namespaceMap, nsCount);
-			} else if (descriptor instanceof ComplexTypeDescriptor) {
-				List elements = ((ComplexTypeDescriptor) descriptor).getElements();
-				for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
-					nsCount = mapNamespace((TypeDescriptor) iterator.next(),visitedDescriptors,
-							namespaceMap, nsCount);
-				}
-			}
-		}
-		else {
-			logger.error("The descriptor: "+descriptor+" is appears to be part of a cyclic schema. Bailing out of mapping namespace.");
-		}
-
-		return nsCount;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilder.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilder.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilder.java
deleted file mode 100644
index 7e6c8d0..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilder.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.soap;
-
-import java.io.IOException;
-import java.util.Map;
-
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.soap.SOAPException;
-
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-
-import org.apache.axis.message.SOAPBodyElement;
-import org.xml.sax.SAXException;
-
-/**
- * Interface to a class that is responsible for creating the SOAP body elements from the provided inputs
- * for invoking a SOAP based Web-service.
- * 
- * @author Stuart Owen
- */
-@SuppressWarnings("unchecked")
-public interface BodyBuilder {
-	
-	public SOAPBodyElement build(Map inputMap)
-			throws WSDLException, ParserConfigurationException, SOAPException,
-			IOException, SAXException, UnknownOperationException;
-	
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilderFactory.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilderFactory.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilderFactory.java
deleted file mode 100644
index c827770..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/BodyBuilderFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.soap;
-
-import java.util.List;
-
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-
-/**
- * Factory that creates an appropriate BodyBuilder according to the provided WSDLProcessors style and use.
- * @author Stuart Owen
- *
- */
-public class BodyBuilderFactory {
-	
-	private static BodyBuilderFactory instance = new BodyBuilderFactory();
-	
-	public static BodyBuilderFactory instance() {
-		return instance;
-	}
-	
-	public BodyBuilder create(WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors) throws UnknownOperationException {
-		String use = parser.getUse(operationName);
-		String style = parser.getStyle();
-		if (use.equals("encoded")) {
-			return new EncodedBodyBuilder(style, parser,operationName, inputDescriptors);
-		}
-		else if (use.equals("literal")) {
-			return new LiteralBodyBuilder(style,parser,operationName, inputDescriptors);
-		}
-		return new LiteralBodyBuilder(style,parser,operationName, inputDescriptors);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/CyclicReferenceException.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/CyclicReferenceException.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/CyclicReferenceException.java
deleted file mode 100644
index 027e49b..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/CyclicReferenceException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2003 The University of Manchester 
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.  Authorship
- * of the modifications may be determined from the ChangeLog placed at
- * the end of this file.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA.
- *
- ****************************************************************
- * Source code information
- * -----------------------
- * Filename           $RCSfile: CyclicReferenceException.java,v $
- * Revision           $Revision: 1.1 $
- * Release status     $State: Exp $
- * Last modified on   $Date: 2007/11/28 16:05:45 $
- *               by   $Author: sowen70 $
- * Created on 05-May-2006
- *****************************************************************/
-package net.sf.taverna.wsdl.soap;
-
-/**
- * Exception thrown when a MultiRef based xml document is found to have cyclic
- * references when transforming into a flat XML document, therefore meaning the
- * xml cannot be transformed.
- * 
- * @author sowen
- * 
- */
-
-public class CyclicReferenceException extends Exception {
-
-	private static final long serialVersionUID = -4051406646273085676L;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2e8f451e/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/EncodedBodyBuilder.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/EncodedBodyBuilder.java b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/EncodedBodyBuilder.java
deleted file mode 100644
index 6f332ff..0000000
--- a/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/soap/EncodedBodyBuilder.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.wsdl.soap;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.soap.SOAPException;
-
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.BaseTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-
-import org.apache.axis.message.SOAPBodyElement;
-import org.apache.axis.utils.XMLUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-@SuppressWarnings("unchecked")
-public class EncodedBodyBuilder extends AbstractBodyBuilder {
-	public EncodedBodyBuilder(String style, WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors) {
-		super(style, parser,operationName,inputDescriptors);
-	}
-
-	@Override
-	protected Use getUse() {
-		return Use.ENCODED;
-	}
-
-	@Override
-	public SOAPBodyElement build(Map inputMap) throws WSDLException,
-			ParserConfigurationException, SOAPException, IOException,
-			SAXException, UnknownOperationException {
-
-		SOAPBodyElement result = super.build(inputMap);
-		for (Iterator iterator = namespaceMappings.keySet().iterator(); iterator
-				.hasNext();) {
-			String namespaceURI = (String) iterator.next();
-			String ns = namespaceMappings.get(namespaceURI);
-			result.addNamespaceDeclaration(ns, namespaceURI);
-		}
-		result.setAttribute("soapenv:encodingStyle",
-				"http://schemas.xmlsoap.org/soap/encoding/");
-		return result;
-	}
-
-	@Override
-	protected Element createSkeletonElementForSingleItem(
-			Map<String, String> namespaceMappings, TypeDescriptor descriptor,
-			String inputName, String typeName) {
-		Element el = XMLUtils.StringToElement("", inputName, "");
-
-		String ns = namespaceMappings.get(descriptor.getNamespaceURI());
-		if (ns != null) {
-			el.setAttribute("xsi:type", ns + ":" + descriptor.getType());
-		}
-		return el;
-	}
-
-	@Override
-	protected Element createElementForArrayType(
-			Map<String, String> namespaceMappings, String inputName,
-			Object dataValue, TypeDescriptor descriptor, String mimeType,
-			String typeName) throws ParserConfigurationException, SAXException,
-			IOException, UnknownOperationException {
-		DocumentBuilderFactory builderFactory = DocumentBuilderFactory
-				.newInstance();
-		builderFactory.setNamespaceAware(true);
-		DocumentBuilder docBuilder = builderFactory.newDocumentBuilder();
-
-		Element el;
-		ArrayTypeDescriptor arrayDescriptor = (ArrayTypeDescriptor) descriptor;
-		TypeDescriptor elementType = arrayDescriptor.getElementType();
-		int size = 0;
-
-		el = XMLUtils.StringToElement("", inputName, "");
-
-		if (dataValue instanceof List) {
-			List dataValues = (List) dataValue;
-			size = dataValues.size();
-			populateElementWithList(mimeType, el, dataValues, elementType);
-		} else {
-			// if mime type is text/xml then the data is an array in xml form,
-			// else its just a single primitive element
-			if (mimeType.equals("'text/xml'")) {
-
-				Document doc = docBuilder.parse(new ByteArrayInputStream(
-						dataValue.toString().getBytes()));
-				Node child = doc.getDocumentElement().getFirstChild();
-
-				while (child != null) {
-					size++;
-					el.appendChild(el.getOwnerDocument()
-							.importNode(child, true));
-					child = child.getNextSibling();
-				}
-			} else {
-				String tag = "item";
-				if (elementType instanceof BaseTypeDescriptor) {
-					tag = elementType.getType();
-				} else {
-					tag = elementType.getName();
-				}
-				Element item = el.getOwnerDocument().createElement(tag);
-				populateElementWithObjectData(mimeType, item, dataValue, descriptor);
-				el.appendChild(item);
-			}
-
-		}
-
-		String ns = namespaceMappings.get(elementType.getNamespaceURI());
-		if (ns != null) {
-			String elementNS = ns + ":" + elementType.getType() + "[" + size
-					+ "]";
-			el.setAttribute("soapenc:arrayType", elementNS);
-			el.setAttribute("xmlns:soapenc",
-					"http://schemas.xmlsoap.org/soap/encoding/");
-		}
-
-		el.setAttribute("xsi:type", "soapenc:Array");
-
-		return el;
-	}
-
-	@Override
-	protected SOAPBodyElement addElementToBody(String operationNamespace, SOAPBodyElement body, Element el) throws SOAPException {
-		body.addChildElement(new SOAPBodyElement(el));
-		return body;
-	}
-
-	
-}