WSDL Tutorials - Herong's Tutorial Examples - Version 2.03, by Dr. Herong Yang
Loading Incorrect WSDL Documents
This section provides a tutorial example to test what will happen when loading an incorrect WSDL document to soapUI 3.0.1. soapUI 3.0.1 is not good WSDL document validator. It will not give any loading errors for incorrect WSDL documents.
In this tutorial, I want to see how soapUI 3.0.1 handles errors in a WSDL document.
1. To do this, I created WSDL document with 2 errors:
<?xml version="1.0"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:hy="http://www.herongyang.com/Service/" targetNamespace="http://www.herongyang.com/"> <!-- Error 1: targetNamespace must match the xmlns:hy definition --> <wsdl:documentation> Hello_WSDL_11_SOAP_Error.wsdl Copyright (c) 2007 by Dr. Herong Yang, herongyang.com All rights reserved </wsdl:documentation> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- Error 2: missing targetNamespace in xsd:schema --> <xsd:element name="HelloRequest" type="xsd:string"/> <xsd:element name="HelloResponse" type="xsd:string"/> </xsd:schema> </wsdl:types> <wsdl:message name="helloInputMessage"> <wsdl:part name="helloInputPart" element="hy:HelloRequest"/> </wsdl:message> <wsdl:message name="helloOutputMessage"> <wsdl:part name="helloOutputPart" element="hy:HelloResponse"/> </wsdl:message> <wsdl:portType name="helloPortType"> <wsdl:operation name="Hello"> <wsdl:input name="helloInput" message="hy:helloInputMessage"/> <wsdl:output name="helloOutput" message="hy:helloOutputMessage"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="helloBinding" type="hy:helloPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="Hello"> <soap:operation soapAction="http://www.herongyang.com/Service/Hello"/> <wsdl:input name="helloInput"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="helloOutput"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="helloService"> <wsdl:port name="helloPort" binding="hy:helloBinding"> <soap:address location="http://www.herongyang.com/Service/Hello_SOAP_11.php"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
2. Run soapUI 3.0.1 and create a new project called "TestProject" without initial WSDL document.
3. Right click on "TestProject" and select "Add WSDL". A small dialog box shows up.
4. Browse and find "Hello_WSDL_11_SOAP_Error.wsdl" to load it.
Surprisingly, the WSDL document is loaded without any errors! Binding "helloBinding" shows up in the project object tree. But operation "Hello" is not showing.
Conclusion - soapUI 3.0.1 is not good WSDL document validator. It will not give any loading errors for incorrect WSDL documents. But it will not show you the operation object, if it is not defined correctly in the WSDL document.
Last update: 2009.
Table of Contents
WSDL 2.0 Document Structure and Syntax
WSDL Version 2.0 Part 2: Adjuncts
WSDL 2.0 Document Examples with SOAP Binding
WSDL 20 Programming APIs and Testing Tools
WSDL 1.1 Document Structure and Syntax
WSDL 1.1 Binding Extension for SOAP 1.1
►soapUI 3.0.1 - Web Service Testing Tool
Downloading and Installing soapUI 3.0.1
Validating and Inspecting WSDL Documents
Using Interface Viewer on Bindings
Generating HTML Documentations On Bindings
Generating Test Requests on Operations
Submit Test Requests to the Server
MockService - Web Service Simulator
Submitting Request to MockService
►Loading Incorrect WSDL Documents
WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles
PHP SOAP Extension in PHP 5.3.1
Using WSDL in Perl with SOAP::Lite 0.710
Using WSDL Document in Java with Axis2 1.4.1
Using WSDL2Java to Generate Web Service Stub Classes
WSDL 1.1 Binding Extension for SOAP 1.2
WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles