Error loading WSDL

Report your bugs here, Thank you!

Error loading WSDL

Postby ChinnuReji » 16 Dec 2011 07:17

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
ChinnuReji
User
 
Posts: 3
Joined: 10 Jun 2011 08:22

Re: Error loading WSDL

Postby SmartBear Support » 16 Dec 2011 08:31

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
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Error loading WSDL

Postby Nwright » 20 Dec 2011 18:29

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
Nwright
User
 
Posts: 1
Joined: 20 Dec 2011 18:14

Re: Error loading WSDL

Postby Faliorn » 01 Feb 2012 13:27

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!!
Faliorn
User
 
Posts: 1
Joined: 01 Feb 2012 13:23

Re: Error loading WSDL

Postby rtomasso » 04 Dec 2012 17:19

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.
rtomasso
User
 
Posts: 4
Joined: 04 Jan 2012 22:05


Return to soapUI Bugs