XML 命名空间中用冒号分隔的几个单词的含义是什么?
我正在尝试使用一些 XML(SOAP -> WSDL 服务请求),其中我有一个 XML 模式,其命名空间如下:
NWMLS:EverNet:ImageQuery:1.0
<xs:schema id="ImageQuery_1.0"
targetNamespace="NWMLS:EverNet:ImageQuery:1.0"
xmlns="NWMLS:EverNet:ImageQuery:1.0"
xmlns:mstns="NWMLS:EverNet:ImageQuery:1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified" elementFormDefault="qualified"> ...remainder of xsd...
我不断从我请求的 Web 服务中收到此错误:
Could not find schema information for the element 'NWMLS:EverNet:ImageQuery:1.0:ImageQuery'.
有人可以帮助我理解这样的格式化命名空间,也许可以给我一些阅读材料吗?我已经找了好几个小时了。谢谢!
I am trying to work with some XML (a SOAP -> WSDL service request) in which I have an XML schema with the namespace like:
NWMLS:EverNet:ImageQuery:1.0
<xs:schema id="ImageQuery_1.0"
targetNamespace="NWMLS:EverNet:ImageQuery:1.0"
xmlns="NWMLS:EverNet:ImageQuery:1.0"
xmlns:mstns="NWMLS:EverNet:ImageQuery:1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified" elementFormDefault="qualified"> ...remainder of xsd...
I keep getting this error from the web service I am requesting:
Could not find schema information for the element 'NWMLS:EverNet:ImageQuery:1.0:ImageQuery'.
Can someone please help me understand formatting namespaces like this, and perhaps point me to some reading? I have been looking for several hours. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有任何意义。它只是一个字符串。您收到错误是因为服务不知道与命名空间对应的架构。
There is no meaning. It's just a string. You get the error because the service doesn't know about the schema corresponding to the namespace.
像 xmlns:mstns="NWMLS:EverNet:ImageQuery:1.0" 这样的构造从前缀 (mstns) 映射到命名空间 URI(据称是 NWMLS:EverNet:ImageQuery:1.0)。
RFC2396 定义语法或 URI。这里有一个完全有效的非分层 URI,具有 NWMLS 方案。
您的错误消息表明您没有具有 URI targetNamespace 的 W3C XML 架构。 URI 只是一个唯一标识模式的字符串。
它与语法或格式无关。事实上,它有一个非常简单的语法:NWMLS 是方案,其他一切都只是一个不透明的块。
A construct like xmlns:mstns="NWMLS:EverNet:ImageQuery:1.0" is mapping from a prefix (mstns) to a namespace URI (purported to be NWMLS:EverNet:ImageQuery:1.0).
RFC2396 defines the syntax or a URI. What you have here is a perfectly valid non-hierarchical URI with a scheme of NWMLS.
Your error message indicates that you just don't have a W3C XML Schema with targetNamespace of the URI. The URI is just a string that uniquely identifies the schema.
It has nothing to do with the syntax or format. In fact, it has a very simple syntax: NWMLS is the scheme, and everything else is just an opaque lump.