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 12:36:35 UTC

[15/70] [abbrv] incubator-taverna-common-activities git commit: taverna-wsdl-generic/

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c8b66752/src/test/resources/testwsdls/prodoric.wsdl
----------------------------------------------------------------------
diff --git a/src/test/resources/testwsdls/prodoric.wsdl b/src/test/resources/testwsdls/prodoric.wsdl
deleted file mode 100644
index bd1ce36..0000000
--- a/src/test/resources/testwsdls/prodoric.wsdl
+++ /dev/null
@@ -1,360 +0,0 @@
-<?xml version ='1.0' encoding ='UTF-8' ?> 
-<definitions name='prodoric_ws' 
-  targetNamespace='ws.prodoric' 
-  xmlns:tns='ws.prodoric' 
-  xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
-  xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
-  xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
-  xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
-  xmlns='http://schemas.xmlsoap.org/wsdl/'> 
-
-<wsdl:types>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap"
-xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-targetNamespace="ws.prodoric">
-
-<xsd:element name="ProteinAccString"  type="xsd:string"/>
-<xsd:element name="HelloStringIn"     type="xsd:string"/>
-<xsd:element name="HelloStringOut"    type="xsd:string"/>
-<xsd:element name="ProfileAcc"        type="xsd:string"/>
-
-<xsd:element name="OperonParams"             type="tns:ParamsType"/>
-<xsd:element name="RegulatorParams"          type="tns:ParamsType"/>
-<xsd:element name="ProfileParameterParams"   type="tns:ParamsType"/>
-<xsd:element name="ExpressionFromGeneParams" type="tns:ParamsType"/>
-<xsd:element name="GenomeParams"             type="tns:ParamsType"/>
-  <xsd:complexType name="ParamsType">
-
-    <xsd:sequence>
-      <xsd:element name="idtype" type="xsd:string"/>
-      <xsd:element name="id"     type="xsd:string"/>
-    </xsd:sequence>
-  </xsd:complexType>
-
-<xsd:element name="UniprotAccArray" type="tns:StringArrayType"/>
-<xsd:complexType name="StringArrayType">
-  <xsd:sequence>
-   <xsd:element name="str" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
-
-  </xsd:sequence>
-</xsd:complexType>
-
-<xsd:element name="ArrayOfOperonResult" type="tns:OperonResultArrayType"/>
-<xsd:complexType name="OperonResultArrayType">
-  <xsd:sequence>
-   <xsd:element name="OperonResult" type="tns:OperonResultType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="OperonResultType">
-  <xsd:sequence>
-    <xsd:element name="gene_acc"    type="xsd:string"/>
-
-    <xsd:element name="short_name"  type="xsd:string"/>
-    <xsd:element name="gene_name"   type="xsd:string"/>
-    <xsd:element name="orf_id"      type="xsd:string"/>
-    <xsd:element name="operon_acc"  type="xsd:string"/>
-    <xsd:element name="operon_name" type="xsd:string"/>
-    <xsd:element name="references"  type="xsd:string"/>
-  </xsd:sequence>
-</xsd:complexType>
-
-<xsd:element name="ArrayOfRegulatorResult" type="tns:RegulatorResultArrayType"/>
-
-<xsd:complexType name="RegulatorResultArrayType">
-  <xsd:sequence>
-   <xsd:element name="RegulatorResult" type="tns:RegulatorResultType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="RegulatorResultType">
-  <xsd:sequence>
-    <xsd:element name="protein_acc"    type="xsd:string"/>
-    <xsd:element name="short_name"     type="xsd:string"/>
-    <xsd:element name="protein_name"   type="xsd:string"/>
-
-    <xsd:element name="orf_id"         type="xsd:string"/>
-    <xsd:element name="mode_of_action" type="xsd:string"/>
-    <xsd:element name="promoter_acc"   type="xsd:string"/>
-    <xsd:element name="promoter_name"  type="xsd:string"/>
-    <xsd:element name="site_acc"       type="xsd:string"/>
-    <xsd:element name="site_name"      type="xsd:string"/>
-    <xsd:element name="sequence"       type="xsd:string"/>
-    <xsd:element name="references"     type="xsd:string"/>
-  </xsd:sequence>
-
-</xsd:complexType>
-
-<xsd:element name="ArrayOfProfileParameterResult" type="tns:ProfileParameterResultArrayType"/>
-<xsd:complexType name="ProfileParameterResultArrayType">
-  <xsd:sequence>
-   <xsd:element name="ProfileParameterResult" type="tns:ProfileParameterResultType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="ProfileParameterResultType">
-  <xsd:sequence>
-    <xsd:element name="profile_acc" type="xsd:string"/>
-    <xsd:element name="description" type="xsd:string"/>
-
-    <xsd:element name="condition"   type="xsd:string"/>
-    <xsd:element name="details"     type="xsd:string"/>
-    <xsd:element name="genome_acc"  type="xsd:string"/>
-    <xsd:element name="genome"      type="xsd:string"/>
-    <xsd:element name="references"  type="xsd:string"/>
-  </xsd:sequence>
-</xsd:complexType>
-
-<xsd:element name="ArrayOfProfileResult" type="tns:ProfileResultArrayType"/>
-<xsd:complexType name="ProfileResultArrayType">
-  <xsd:sequence>
-
-   <xsd:element name="ProfileResult" type="tns:ProfileResultType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="ProfileResultType">
-  <xsd:sequence>
-    <xsd:element name="gene_acc"    type="xsd:string"/>
-    <xsd:element name="orf_id"      type="xsd:string"/>
-    <xsd:element name="short_name"  type="xsd:string"/>
-    <xsd:element name="gene_name"   type="xsd:string"/>
-    <xsd:element name="regulation"  type="xsd:string"/>
-
-    <xsd:element name="fold_change" type="xsd:string"/>
-  </xsd:sequence>
-</xsd:complexType>
-
-<xsd:element name="ArrayOfExpressionFromGene" type="tns:ExpressionFromGeneArrayType"/>
-<xsd:complexType name="ExpressionFromGeneArrayType">
-  <xsd:sequence>
-   <xsd:element name="ExpressionFromGene" type="tns:ExpressionFromGeneType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="ExpressionFromGeneType">
-  <xsd:sequence>
-
-    <xsd:element name="profile_acc" type="xsd:string"/>
-    <xsd:element name="description" type="xsd:string"/>
-    <xsd:element name="condition"   type="xsd:string"/>
-    <xsd:element name="regulation"  type="xsd:string"/>
-    <xsd:element name="fold_change" type="xsd:string"/>
-    <xsd:element name="references"  type="xsd:string"/>
-  </xsd:sequence>
-</xsd:complexType>
-
-<xsd:element name="ArrayOfGenomeResult" type="tns:GenomeResultArrayType"/>
-
-<xsd:complexType name="GenomeResultArrayType">
-  <xsd:sequence>
-   <xsd:element name="GenomeResult" type="tns:GenomeResultType" minOccurs="0" maxOccurs="unbounded"/>
-  </xsd:sequence>
-</xsd:complexType>
-<xsd:complexType name="GenomeResultType">
-  <xsd:sequence>
-    <xsd:element name="genome_acc"   type="xsd:string"/>
-    <xsd:element name="genome_name"  type="xsd:string"/>
-  </xsd:sequence>
-
-</xsd:complexType>
-
-</xsd:schema>
-
-</wsdl:types>
-
-<message name='getOperonRequest'>
-  <part name='params' element='tns:OperonParams'/>
-</message>
-<message name='getOperonResponse'> 
-  <part name='return' element='tns:ArrayOfOperonResult'/> 
-</message> 
-
-<message name='getRegulatorsFromGeneRequest'>
-  <part name='params' element='tns:RegulatorParams'/>
-</message>
-
-<message name='getRegulatorsFromGeneResponse'> 
-  <part name='return' element='tns:ArrayOfRegulatorResult'/> 
-</message>
-
-<message name='getProfileParameterRequest'>
-  <part name='params' element='tns:ProfileParameterParams'/>
-</message>
-<message name='getProfileParameterResponse'> 
-  <part name='return' element='tns:ArrayOfProfileParameterResult'/> 
-</message>
-
-<message name='getProfileRequest'>
-  <part name='params' element='tns:ProfileAcc'/>
-</message>
-<message name='getProfileResponse'> 
-  <part name='return' element='tns:ArrayOfProfileResult'/> 
-
-</message>
-
-<message name='getExpressionFromGeneRequest'>
-  <part name='params' element='tns:ExpressionFromGeneParams'/>
-</message>
-<message name='getExpressionFromGeneResponse'> 
-  <part name='return' element='tns:ArrayOfExpressionFromGene'/> 
-</message>
-
-<message name='getGenomeRequest'>
-  <part name='params' element='tns:GenomeParams'/> 
-</message>
-<message name='getGenomeResponse'>
-  <part name='return' element='tns:ArrayOfGenomeResult'/> 
-
-</message> 
-
-<message name='getUniProtAccRequest'> 
-  <part name='protein_acc' element='tns:ProteinAccString'/> 
-</message>
-<message name='getUniProtAccResponse'> 
-  <part name='uniprot_acc' element='tns:UniprotAccArray'/> 
-</message> 
-
-<message name='helloRequest'> 
-  <part name='input'  element='tns:HelloStringIn'/> 
-</message>
-<message name='helloResponse'> 
-  <part name='return' element='tns:HelloStringOut'/> 
-</message>
-
-
-<portType name='prodoricPortType'> 
-
-  <operation name='getOperon'> 
-    <input  message='tns:getOperonRequest'/> 
-    <output message='tns:getOperonResponse'/> 
-  </operation>
-
-  <operation name='getRegulatorsFromGene'> 
-    <input  message='tns:getRegulatorsFromGeneRequest'/> 
-    <output message='tns:getRegulatorsFromGeneResponse'/> 
-  </operation>
-
-  <operation name='getProfileParameter'> 
-    <input  message='tns:getProfileParameterRequest'/> 
-    <output message='tns:getProfileParameterResponse'/> 
-  </operation>
-
-  <operation name='getProfile'> 
-    <input  message='tns:getProfileRequest'/> 
-    <output message='tns:getProfileResponse'/> 
-  </operation>
-
-  <operation name='getExpressionFromGene'> 
-    <input  message='tns:getExpressionFromGeneRequest'/> 
-    <output message='tns:getExpressionFromGeneResponse'/> 
-  </operation>
-
-  <operation name='getGenome'>
-    <input  message='tns:getGenomeRequest'/> 
-    <output message='tns:getGenomeResponse'/> 
-  </operation> 
-
-  <operation name='getUniProtAcc'> 
-    <input  message='tns:getUniProtAccRequest'/> 
-    <output message='tns:getUniProtAccResponse'/> 
-  </operation> 
-
-  <operation name='hello'> 
-    <input  message='tns:helloRequest'/> 
-    <output message='tns:helloResponse'/> 
-  </operation>
-
-</portType> 
-
-
-<binding name='prodoricBinding' type='tns:prodoricPortType'> 
-  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/> 
-
-  <operation name='getOperon'> 
-    <soap:operation soapAction='ws.prodoric#getOperon'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-  <operation name='getRegulatorsFromGene'> 
-    <soap:operation soapAction='ws.prodoric#getRegulatorsFromGene'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-  <operation name='getProfileParameter'> 
-    <soap:operation soapAction='ws.prodoric#getProfileParameter'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-  <operation name='getProfile'> 
-    <soap:operation soapAction='ws.prodoric#getProfile'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-  
-    <operation name='getExpressionFromGene'> 
-    <soap:operation soapAction='ws.prodoric#getExpressionFromGene'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-  
-
-  <operation name='getGenome'> 
-    <soap:operation soapAction='ws.prodoric#getGenome'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation> 
-
-  <operation name='getUniProtAcc'> 
-    <soap:operation soapAction='ws.prodoric#getUniProtAcc'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-  <operation name='hello'> 
-    <soap:operation soapAction='ws.prodoric#hello'/> 
-    <input> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </input> 
-    <output> 
-      <soap:body use='literal' namespace='ws.prodoric' /> 
-    </output> 
-  </operation>
-
-</binding> 
-
-
-<service name='prodoric_webservice'> 
-  <port name='prodoricPort' binding='tns:prodoricBinding'> 
-    <soap:address location='http://134.169.104.13/webservice/prodoric_server.php'/> 
-  </port> 
-
-</service>
-</definitions>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c8b66752/src/test/resources/testwsdls/whatizit.wsdl
----------------------------------------------------------------------
diff --git a/src/test/resources/testwsdls/whatizit.wsdl b/src/test/resources/testwsdls/whatizit.wsdl
deleted file mode 100644
index b3016fa..0000000
--- a/src/test/resources/testwsdls/whatizit.wsdl
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns:tns="http://www.ebi.ac.uk/webservices/whatizit/ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.ebi.ac.uk/webservices/whatizit/ws" name="whatizit">
-
-  <types>
-    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ebi.ac.uk/webservices/whatizit/ws" version="1.0">
-
-    <xs:element xmlns:ns1="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns1:search" name="search"/>
-    <xs:complexType name="search">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="pipelineName"/>
-        <xs:element type="xs:string" minOccurs="0" name="query"/>
-
-        <xs:element name="limit">      
-          <xs:simpleType>
-            <xs:restriction base="xs:int">
-              <xs:minInclusive value="0"/>
-              <xs:maxExclusive value="10000"/>
-            </xs:restriction>
-          </xs:simpleType>
-        </xs:element>      
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:element xmlns:ns2="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns2:searchResponse" name="searchResponse"/>
-    <xs:complexType name="searchResponse">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="return"/>
-      </xs:sequence>
-    </xs:complexType>
-    
-    <xs:element xmlns:ns3="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns3:WhatizitException" name="WhatizitException"/>
-    <xs:complexType name="WhatizitException">
-
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="message"/>
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:element xmlns:ns4="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns4:contact" name="contact"/>
-    <xs:complexType name="contact">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="pipelineName"/>
-
-        <xs:element type="xs:string" minOccurs="0" name="text"/>
-        <xs:element type="xs:boolean" name="convertToHtml"/>
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:element xmlns:ns5="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns5:contactResponse" name="contactResponse"/>
-    <xs:complexType name="contactResponse">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="return"/>
-
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:element xmlns:ns6="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns6:queryPmid" name="queryPmid"/>
-    <xs:complexType name="queryPmid">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="pipelineName"/>
-        <xs:element type="xs:string" minOccurs="0" name="pmid"/>
-      </xs:sequence>
-
-    </xs:complexType>
-
-    <xs:element xmlns:ns7="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns7:queryPmidResponse" name="queryPmidResponse"/>
-    <xs:complexType name="queryPmidResponse">
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="return"/>
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:element xmlns:ns8="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns8:getPipelinesStatus" name="getPipelinesStatus"/>
-
-    <xs:complexType name="getPipelinesStatus"/>
-
-    <xs:element xmlns:ns9="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns9:getPipelinesStatusResponse" name="getPipelinesStatusResponse"/>
-    <xs:complexType name="getPipelinesStatusResponse">
-      <xs:sequence>
-        <xs:element xmlns:ns10="http://www.ebi.ac.uk/webservices/whatizit/ws" type="ns10:selectItem" minOccurs="0" name="return" maxOccurs="unbounded"/>
-      </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="selectItem">
-
-      <xs:sequence>
-        <xs:element type="xs:string" minOccurs="0" name="description"/>
-        <xs:element type="xs:boolean" name="disabled"/>
-        <xs:element type="xs:string" minOccurs="0" name="label"/>
-        <xs:element type="xs:anyType" minOccurs="0" name="value"/>
-      </xs:sequence>
-    </xs:complexType>
-    </xs:schema>  
-  </types>
-
-  
-  
-  <message name="contact">
-    <part element="tns:contact" name="parameters"/>
-  </message>
-  
-  <message name="contactResponse">
-    <part element="tns:contactResponse" name="parameters"/>
-  </message>
-
-  <message name="WhatizitException">
-    <part element="tns:WhatizitException" name="fault"/>
-
-  </message>
-  
-  <message name="getPipelinesStatus">
-    <part element="tns:getPipelinesStatus" name="parameters"/>
-  </message>
-  
-  <message name="getPipelinesStatusResponse">
-    <part element="tns:getPipelinesStatusResponse" name="parameters"/>
-  </message>
-  
-  <message name="queryPmid">
-    <part element="tns:queryPmid" name="parameters"/>
-
-  </message>
-  
-  <message name="queryPmidResponse">
-    <part element="tns:queryPmidResponse" name="parameters"/>
-  </message>
-  
-  <message name="search">
-    <part element="tns:search" name="parameters"/>
-  </message>
-  
-  <message name="searchResponse">
-    <part element="tns:searchResponse" name="parameters"/>
-
-  </message>
-  
-  
-  <portType name="whatizit">
-    <operation name="contact">
-      <input message="tns:contact"/>
-      <output message="tns:contactResponse"/>
-      <fault message="tns:WhatizitException" name="WhatizitException"/>
-    </operation>
-    <operation name="getPipelinesStatus">
-      <input message="tns:getPipelinesStatus"/>
-
-      <output message="tns:getPipelinesStatusResponse"/>
-      <fault message="tns:WhatizitException" name="WhatizitException"/>
-    </operation>
-    <operation name="queryPmid">
-      <input message="tns:queryPmid"/>
-      <output message="tns:queryPmidResponse"/>
-      <fault message="tns:WhatizitException" name="WhatizitException"/>
-    </operation>
-    <operation name="search">
-
-      <input message="tns:search"/>
-      <output message="tns:searchResponse"/>
-      <fault message="tns:WhatizitException" name="WhatizitException"/>
-    </operation>
-  </portType>
-  
-  <binding type="tns:whatizit" name="pipelineBinding">
-    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-    <operation name="contact">
-      <soap:operation soapAction=""/>
-
-      <input>
-        <soap:body use="literal"/>
-      </input>
-      <output>
-        <soap:body use="literal"/>
-      </output>
-      <fault name="WhatizitException">
-        <soap:fault use="literal" name="WhatizitException"/>
-      </fault>
-
-    </operation>
-    <operation name="getPipelinesStatus">
-      <soap:operation soapAction=""/>
-      <input>
-        <soap:body use="literal"/>
-      </input>
-      <output>
-        <soap:body use="literal"/>
-      </output>
-
-      <fault name="WhatizitException">
-        <soap:fault use="literal" name="WhatizitException"/>
-      </fault>
-    </operation>
-    <operation name="queryPmid">
-      <soap:operation soapAction=""/>
-      <input>
-        <soap:body use="literal"/>
-      </input>
-
-      <output>
-        <soap:body use="literal"/>
-      </output>
-      <fault name="WhatizitException">
-        <soap:fault use="literal" name="WhatizitException"/>
-      </fault>
-    </operation>
-    <operation name="search">
-      <soap:operation soapAction=""/>
-
-      <input>
-        <soap:body use="literal"/>
-      </input>
-      <output>
-        <mime:multipartRelated>
-        <mime:part>
-           <soap:body parts="" use="literal"/>
-        </mime:part>
-         <mime:part>
-
-          <mime:content type="text/xml" part="parameters"/>
-         </mime:part>
-       </mime:multipartRelated>
-	  </output>
-      <fault name="WhatizitException">
-        <soap:fault use="literal" name="WhatizitException"/>
-      </fault>
-    </operation>
-  </binding>
-
-  <service name="whatizit">
-    <port binding="tns:pipelineBinding" name="pipeline">
-      <soap:address location="http://www.ebi.ac.uk:80/webservices/whatizit/ws"/>
-    </port>
-  </service>
-</definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c8b66752/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
new file mode 100644
index 0000000..7c49241
--- /dev/null
+++ b/taverna-wsdl-generic/pom.xml
@@ -0,0 +1,130 @@
+<?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>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna</groupId>
+	<artifactId>wsdl-generic</artifactId>
+	<version>1.11.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>wsdl-generic</name>
+	<description>
+        WSDL handling classes bundled for Taverna 3 OSGi
+    </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>org.apache.log4j</groupId>
+			<artifactId>com.springsource.org.apache.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>
+
+	<repositories>
+		<repository>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository</url>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</repository>
+		<repository>
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+		</repository>
+		<repository>
+			<id>com.springsource.repository.bundles.release</id>
+			<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
+			<url>http://repository.springsource.com/maven/bundles/release</url>
+		</repository>
+		<repository>
+			<id>com.springsource.repository.bundles.external</id>
+			<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
+			<url>http://repository.springsource.com/maven/bundles/external</url>
+		</repository>
+	</repositories>
+	<scm>
+		<connection>scm:svn:http://taverna.googlecode.com/svn/taverna/utils/net.sf.taverna.wsdl-generic/trunk/</connection>
+		<developerConnection>scm:svn:https://taverna.googlecode.com/svn/taverna/utils/net.sf.taverna.wsdl-generic/trunk/</developerConnection>
+		<url>http://code.google.com/p/taverna/source/browse/#svn/taverna/utils/net.sf.taverna.wsdl-generic/trunk/</url>
+	</scm>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c8b66752/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
new file mode 100644
index 0000000..f94d5b8
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ArrayTypeDescriptor.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..a8d0c37
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/AttributeTypeDescriptor.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..d911c43
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/BaseTypeDescriptor.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..766c913
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/ComplexTypeDescriptor.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..69344f8
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/TypeDescriptor.java
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..049a7a1
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/UnknownOperationException.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..b5b028c
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java
@@ -0,0 +1,936 @@
+/*******************************************************************************
+ * 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/c8b66752/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
new file mode 100644
index 0000000..8fc2638
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/java/net/sf/taverna/wsdl/parser/package.html
@@ -0,0 +1,5 @@
+<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