サーバおよびクライアントがSOAPメッセージを送信する場合に,扱う複合型データ(構造体)を埋め込み形式または参照形式(ID-REF型)のどちらの形式にするかを設定できます。
埋め込み形式と参照形式は,動作定義ファイルに「do_multirefs」キーを追加して設定します。デフォルトの動作は埋め込み形式です。次に,埋め込み形式および参照形式(ID-REF型)のSOAPメッセージの例を示します。
<soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Body>
<ns1:test1 xmlns:ns1="http://XMLschemaType2.test">
<in0>
<str1>string</str1>
<b1>true</b1>
<f1>10.0</f1>
<d1>40.0</d1>
<BD1>123</BD1>
<TI1>88</TI1>
<by2>QEFC</by2>
<QN1>
<namespaceURI></namespaceURI>
<localPart>QName</localPart>
</QN1>
<BI1>456</BI1>
<l1>30</l1>
<i1>43</i1>
<s1>20</s1>
<by1>48</by1>
<da1>99</da1>
</in0>
</ns1:test1>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Body>
<ns1:test1 xmlns:ns1="http://XMLschemaType2.test">
<in0 href="#id0"/>
</ns1:test1>
<multiRef id="id0"
soapenc:root="0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/:encodingStyle">
<str1>string</str1>
<b1>true</b1>
<f1>10.0</f1>
<d1>40.0</d1>
<BD1>123</BD1>
<TI1>88</TI1>
<by2>QEFC</by2>
<QN1 href="#id1"/>
<BI1>456</BI1>
<l1>30</l1>
<i1>43</i1>
<s1>20</s1>
<by1>48</by1>
<da1>99</da1>
</multiRef>
<multiRef id="id1"
soapenc:root="0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<namespaceURI></namespaceURI>
<localPart>QName</localPart>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>