Forum Discussion

ChinnuReji's avatar
ChinnuReji
New Contributor
13 years ago

Error loading WSDL

I am getting an error 'Invalid Definition Exception' while loading WSDL.
Is there an option to skip this exception and get the WSDL loaded to the tool
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    no - this usually indicates that there is something wrong with the WSDL so soapUI can't load it.. are you getting any more error information in the error log?

    regards!

    /Ole
    SmartBear Software
  • I get the same error while trying to load my WSDL (Failed to update interface: [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException]).

    This is what the error log says

    Tue Dec 20 12:22:46 EST 2011:ERROR:com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:138)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:534)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:523)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:226)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
    at java.lang.Thread.run(Unknown Source)

    I've sent the asmx/wsdl file to support at [eviware]. I appreciate all the help I can get.

    SOAP UI version: Build dist-134-2011-09-14, Build Date 2011/09/14 13:06
  • Same error here

    2012-02-01 13:17:31,619 ERROR [errorlog] com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:138)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:534)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.selectDefinitionParts(SchemaUtils.java:564)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:544)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:523)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:226)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
    at java.lang.Thread.run(Thread.java:662)

    Seems like the problem is in the schema:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema version="1.0" targetNamespace="http://com.mycompany.myproduct.webServices" xmlns:tns="http://com.mycompany.myproduct.webServices" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="myproductWebServiceException" type="tns:myproductWebServiceException"/>

    <xs:complexType name="myproductWebServiceException">
    <xs:sequence>
    <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
    <xs:element name="message" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="changeMainRoleRequestCT">
    <xs:complexContent>
    <xs:extension base="tns:requestCT">
    <xs:sequence>
    <xs:element name="newRole" type="tns:sidKeyDescriptionCT" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="requestCT">
    <xs:complexContent>
    <xs:extension base="tns:genericCT">
    <xs:sequence>
    <xs:element name="loginCT" type="tns:loginCT" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="genericCT">
    <xs:sequence/>
    </xs:complexType>

    <xs:complexType name="sidKeyDescriptionCT">
    <xs:complexContent>
    <xs:extension base="tns:sidCT">
    <xs:sequence>
    <xs:element name="description" type="xs:string" minOccurs="0"/>
    <xs:element name="key" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="sidCT">
    <xs:complexContent>
    <xs:extension base="tns:genericCT">
    <xs:sequence>
    <xs:element name="sid" type="xs:long" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="loginCT">
    <xs:complexContent>
    <xs:extension base="tns:genericCT">
    <xs:sequence>
    <xs:element name="password" type="xs:string" minOccurs="0"/>
    <xs:element name="user" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="loginRequestCT">
    <xs:complexContent>
    <xs:extension base="tns:requestCT">
    <xs:sequence/>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="loginResponseCT">
    <xs:complexContent>
    <xs:extension base="tns:sidCT">
    <xs:sequence>
    <xs:element name="description" type="xs:string" minOccurs="0"/>
    <xs:element name="facility" type="xs:long" minOccurs="0"/>
    <xs:element name="identifier" type="xs:string" minOccurs="0"/>
    <xs:element name="organization" type="xs:long" minOccurs="0"/>
    <xs:element name="role" type="xs:long" minOccurs="0"/>
    <xs:element name="roleDescription" type="xs:string" minOccurs="0"/>
    <xs:element name="service" type="xs:long" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    </xs:schema>

    It was generated automatically by wsgen.

    Last change I made was replacing a getter in a complex type from getOperatorInformation(...) to updateOperatorInformation(...) because I didn't want the field to be exposed.

    Prior xsd was:

    <xs:complexType name="requestCT">
    <xs:complexContent>
    <xs:extension base="tns:genericCT">
    <xs:sequence>
    <xs:element name="loginCT" type="tns:loginCT" minOccurs="0"/>
    <xs:element name="operatorInformation" type="tns:loginResponseCT" minOccurs="0"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    Element <xs:element name="operatorInformation" type="tns:loginResponseCT" minOccurs="0"/> was removed. Prior to this, SoapUI worked fine. Now it doesn't.

    Help please!!
  • rtomasso's avatar
    rtomasso
    New Contributor
    I just encountered very similar issue. The problem was I was including the <complexContent> and <restriction> tags for a non-array <sequence> and SOAPUI choked on them.

    The error message was less than helpful
    WARN:Error: http://myserver.com:8080/API/WSDL/Utils.wsdl:0: error: A complexContent must define a base type

    Removing the extraneous tags fixed the problem.