用于纯XML而不是SOAP的WSDL服务

前端之家收集整理的这篇文章主要介绍了用于纯XML而不是SOAP的WSDL服务前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我可以使用一个仅使用纯 XML数据而不是SOAP的WSDL?

如果可以,请给我一个示例WSDL?

是的,可以在WSDL中描述通过HTTP发送纯XML数据.而不是使用< soap:binding>在定义操作的绑定时,您可以使用< http:binding&gt ;.例如:
  1. <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:example" xmlns:tns="urn:example">
  2. <types>
  3. <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:example">
  4. <element name="content">
  5. <complexType>
  6. <sequence>
  7. <element name="first" type="string"/>
  8. <element name="second" type="integer"/>
  9. </sequence>
  10. </complexType>
  11. </element>
  12. </schema>
  13. </types>
  14.  
  15. <message name="id">
  16. <part name="id" type="xsd:string"/>
  17. </message>
  18.  
  19. <message name="info">
  20. <part name="info" type="tns:content"/>
  21. </message>
  22.  
  23. <portType name="widgetPortType">
  24. <operation name="getInfo">
  25. <input message="tns:id"/>
  26. <output message="tns:info"/>
  27. </operation>
  28. </portType>
  29.  
  30. <binding name="binding" type="tns:widgetPortType">
  31. <http:binding verb="POST"/>
  32. <operation name="getInfo">
  33. <http:operation location="getInfo"/>
  34. <input>
  35. <mime:content type="application/x-www-form-urlencoded"/>
  36. </input>
  37. <output>
  38. <mime:mimeXml/>
  39. </output>
  40. </operation>
  41. </binding>
  42.  
  43. <service name="widgetService">
  44. <port name="port" binding="tns:binding">
  45. <http:address location="http://www.example.org/"/>
  46. </port>
  47. </service>
  48.  
  49. </definitions>

您可以在这里找到有关使用HTTP绑定的其他信息:
http://docs.oracle.com/cd/E19182-01/821-0830/cnfg_http-bc-get-processing_r/index.html

猜你在找的XML相关文章