SOAP通信とはなんぞや
SOAPメッセージの具体的やりとり例
一例として、あるSOAPクライアントが、架空のショッピングサイトのWebサービスから商品データを整形してSOAPメッセージとして要求する(SOAPリクエスト)際、SOAPメッセージはおおよそ以下のようになる。
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <getProductDetails xmlns="http://warehouse.example.com/ws"> <productId>827635</productId> </getProductDetails> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
これに対し、ショッピングサイトのWebサービス側が、要求に基づいて商品データを返信する場合はこのようなSOAPメッセージとなる。
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <getProductDetailsResponse xmlns="http://warehouse.example.com/ws"> <getProductDetailsResult> <productName>Toptimate 3-Piece Set</productName> <productId>827635</productId> <description>3-Piece luggage set. Black Polyester.</description> <price>100.50</price> <inStock>true</inStock> </getProductDetailsResult> </getProductDetailsResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
とのこと
実際の内容は、XMLをベースに、SOAPオリジナルのルールを制定してデータの処理を行うって感じかな。