JIS X 7362:2010 Webサービス相互運用性―WS-I アタッチメントプロファイル 1.0 | ページ 6

22
X 7362 : 2010 (ISO/IEC 29362 : 2008)
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
結果として生成される "SendClaim" のdocument/literalオペレーションに対する入力メッセージ
は,次のとおり。
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIMEboundary; type=text/xml;
start="<rootpart@example.com>"
Content-Description: This is the optional message description.
--MIMEboundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@example.com>
<・xml version='1.0' ・>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body xmlns:types="http://example.com/mimetypes">
<types:ClaimDetail>
<Name>...</Name>
<ClaimForm>cid:claimform@example.com</ClaimForm>
</types:ClaimDetail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--MIMEboundary
Content-Type: text/xml
Content-Transfer-Encoding: 8bit
Content-ID: <claimform@example.com>
...claim form referenced by the swaRef...
--MIMEboundary
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <ClaimPhoto=4d7a5fa2-14af-451c-961b-5c3abf786796@example.com>

――――― [JIS X 7362 pdf 26] ―――――

                                                                                             23
X 7362 : 2010 (ISO/IEC 29362 : 2008)
...MIME attachment of binary photograph...
--MIMEboundary--
結果として生成される "SendClaim" のdocument/literalオペレーションに対する出力メッセージ
は,次のとおり。
MIME-Version: 1.0
Content-Type: text/xml; charset=UTF-8
<・xml version='1.0' ・>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body xmlns:types="http://example.com/mimetypes">
<types:ClaimRefNo>...............</types:ClaimRefNo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

4.5 ルートパートの指定

  SOAP Messages with Attachmentsは,multipart/relatedパッケージのルートパートがSOAPエンベロープを
含まなければならないと要求している。しかし,WSDLのMIMEバインディングはそれをどう記述するか
明確ではない。
R2911 DESCRIPTION中のmime:multipartRelated要素は,その子要素であるmime:part
要素の中で,soapbind:bodyを子要素として含むmime:part要素を,厳密に1個もた
なければならない (MUST)。〔明確化〕
WSDLのMIMEバインディングでは,soapbind:body要素を含むmime:part要素が,SOAP Messages
with Attachmentsで要求されているルートMIMEパートを記述する。
次に例を示す。
間違っている例 :
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://example.com/mimewsdl"
xmlns:tns="http://example.com/mimewsdl">
...

――――― [JIS X 7362 pdf 27] ―――――

24
X 7362 : 2010 (ISO/IEC 29362 : 2008)
<wsdl:binding name="aBinding" type="tns:aPortType">
<soapbind:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="anOperation">
<soap:operation soapAction="http://example.com/soapaction"/>
<wsdl:input>
<mime:multipartRelated>
<mime:part>
<soapbind:body use="literal"
namespace="http://example.com/mimetypes"/>
</mime:part>
<mime:part>
<soapbind:body use="literal"
namespace="http://example.com/mimetypes"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>

4.6 ルートパートにおけるSOAPヘッダの指定

  WSDL 1.1は,soapbind:header要素がsoapbind:body要素と一緒にmime:part要素の子要素と
して同居することが許されるかどうか規定していない。SOAP Messages with Attachmentsはマルチパートメ
ッセージのルートパートがSOAPエンベロープを含むことを要求しているが,WSDL 1.1はこのパートを
どのように記述するかについて明らかではない。WSDL 1.1はmime:part要素がmultipart/relatedメッセ
ージの個々のパートを記述するのに使われることを規定しているので,マルチパートメッセージのルート
パートを表すmime:part要素の内容は,WSDL MIMEバインディング拡張がなかった場合と同様,
soapbind:body要素及びsoapbind:header要素を含めたSOAPエンベロープを完全に記述しなけれ
ばならない。
R2905 DESCRIPTION中のsoapbind:header要素は,mime:part要素の子要素として含ま
れてもよい (MAY)。〔明確化〕
R2906 DESCRIPTION中のsoapbind:header要素は,ルートパート(soapbind:body要素
をもつ。)ではないmime:part要素に含まれてはならない (MUST NOT)。〔明確化〕

――――― [JIS X 7362 pdf 28] ―――――

                                                                                             25
X 7362 : 2010 (ISO/IEC 29362 : 2008)
次に例を示す。
間違っている例 :
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://example.com/mimewsdl"
xmlns:tns="http://example.com/mimewsdl">
...
<wsdl:binding name="aBinding" type="tns:aPortType">
<soapbind:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="anOperation">
<soap:operation soapAction="http://example.com/soapaction"/>
<wsdl:input>
<mime:multipartRelated>
<mime:part>
<soapbind:body use="literal"
namespace="http://example.com/mimetypes"/>
</mime:part>
<mime:part>
<soapbind:header message="tns:headerMessage"
part="aPart"
use="literal"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>

4.7 MIMEバインディングスキーマの修正

  WSDL 1.1とWSDLのMIMEバインディングのスキーマとの間には幾つかの不整合がある。mime:part
要素の場合,スキーマは間違って局所要素宣言と定義しており,また,間違ってWSDL 1.1には記述がな

――――― [JIS X 7362 pdf 29] ―――――

26
X 7362 : 2010 (ISO/IEC 29362 : 2008)
いname属性を追加している。
WSDL MIMEバインディング拡張スキーマに対する,ここで示したものを含む修正は
"http://ws-i.org/profiles/basic/1.1/wsdlmime-2004-08-24.xsd" にある改訂版のスキーマに反映されている。
R2907 DESCRIPTION中のMIMEパートは,WSDL MIMEバインディング拡張の名前空間中の,
partという局所名 (local name) をもつ要素を使って定義されなければならない
(MUST)。〔明確化〕
R2908 DESCRIPTION中のmime:part要素は,name属性をもってはならない (MUST NOT)。

4.8 代替メディア型の指定

  mime:part要素の子要素として複数のmime:content要素があった場合,それは参照される
wsdl:part要素の許容可能な代替シリアライゼーション形式とみなされる。
R2909 DESCRIPTION中のmime:part要素の子要素となる複数のmime:content要素は,同
一のwsdl:part要素を参照しなければならない (MUST)。
次に例を示す。
間違っている例 :
<mime:part>
<mime:content part="ns:foo" type="image/jpeg"/>
<mime:content part="ns:bar" type="image/jpeg"/>
</mime:part>
正しい例 :
<mime:part>
<mime:content part="ns:foo" type="image/jpeg"/>
<mime:content part="ns:foo" type="image/gif"/>
</mime:part>

4.9 WSDLのpart要素

        R2910 DESCRIPTION中のmime:content要素は,type属性又はelement属性のいずれか
の属性を使って定義されたwsdl:part要素を参照しなければならない (MUST)。
R2942 MESSAGE中で,mime:content要素にバインドされたメッセージのパートで
(wsdl:part要素のelement属性を使って)大域要素宣言を参照するものは,その
MIMEパートの中に,参照された要素に記述された内容をルート要素としてもつXML情
報セット (infoset) のシリアライゼーションとして,シリアライズされなければならない
(MUST)。
R2943 DESCRIPTION中で,mime:content要素にバインドされたメッセージのパートで
(wsdl:part要素のtype属性を使って)型宣言を参照する場合,そのtype属性の値

――――― [JIS X 7362 pdf 30] ―――――

次のページ PDF 31

JIS X 7362:2010の引用国際規格 ISO 一覧

  • ISO/IEC 29362:2008(IDT)

JIS X 7362:2010の国際規格 ICS 分類一覧

JIS X 7362:2010の関連規格と引用規格一覧