0
我的问题听起来很奇怪,但需要确认。wsdl是否需要成为有效的wsdl文件才能正常工作
我从客户端收到以下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
必须是有效的。我应该回到客户端来纠正它吗?
您得到哪些验证错误? – MiMo
所有验证错误都与'NCName'有关。像“12WebService”这样的名称不能以数字开头。 –