English 中文(简体)
iii
原标题:xsi:type in doc literal format

虽然在正常情况下Xsi:在字面上的WSDL sSOAP电文中并未出现这种类型,但在有些情况下,类型信息是必要的,并且会出现在多种形态中,例如。 如果APIC预期会有一个基类,并发出一个延期检查,则必须提供这种检查的类型,以适当淡化物体。

我的问题是: • 发送Xsi的效用如何? 是否能够找到官方答案(积极的/消极的)? 你们的想法是什么?

例如:

<Device xsi:type="ns1:DeviceID">value</Device>

而不是

<Device>value</Device>
问题回答

<条码>xsi: 类型属性通常没有必要,因为WSDL s 类型/代码栏所载XSD表足以说明所有要素的类型。

但认为有时需要将某一领域或要素作为任何类型的要素(xsd:anyType),以便你能够使用多种形态(如你提到的那样)。

例如,你可能有一个网络服务,在XML领域内向它发出一些指令,标有<代码>xsd:anyType。 这种服务没有具体说明设计时间的数据类型,因此,在操作时间必须提供类型信息。

当然,这种服务并不绝对接受任何类型的服务,而是采用一套预先界定的类型(即,你不只给它带来任何伤害;从一套指挥类型上进行正当指挥)。

但XML部分只是通信。 最终,在客户/服务商法典中,你必须做一些与这种类型的计划性工作。 这意味着将<代码>xsd:anyType改为节目编排语言的物体。

WSDL-To-Code工具通常将xsd:anyType 至上 目标类别,坦率地说是有用的。 为此原因,一个<代码>xsd:anyType始终与一个xsi: 类型一起序列化,其中具体指明了实际类型,以便您的代码了解其中的舱面。

关于发送<代码>xsi: 类型以斜体/立体格式表示,我的回答是:我认为是有效的。 WSDL和SOAP的规格没有具体提到这一点(禁止它),而WS-Interoperability规格允许这样做。

因此,我想xsi:type 这不是积极的或消极的,而只是工作的工具。





相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签