<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:mbsky:site" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:mbsky:site" name="BlueSkySite">
<types><xs:schema targetNamespace="urn:mbsky:site" elementFormDefault="qualified">
<xs:element name="getName"><xs:complexType/></xs:element>
<xs:element name="getNameResponse"><xs:complexType><xs:sequence><xs:element name="getNameResult" type="xs:string"/></xs:sequence></xs:complexType></xs:element>
<xs:element name="getUrl"><xs:complexType/></xs:element>
<xs:element name="getUrlResponse"><xs:complexType><xs:sequence><xs:element name="getUrlResult" type="xs:string"/></xs:sequence></xs:complexType></xs:element>
<xs:element name="getLesson"><xs:complexType><xs:sequence><xs:element name="slug" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="getLessonResponse"><xs:complexType><xs:sequence><xs:element name="getLessonResult" type="xs:string"/></xs:sequence></xs:complexType></xs:element> </xs:schema></types>
<message name="GetNameIn"><part name="parameters" element="tns:getName"/></message>
<message name="GetNameOut"><part name="parameters" element="tns:getNameResponse"/></message>
<message name="GetUrlIn"><part name="parameters" element="tns:getUrl"/></message>
<message name="GetUrlOut"><part name="parameters" element="tns:getUrlResponse"/></message>
<message name="GetLessonIn"><part name="parameters" element="tns:getLesson"/></message><message name="GetLessonOut"><part name="parameters" element="tns:getLessonResponse"/></message> <portType name="SitePortType">
<operation name="getName"><input message="tns:GetNameIn"/><output message="tns:GetNameOut"/></operation>
<operation name="getUrl"><input message="tns:GetUrlIn"/><output message="tns:GetUrlOut"/></operation>
<operation name="getLesson"><input message="tns:GetLessonIn"/><output message="tns:GetLessonOut"/></operation> </portType>
<binding name="SiteBinding" type="tns:SitePortType"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getName"><soap:operation soapAction="urn:mbsky:site#getName"/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation>
<operation name="getUrl"><soap:operation soapAction="urn:mbsky:site#getUrl"/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation>
<operation name="getLesson"><soap:operation soapAction="urn:mbsky:site#getLesson"/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation> </binding>
<service name="SiteService"><port name="SitePort" binding="tns:SiteBinding"><soap:address location="http://127.0.0.1:8859/wsdl-server.php"/></port></service>
</definitions>
本例需在 Python 3.12 lxml;PHP 8.4.27 SOAP;回环HTTP 中运行,请复制源码、保存文件或下载工程包后在本地执行验证。
运行说明与环境独立工程
运行环境:Python 3.12 lxml;PHP 8.4.27 SOAP;回环HTTP
入口文件:projects/wsdl-lab/public/service.wsdl
预期结果与验证条件观察提示
- 返回名称蓝色天空网、地址https://mbsky.com及CSS 布局
- 真实端点覆盖单独记录
请结合实际环境逐项观察。
附件与关联工程包下载
课程关联工程包(登记关联8章) · 含当前章节或实例 · mbskycom202611a537.zip