Downloading and Editing WSDL Document

This section provides a tutorial example on how to download the WSDL document from the Web service provider. You can change port.address[@location] to a localhost URL to local testing.

In order to help me troubleshooting my SOAP::Lite WSDL program, I downloaded the GetSpeech WSDL document to my local system.

1. Go to http://www.xmlme.com/WSShakespeare.asmx?WSDL with a Web browser. Wait for the WSDL document to show up.

2. Right mouse click on the document and select "View page source" from the context pop up menu.

3. Click "File" > "Save page as" and save the file as \herong\GetSpeech.wsdl.

4. Open \herong\GetSpeech.wsdl in a text editor and change port.address[@location] to localhost URLs. This will allow me to test my SOAP::Lite program locally.

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  xmlns:tns="http://xmlme.com/WebServices"
  xmlns:s="http://www.w3.org/2001/XMLSchema"
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  targetNamespace="http://xmlme.com/WebServices"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
     This Web Service takes a phrase from the plays of William ...
  </wsdl:documentation>
  <wsdl:types>
    <s:schema elementFormDefault="qualified"
      targetNamespace="http://xmlme.com/WebServices">
      <s:element name="GetSpeech">
         ...
      </s:element>
      <s:element name="GetSpeechResponse">
         ...
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetSpeechSoapIn">
    <wsdl:part name="parameters" element="tns:GetSpeech" />
  </wsdl:message>
  <wsdl:message name="GetSpeechSoapOut">
    <wsdl:part name="parameters" element="tns:GetSpeechResponse" />
  </wsdl:message>
  <wsdl:portType name="ShakespeareSoap">
    <wsdl:operation name="GetSpeech">
      ...
      <wsdl:input message="tns:GetSpeechSoapIn" />
      <wsdl:output message="tns:GetSpeechSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ShakespeareSoap" type="tns:ShakespeareSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetSpeech">
       ...
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ShakespeareSoap12" type="tns:ShakespeareSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetSpeech">
       ,,,
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Shakespeare">
    ...
    <wsdl:port name="ShakespeareSoap" binding="tns:ShakespeareSoap">
      <soap:address location="http://localhost/soap11" />
    </wsdl:port>
    <wsdl:port name="ShakespeareSoap12"
      binding="tns:ShakespeareSoap12">
      <soap12:address location="http://localhost/soap12" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Note that there are two "port"s defined in the WSDL: one for SOAP 1.1 and one for SOAP 1.2.

Table of Contents

 About This Book

 Introduction to Web Service

 Introduction to SOAP (Simple Object Access Protocol)

 SOAP Message Structure

 SOAP Message Transmission and Processing

 SOAP Data Model

 SOAP Encoding

 SOAP RPC Presentation

 SOAP Properties Model

 SOAP MEP (Message Exchange Patterns)

 SOAP HTTP Binding

 SOAP PHP Implementations

 PHP SOAP Extension Client Programs

 PHP SOAP Extension Server Programs

 PHP SOAP Web Service Example - getTemp

 SOAP Perl Implementations

 Perl SOAP::Lite - SOAP Server-Client Communication Module

 Perl Socket Test Program for HTTP and SOAP

 Perl SOAP::Lite for NumberToWords SOAP 1.1 Web Service

 Perl SOAP::Lite for SOAP 1.2 Web Services

 Perl SOAP::Lite for WSDL

 Python SOAP Client: Zeep

 SOAP Java Implementations

 Java Socket and HttpURLConnection for SOAP

 SAAJ - SOAP with Attachments API for Java

 SoapUI - SOAP Web Service Testing Tool

 WS-Security - SOAP Message Security Extension

 WS-Security X.509 Certificate Token

 Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service

 Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services

Perl SOAP::Lite 0.710 for WSDL

 First WSDL Test Failed with SOAP::Lite

Downloading and Editing WSDL Document

 Testing service() Function Locally

 soapversion('1.2') Sets Correct Envelope namespace

 Error: Object reference not set to an instance of an object

 Web Services and SOAP Terminology

 Archived Tutorials

 References

 Full Version in PDF/EPUB