我的WSDL工作正常,但在添加第二个方法“UpdateUserName”后,它开始提供错误
Fatal error: SOAP-ERROR: Parsing WSDL: Unexpected extensibility element
这是我的WSDL
<?xml version="1.0"?>
<definitions name="CreateUpdateUser" targetNamespace="urn:CreateUpdateUser" xmlns:tns="urn:CreateUpdateUser" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:CreateUpdateUser">
<xsd:complexType name="CreateUpdateUserResponse">
<xsd:all>
<xsd:element name="username" type="xsd:string"/>
<xsd:element name="firstname" type="xsd:string"/>
<xsd:element name="lastname" type="xsd:string"/>
<xsd:element name="email" type="xsd:string"/>
<xsd:element name="institution" type="xsd:string"/>
<xsd:element name="department" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="country" type="xsd:string"/>
<xsd:element name="idnumber" type="xsd:string"/>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="message" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="UpdateUserNameResponse">
<xsd:all>
<xsd:element name="userid" type="xsd:string"/>
<xsd:element name="username" type="xsd:string"/>
<xsd:element name="message" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="CreateUpdateUserRequest">
<part name="username" type="xsd:string"/>
<part name="firstname" type="xsd:string"/>
<part name="lastname" type="xsd:string"/>
<part name="email" type="xsd:string"/>
<part name="institution" type="xsd:string"/>
<part name="department" type="xsd:string"/>
<part name="city" type="xsd:string"/>
<part name="country" type="xsd:string"/>
<part name="idnumber" type="xsd:string"/>
</message>
<message name="CreateUpdateUserResponse">
<part name="return" type="tns:CreateUpdateUserResponse[]" />
</message>
<message name="UpdateUserNameRequest">
<xsd:element name="userid" type="xsd:string"/>
<xsd:element name="username" type="xsd:string"/>
</message>
<message name="UpdateUserNameResponse">
<part name="return" type="tns:UpdateUserNameResponse[]" />
</message>
<portType name="CreateUpdateUserPort">
<operation name="CreateUpdateUser">
<input message="tns:CreateUpdateUserRequest" />
<output message="tns:CreateUpdateUserResponse" />
</operation>
<operation name="UpdateUserName">
<input message="tns:UpdateUserNameRequest" />
<output message="tns:UpdateUserNameResponse" />
</operation>
</portType>
<binding name="CreateUpdateUserBinding" type="tns:CreateUpdateUserPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="CreateUpdateUser">
<soap:operation soapAction="urn:CreateUpdateUserAction" />
<input>
<soap:body use="encoded" namespace="urn:CreateUpdateUser" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:CreateUpdateUser" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
<operation name="UpdateUserName">
<soap:operation soapAction="urn:UpdateUserNameAction" />
<input>
<soap:body use="encoded" namespace="urn:UpdateUserName" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:UpdateUserName" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="CreateUpdateUserService">
<port name="CreateUpdateUserPort" binding="tns:CreateUpdateUserBinding">
<soap:address location="http://localhost/moodle19/service/server.php" />
</port>
</service>
</definitions>
我搜索了谷歌但找不到任何解决方案。我确信这个WSDL中缺少一些东西,但不知道是什么。