欧美特黄不卡,涩涩视频在线,成人国产精品一区二区网站,亚洲一区二区三区欧美

當(dāng)前位置:雨林木風(fēng)下載站 > 技術(shù)開發(fā)教程 > 詳細頁面

soap規(guī)范(3)

soap規(guī)范(3)

更新時間:2022-05-01 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):

以下是一個同時具有簡單和復(fù)雜成員類型的例子。它顯示兩層引用。注意"Author"accssor元素的"href"屬性是對相應(yīng)具有"id"屬性的值的引用。"Address"與之類似。

<e:Book>
 <title>My Life and Work</title>
 <author href="#Person-1"/>
</e:Book>
<e:Person id="Person-1">
 <name>Henry Ford</name>
 <address href="#Address-2"/>
</e:Person>
<e:Address id="Address-2">
 <email>mailto:henryford@hotmail.com</email>
 <web>http://www.henryford.com</web>
</e:Address>

當(dāng)"Person"的值和"Address"的值是multi-reference時,上面的形式是正確的。如果它們是single-reference,就必須用嵌入的形式,如下所示:

<e:Book>
 <title>My Life and Work</title>
 <author>
 <name>Henry Ford</name>
 <address>
<email>mailto:henryford@hotmail.com</email>
<web>http://www.henryford.com</web>
 </address>
 </author>
</e:Book>
如果添加一個限制,任意兩個人都不會有相同的地址,并且地址可以是街道或Email地址,一本書可以有兩個作者,編碼如下:

<e:Book>
 <title>My Life and Work</title>
 <firstauthor href="#Person-1"/>
 <secondauthor href="#Person-2"/>
</e:Book>
<e:Person id="Person-1">
 <name>Henry Ford</name>
 <address xsi:type="m:Electronic-address">
 <email>mailto:henryford@hotmail.com</email>
 <web>http://www.henryford.com</web>
 </address>
</e:Person>
<e:Person id="Person-2">
 <name>Samuel Crowther</name>
 <address xsi:type="n:Street-address">
 <street>Martin Luther King Rd</street>
 <city>Raleigh</city>
 <state>North Carolina</state>
 </address>
</e:Person>

序列化可以包含對不在同一個資源的值的引用:

<e:Book>
 <title>Paradise Lost</title>
 <firstauthor href="http://www.dartmouth.edu/~milton/"/>
</e:Book>

以下是描述上面結(jié)構(gòu)的schema片斷:

<element name="Book" type="tns:Book"/>
<complexType name="Book">
 <!-- Either the following group must occur or else the
href attribute must appear, but not both. -->
 <sequence minOccurs="0" maxOccurs="1">
 <element name="title" type="xsd:string"/>
 <element name="firstauthor" type="tns:Person"/>
 <element name="secondauthor" type="tns:Person"/>
 </sequence>
 <attribute name="href" type="uriReference"/>
 <attribute name="id" type="ID"/>
 <anyAttribute namespace="##other"/>
</complexType>

<element name="Person" base="tns:Person"/>
<complexType name="Person">
 <!-- Either the following group must occur or else the
href attribute must appear, but not both. -->
 <sequence minOccurs="0" maxOccurs="1">
 <element name="name" type="xsd:string"/>
 <element name="address" type="tns:Address"/>
 </sequence>
 <attribute name="href" type="uriReference"/>
 <attribute name="id" type="ID"/>
 <anyAttribute namespace="##other"/>
</complexType>

<element name="Address" base="tns:Address"/>
<complexType name="Address">
 <!-- Either the following group must occur or else the
href attribute must appear, but not both. -->
 <sequence minOccurs="0" maxOccurs="1">
 <element name="street" type="xsd:string"/>
 <element name="city" type="xsd:string"/>
 <element name="state" type="xsd:string"/>
 </sequence>
 <attribute name="href" type="uriReference"/>
 <attribute name="id" type="ID"/>
 <anyAttribute namespace="##other"/>
</complexType>

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

主站蜘蛛池模板: 兴宁市| 城口县| 龙南县| 瓦房店市| 灵台县| 万荣县| 方城县| 永春县| 海门市| 斗六市| 永德县| 万源市| 安福县| 马边| 漳浦县| 隆尧县| 达尔| 宝坻区| 浦县| 洛南县| 杭锦旗| 泗水县| 宁陕县| 杂多县| 如东县| 巴彦县| 阳谷县| 临湘市| 广元市| 商水县| 周口市| 崇义县| 抚宁县| 朝阳区| 静安区| 漠河县| 屏东市| 桂阳县| 金湖县| 广东省| 曲沃县|