完整的 WSDL 语法

描述于 W3C 工作草案的完整 WSDL 1.2 语法已列在下面:

  1. <wsdl:definitions name="nmtoken"? targetNamespace="uri">
  2.  
  3. <import namespace="uri" location="uri"/> *
  4.  
  5. <wsdl:documentation .... /> ?
  6.  
  7. <wsdl:types> ?
  8. <wsdl:documentation .... /> ?
  9. <xsd:schema .... /> *
  10. </wsdl:types>
  11.  
  12. <wsdl:message name="ncname"> *
  13. <wsdl:documentation .... /> ?
  14. <part name="ncname" element="qname"? type="qname"?/> *
  15. </wsdl:message>
  16.  
  17. <wsdl:portType name="ncname"> *
  18. <wsdl:documentation .... /> ?
  19. <wsdl:operation name="ncname"> *
  20. <wsdl:documentation .... /> ?
  21. <wsdl:input message="qname"> ?
  22. <wsdl:documentation .... /> ?
  23. </wsdl:input>
  24. <wsdl:output message="qname"> ?
  25. <wsdl:documentation .... /> ?
  26. </wsdl:output>
  27. <wsdl:fault name="ncname" message="qname"> *
  28. <wsdl:documentation .... /> ?
  29. </wsdl:fault>
  30. </wsdl:operation>
  31. </wsdl:portType>
  32.  
  33. <wsdl:serviceType name="ncname"> *
  34. <wsdl:portType name="qname"/> +
  35. </wsdl:serviceType>
  36.  
  37. <wsdl:binding name="ncname" type="qname"> *
  38. <wsdl:documentation .... /> ?
  39. <-- binding details --> *
  40. <wsdl:operation name="ncname"> *
  41. <wsdl:documentation .... /> ?
  42. <-- binding details --> *
  43. <wsdl:input> ?
  44. <wsdl:documentation .... /> ?
  45. <-- binding details -->
  46. </wsdl:input>
  47. <wsdl:output> ?
  48. <wsdl:documentation .... /> ?
  49. <-- binding details --> *
  50. </wsdl:output>
  51. <wsdl:fault name="ncname"> *
  52. <wsdl:documentation .... /> ?
  53. <-- binding details --> *
  54. </wsdl:fault>
  55. </wsdl:operation>
  56. </wsdl:binding>
  57.  
  58. <wsdl:service name="ncname" serviceType="qname"> *
  59. <wsdl:documentation .... /> ?
  60. <wsdl:port name="ncname" binding="qname"> *
  61. <wsdl:documentation .... /> ?
  62. <-- address details -->
  63. </wsdl:port>
  64. </wsdl:service>
  65.  
  66. </wsdl:definitions>