Uploaded image for project: 'Apache Taverna'
  1. Apache Taverna
  2. TAVERNA-185

Can't handle WSDL requiring soap:Header in input message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Major
    • Resolution: Unresolved
    • None
    • None

    Description

      INFO  2012-12-26 14:16:32,549 (net.sf.taverna.t2.workbench.ui.servicepanel.ServicePanel:131) - Parsing wsdl:http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl WSDL service http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl
      INFO  2012-12-26 14:16:32,719 (net.sf.taverna.t2.workbench.ui.servicepanel.ServicePanel:131) - Found 2 WSDL operations:http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl WSDL service http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl
      WARN  2012-12-26 14:16:32,751 (net.sf.taverna.t2.servicedescriptions.impl.ServiceDescriptionRegistryImpl:579) - Provider WSDL service http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl: There was an error with the wsdl: http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl
      java.lang.ClassCastException: com.ibm.wsdl.extensions.soap.SOAPHeaderImpl cannot be cast to javax.wsdl.extensions.soap.SOAPBody
      	at net.sf.taverna.wsdl.parser.WSDLParser.getUse(WSDLParser.java:438)
      	at net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceProvider.findServiceDescriptionsAsync(WSDLServiceProvider.java:111)
      	at net.sf.taverna.t2.servicedescriptions.impl.ServiceDescriptionRegistryImpl$FindServiceDescriptionsThread.run(ServiceDescriptionRegistryImpl.java:670). 
      

      happens for http://vo.imcce.fr/webservices/ssodnet/ssodnet.php?wsdl (attached) - because:

      <soap:operation soapAction="http://vo.imcce.fr/webservices/ssodnet#resolver" style="rpc"/>
        <wsdl:input>
          <soap:header use="encoded" part="clientID" message="tns:header" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
          <soap:body use="encoded" namespace="http://vo.imcce.fr/webservices/ssodnet" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:input>
      

      This requires both <soapenv:Header> and <soapenv:Body> in the SOAP message, but our code assumes there is only a <soap:body> here when checking for the 'use' attribute:

      https://code.google.com/p/taverna/source/browse/taverna/utils/net.sf.taverna.wsdl-generic/tags/wsdl-generic-1.9/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java#438

           if (extElements != null && extElements.size() > 0) {
                              SOAPBody body = (SOAPBody) extElements.get(0);
                              result = body.getUse();
                      } else {
      

      .. the code would have to be checked if there are other places that SOAPBody is assumed to be the first and only elements, both for inputs and outputs.

      Note that it is not known whether this service would actually fail if the SOAP message generated by the Taverna does not contain the required <soapenv:Header> with clientID - so it's worth checking if the service in question can be properly invoked after fixing this bug.

      Attachments

        1. ssodnet.wsdl
          5 kB
          Stian Soiland-Reyes

        Activity

          People

            Unassigned Unassigned
            stain Stian Soiland-Reyes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: