用于纯 XML 而不是 SOAP 的 WSDL 服务 [英] WSDL service for plain XML instead of SOAP
本文介绍了用于纯 XML 而不是 SOAP 的 WSDL 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我能否拥有一个只使用纯 XML 数据而不使用 SOAP 的 WSDL?
Can I have a WSDL which will just use plain XML data and not SOAP?
如果可以,请给我一个示例 WSDL?
If so could you please provide me a sample WSDL?
推荐答案
是的,可以在 WSDL 中描述通过 HTTP 发送纯 XML 数据.在定义操作的绑定时,不要使用
,而是使用
.例如:
Yes, sending plain XML data over HTTP can be described in WSDL. Instead of using <soap:binding>
when defining your operation's binding, you would instead use <http:binding>
. For example:
<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">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:example">
<element name="content">
<complexType>
<sequence>
<element name="first" type="string"/>
<element name="second" type="integer"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="id">
<part name="id" type="xsd:string"/>
</message>
<message name="info">
<part name="info" type="tns:content"/>
</message>
<portType name="widgetPortType">
<operation name="getInfo">
<input message="tns:id"/>
<output message="tns:info"/>
</operation>
</portType>
<binding name="binding" type="tns:widgetPortType">
<http:binding verb="POST"/>
<operation name="getInfo">
<http:operation location="getInfo"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml/>
</output>
</operation>
</binding>
<service name="widgetService">
<port name="port" binding="tns:binding">
<http:address location="http://www.example.org/"/>
</port>
</service>
</definitions>
您可以在此处找到有关使用 HTTP 绑定的其他信息:http://docs.oracle.com/cd/E19182-01/821-0830/cnfg_http-bc-get-processing_r/index.html
You can find additional information about using an HTTP binding here: http://docs.oracle.com/cd/E19182-01/821-0830/cnfg_http-bc-get-processing_r/index.html
这篇关于用于纯 XML 而不是 SOAP 的 WSDL 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文