首页 文章

@SchemaValidation无法从wsdl加载架构

提问于
浏览
0

我正在使用JavaSE 6手动部署webservice . 我想使用@SchemaValidation来验证SOAP流量 . 在发布 endpoints 期间,我收到错误:

引起:org.xml.sax.SAXParseException:s4s-att-invalid-value:元素'restriction'中'base'的属性值无效 . 记录原因:UndeclaredPrefix:无法将'xsd:string'解析为QName:未声明前缀'xsd' .

为什么名称空间前缀在属性值中没有解析?

这是我的WSDL部分:

<wsdl:definitions xmlns:tm =“http://microsoft.com/wsdl/mime/textMatching/”xmlns:soapenc =“http://schemas.xmlsoap.org/soap/encoding/”xmlns:mime =“http ://schemas.xmlsoap.org/wsdl/mime/“xmlns:tns =”CorporateFinances.CFIntegration“xmlns:soap =”http://schemas.xmlsoap.org/wsdl/soap/“xmlns:s =”http: //www.w3.org/2001/XMLSchema“xmlns:soap12 =”http://schemas.xmlsoap.org/wsdl/soap12/“xmlns:http =”http://schemas.xmlsoap.org/wsdl/http /“xmlns:wsdl =”http://schemas.xmlsoap.org/wsdl/“targetNamespace =”CorporateFinances.CFIntegration“>

<wsdl:types>

<xsd:schema xmlns:xsd =“http://www.w3.org/2001/XMLSchema”xmlns =“CorporateFinances.CFIntegration”targetNamespace =“CorporateFinances.CFIntegration”elementFormDefault =“qualified”attributeFormDefault =“unqualified”version =“ 20180920" >

...

<xsd:restriction base =“xsd:string”> ...

1 回答

  • 0

    问题是由类路径中旧版本的xalan.jar引起的 . 在将xalan.jar更新为新版本后,错误不再出现 .

相关问题