[英]Does a wsdl needs to be valid wsdl file in order for it to work
我的問題乍一看可能很奇怪,但需要確定。
我從客戶端收到以下wsdl,可以將其成功導入SoapUI並在應用程序中使用。 但是,當我嘗試驗證wsdl文件時,它將引發12個錯誤
<wsdl:types>
<schema targetNamespace="http://abc.com:9080/product/services/12WebService/types/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<element name="Message">
<complexType>
<sequence>
<any minOccurs="0"/>
</sequence>
</complexType>
</element>
</schema>
<schema targetNamespace="http://abc.com:9080/nproduct/services/12WebService/types/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<element name="Response">
<complexType>
<sequence>
<any minOccurs="0"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="Message">
<wsdl:part name="Message" element="types:Message"/>
</wsdl:message>
<wsdl:message name="Response">
<wsdl:part name="Response" element="types:Response"/>
</wsdl:message>
<wsdl:portType name="12WebServiceImpl">
<wsdl:operation name="process12">
<wsdl:input message="tns:Message" name="Message"/>
<wsdl:output message="tns:Response" name="Response"/>
<wsdl:fault message="tns:Response" name="Response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="12WebServiceSoapBinding" type="tns:12WebServiceImpl">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process12">
<wsdlsoap:operation soapAction="http://abc.com:9080/product/services/12WebService/process12"/>
<wsdl:input name="Message">
<wsdlsoap:body namespace="http://abc.com:9080/product/services/12WebService" use="literal"/>
</wsdl:input>
<wsdl:output name="Response">
<wsdlsoap:body namespace="http://abc.com:9080/product/services/12WebService" use="literal"/>
</wsdl:output>
<wsdl:fault name="Response">
<wsdlsoap:body namespace="http://abc.com:9080/product/services/12WebService" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="12WebService">
<wsdl:port binding="tns:12WebServiceSoapBinding" name="12WebService">
<wsdlsoap:address location="http://abc.com:9080/product/services/12WebService"/>
</wsdl:port>
</wsdl:service>
因此, wsdl
是否需要有效。 我應該回到客戶那里去糾正它嗎?
我認為wsdl文件必須經過驗證。
XML命名規則: http : //www.w3schools.com/xml/xml_elements.asp
XML命名規則XML元素必須遵循以下命名規則:
名稱可以包含字母,數字和其他字符
名稱不能以數字或標點符號開頭
名稱不能以字母xml(或XML或Xml等)開頭
名稱不能包含空格
可以使用任何名稱,不保留任何單詞。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.