Gen 8.6 Call External "Error: WSDL Access" and "Index was out of range"
search cancel

Gen 8.6 Call External "Error: WSDL Access" and "Index was out of range"

book

Article ID: 192329

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

Using Gen 8.6 Toolset with latest PTFs.
Attempt to use Call External to import a WSDL file TicketAgent.wsdl fails with the following parsing error.
---------------------------
Error: WSDL Access
Error: WSDL Access
Detail:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
---------------------------
 
 

Environment

Gen Workstation Toolset

Cause

SoapUI imports the file TicketAgent.wsdl successfully.
Third party wsdl validators report that no services are defined e.g. 
Apache CXF WSDL Validator tool (Apache CXF > Tools > WSDL Validator)
C:\>C:\apache-cxf-3.3.6\bin\wsdlvalidator TicketAgent.wsdl
Jun 04, 2020 5:31:43 AM org.apache.cxf.tools.validator.internal.WSDLRefValidator collectValidationPoints
WARNING: WSDL document file:/C:/TicketAgent.wsdl does not define any services
Passed Validation : Valid WSDL

Resolution

Gen Engineering confirmed that having no service (endpoint) defined and having no "soap:operation" is causing the Call External import error. Examples of additional lines that needed to be added to enable successful import are in bold below:

*****
...
  <wsdl:binding name="TicketAgentSoap" type="tns:TicketAgent">
    <soap:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="listFlights">
    <soap:operation soapAction="http://example.org/TicketAgent.wsdl11" style="document"/> <!--- ADDED -->
      <wsdl:input>
        <soap:header message="tns:listFlightsRequestHeader"
          part="header" use="literal"></soap:header>
        <soap:body parts="body" use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body parts="body" use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="TicketAgentSoapService"> 
      <wsdl:port binding="tns:TicketAgentSoap" name="TicketAgent"> 
         <soap:address location="http://example.org/TicketAgent.wsdl11"/> 
      </wsdl:port> 
  </wsdl:service> 
*****