WSDL โยง

การเชื่อมโยง WSDL สามารถกำหนดรูปแบบของข้อความและรายละเอียดของการประกาศสำหรับ web service

เชื่อมโยงกับ SOAP

หนึ่ง คำขอ - ตอบ ตัวอย่างการปฏิบัติ

<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>
<binding type="glossaryTerms" name="b1">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
  <operation>
    <soap:operation
     soapAction="http://example.com/getTerm" />
    <input>
      <soap:body use="literal" />
    </input>
    <output>
      <soap:body use="literal" />
    </output>
  </operation>
</binding>

binding องค์ประกอบมีสองคุณสมบัติ - คุณสมบัติ name และ type

คุณสมบัติ name กำหนดชื่อ binding และ type หนุนต้นทางที่ใช้สำหรับ binding ในตัวอย่างนี้คือ "glossaryTerms" ประตู

soap:binding องค์ประกอบมีสองคุณสมบัติ - คุณสมบัติ style และ transport

คุณสมบัติ style สามารถมีค่า "rpc" หรือ "document" ในตัวอย่างนี้เราใช้ document คุณสมบัติ transport กำหนดโปรโตคอล SOAP ที่จะใช้ ในตัวอย่างนี้เราใช้ HTTP

operation องค์ประกอบนี้กำหนดการปฏิบัติการที่ทุกประตูให้

สำหรับการกระทำทุกอย่าง ต้องทำการกำหนดพฤติกรรม SOAP ที่เกี่ยวข้อง และคุณจำเป็นต้องเข้ารหัสอินพุทและออกพุท ในตัวอย่างนี้เราใช้ "literal"