ส่วน <service> element เป็นส่วนที่กำหนด URL ของ web service ที่ให้บริการ ซึ่งตัวอย่างของการใช้งาน <service> element มีดังนี้
<service name="glossaryService"> <port name="glossaryPort" binding="b1"> <soap:address location="http://example.com/glossary_term.php" /> </port> </service>
ซึ่ง <service> element ประกอบไปด้วย attribute เพียงตัวเดียวเท่านั้นก็คือ name ซึ่งเป็นตัวกำหนดชื่อของ service
ภายใน <service> element ประกอบไปด้วย element <port> ซึ่งเป็นส่วนที่ใช้กำหนดว่า web service นี้เชื่อมต่อกับ port ใด โดยจะกำหนดผ่าน <port> element ซึ่งใน element นี้ประกอบไปด้วย attribute 2 ตัวก็คือ name (ชื่อของ port) และ binding (ชื่อของ binding ที่เราต้องการให้ service ทำการติดต่อกับมัน)
Login
Search