我正在尝试编写一个php soap服务器 但是我继续在wsdl文件上发现了以下错误:
WSDLSOAP-ERROR: Parsing WSDL: Couldn't load from 'files.wsdl' : Premature end of data in tag definitions line 2
wsdl文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TemperatureService"
targetNamespace="http://www.mysite.com/soap/files.wsdl"
xmlns:tns="http://www.mysite.com/soap/files.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!------------------------
DATATYPES
------------------------->
<types>
</types>
<!------------------------
MESSAGES
------------------------->
<message name="createReleaseRequest">
<part name="title" type="xsd:string"/>
<part name="size" type="xsd:string"/>
<part name="key" type="xsd:string"/>
</message>
<message name="createReleaseResponse">
<part name="rlsid" type="xsd:string"/>
</message>
<!------------------------
PORTTYPES
------------------------->
<portType name="DBPortType">
<operation name="createRelease">
<input message="tns:createReleaseRequest" />
<output message="tns:createReleaseResponse" />
</operation>
</portType>
</definitions>
和php文件:
<?php
ini_set("soap.wsdl_cache_enabled", "0");
$server = new SoapServer("files.wsdl");
$server->setClass("handleDB");
$server->handle();
class handleDB {
////
}
?>
amyone知道我做错了什么
答案 0 :(得分:1)
我发现了问题 我无法用那种方式输入我的评论