微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xml – 未绑定元素“xsd:schema”的前缀“xsd”

我收到了这个WSDL,我遇到了XSD的问题.

我似乎无法在我的XSD文件中找到问题.

什么没约束?
我怎么解决这个问题?

error: The prefix "xsd" for element "xsd:schema" is not bound.

这是XSD文件的一部分:

<xsd:schema targetNamespace="http://www.informatica.com/wsdl/"
             elementFormDefault="qualified"
             attributeFormDefault="unqualified"
             xmlns="http://www.informatica.com/wsdl/"
             xmlns:infatype="http://www.informatica.com/types/">
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/http/"/>
         <xsd:element name="SHA003Bis_GetArticleDataResponse"
                      type="SHA003Bis_GetArticleDataResponseType"/>
         <xsd:element name="SHA003Bis_GetArticleDataRequest"
                      type="SHA003Bis_GetArticleDataRequestType"/>
         <xsd:complexType name="SHA003Bis_GetArticleDataRequestType">
            <xsd:sequence>
               <xsd:element name="SHA003Bis_GetArticleDataRequestElement">
                  <xsd:complexType>
                     <xsd:sequence>
                        <xsd:element name="Company" minOccurs="0" maxOccurs="1">
                           <xsd:simpleType>
                              <xsd:restriction base="xsd:integer"/>
                           </xsd:simpleType>
                        </xsd:element>

这是WSDL的一部分:

<wsdl:deFinitions targetNamespace="http://www.informatica.com/" 
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
                  xmlns:n="http://www.informatica.com/wsdl/" 
                  xmlns:infa="http://www.informatica.com/" 
                  xmlns="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
      <xsd:schema targetNamespace="http://www.informatica.com/wsdl/"
                  elementFormDefault="qualified"
                  attributeFormDefault="unqualified"
                  xmlns="http://www.informatica.com/wsdl/"
                  xmlns:infatype="http://www.informatica.com/types/">
         <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/http/"/>
         <xsd:element name="SHA003Bis_GetArticleDataResponse"
                      type="SHA003Bis_GetArticleDataResponseType"/>
         <xsd:element name="SHA003Bis_GetArticleDataRequest"
                      type="SHA003Bis_GetArticleDataRequestType"/>
         <xsd:complexType name="SHA003Bis_GetArticleDataRequestType">
            <xsd:sequence>
               <xsd:element name="SHA003Bis_GetArticleDataRequestElement">
                  <xsd:complexType>
                     <xsd:sequence>
                        <xsd:element name="Company" minOccurs="0" maxOccurs="1">
                           <xsd:simpleType>
                              <xsd:restriction base="xsd:integer"/>
                           ...

解决方法

将xmlns:xsd =“http://www.w3.org/2001/XMLSchema”添加到XSD的根元素:

<xsd:schema targetNamespace="http://www.informatica.com/wsdl/"
              elementFormDefault="qualified" 
              attributeFormDefault="unqualified" 
              xmlns="http://www.informatica.com/wsdl/" 
              xmlns:infatype="http://www.informatica.com/types/"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema">

所以它可以独立于其包装物之外.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。