Web Services Platform Architecture [Electronic resources] : SOAP, WSDL, WS-Policy, WS-Addressing, WS-BPEL, WS-Reliable Messaging, and More نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Web Services Platform Architecture [Electronic resources] : SOAP, WSDL, WS-Policy, WS-Addressing, WS-BPEL, WS-Reliable Messaging, and More - نسخه متنی

Steve Mills

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







5.3. Example


As an example of the concepts just presented, assume that a service requester intends to invoke the "GetStockQuote" operation on the following endpoint reference:


<wsa:EndpointReference xmlns:exp="..." xmlns:tns="..."
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsa:Address>http://www.example.com/stq</wsa:Address>
<wsa:ReferenceProperties>
<exp:customer-id>xgtopsnlk-0001<exp:customer-id>
</wsa:ReferenceProperties>
<wsa:ReferenceParameters>
<exp:model-id>llp-11<exp:model-id>
</wsa:ReferenceParameters>
<wsa:PortType>tns:StockQuotePortType</wsa:PortType>
<wsa:ServiceName PortName="StockQuotePort">
tns:StockQuoteService
</wsa:ServiceName>
</wsa:EndpointReference>

Using the information on the endpoint reference (Address, Reference Properties, and Reference Parameters) and the Action values encoded in the operation definition (as in the preceding example), a SOAP request message would be as follows (assuming that the port "StockQuotePort" provides a standard SOAP binding):


<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:exp="... ">
<S:Header>
<wsa:MessageID>uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff
</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>
http://stq-services.com/requester
</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://www.example.com/stq</wsa:To>
<wsa:Action>http://example.com/GetQuote</wsa:Action>
<exp:model-id>llp-11<exp:model-id>
<exp:customer-id>xgtopsnlk-0001<exp:customer-id>
</S:Header>
<S:Body>
... <!ticker symbol >
</S:Body>
</S:Envelope>

Observe how the reference properties and parameters are serialized as SOAP headers in the SOAP envelope. The response from the endpoint is formulated using the values of the ReplyTo and MessageId headers in addition to the Action for the output message provided by the WSDL definition of the operation. It would be as follows:


<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:exp="... ">
<S:Header>
<wsa:RelatesTo> uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff
</wsa:RelatesTo>
<wsa:To>http://stq-services.com/requester</wsa:To>
<wsa:Action>http://example.com/Quote</wsa:Action>
</S:Header>
<S:Body>
... <!quote >
</S:Body>
</S:Envelope>


    / 149