WSDL的标签
? ?WSDL端口
? <portType>元素描述一個web service,可執行的操作,已經現骨干的消息。
?端口定義了指向某個web service的連接點??梢园稍乇茸鱾鹘y編程員中的一個函數庫(或一個模塊,或一個類),而吧每個操作比作傳統編程語言中國的一個函數。
? ?one-way ?可接受消息,但是不會返回響應
? ?Request-response 接受請求并返回一個響應
? ?solicit-response ?發送一個請求,等待一個響應
? ?notification ?發送一條消息,但不會等待響應
One-Way 操作
一個 one-way 操作的例子:
<message name="newTermValues"><part name="term" type="xs:string"/><part name="value" type="xs:string"/> </message><portType name="glossaryTerms"><operation name="setTerm"><input name="newTerm" message="newTermValues"/></operation> </portType >在這個例子中,端口 "glossaryTerms" 定義了一個名為 "setTerm" 的 one-way 操作。
這個 "setTerm" 操作可接受新術語表項目消息的輸入,這些消息使用一條名為 "newTermValues" 的消息,此消息帶有輸入參數 "term" 和 "value"。不過,沒有為這個操作定義任何輸出。
Request-Response 操作
一個 request-response 操作的例子:
<message name="getTermRequest"><part name="term" type="xs:string"/> </message><message name="getTermResponse"><part name="value" type="xs:string"/> </message><portType name="glossaryTerms"><operation name="getTerm"><input message="getTermRequest"/><output message="getTermResponse"/></operation> </portType>在這個例子中,端口 "glossaryTerms" 定義了一個名為 "getTerm" 的 request-response 操作。
"getTerm" 操作會請求一個名為 "getTermRequest" 的輸入消息,此消息帶有一個名為 "term" 的參數,并將返回一個名為 "getTermResponse" 的輸出消息,此消息帶有一個名為 "value" 的參數。
總結
- 上一篇: SOAP HTTP绑定
- 下一篇: WSDL 绑定