有关WSDL绑定的详细信息 [英] Details on WSDL bindings

查看:150
本文介绍了有关WSDL绑定的详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习来自在线文档的WSDL ,其中提到:

I am learning WSDL from online documentation, there it is mentioned that:


绑定必须指定一个协议。

A binding MUST specify exactly one protocol.

绑定不得指定地址信息。

A binding MUST NOT specify address information.

给出的示例是:

<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetLastTradePrice">
           <soap:operation soapAction="http://example.com/GetLastTradePrice"/>
           <input>
               <soap:body use="literal"/>
           </input>
           <output>
               <soap:body use="literal"/>
           </output>
        </operation>
    </binding>

这意味着协议以及如何这个映射在这个例子中?另外地址 WSDL 必须不指定?

What it means a protocol and how is this mapped in this example? Also what address the WSDL must not specify?

推荐答案

所以SOAP是您通过网络发送的xml消息。您可以通过多种方式在网络上发送此SOAP消息。这种机制称为传输协议。

So SOAP is a xml message that you send across the network. There are various way that you can send this SOAP message across the network. This mechanism is called the transport protocol.

传统上你会使用HTTP作为传输协议,但没有什么能阻止你通过JMS发送SOAP消息(Java Message Queue) ,SMTP(简单邮件传输协议)甚至普通套接字。

Traditionally you would use HTTP as the transport protocol however there is nothing stopping you from sending a SOAP message over JMS(Java Message Queue) , SMTP (Simple Mail Transfer Protocol) or even a plain socket.

基本上,当您在WSDL中定义协议时,它说我将使用定义的协议发送此消息在WSDL中。在您的示例中,WSDL明确声明它将使用HTTP协议,此部分包含以下信息: transport =http://schemas.xmlsoap.org/soap/http

Essentially when you define the protocol in the WSDL it is saying I will send this message using the protocol defined in the WSDL. In your example the WSDL clearly states it will use the HTTP protocol this section here contains the information: transport="http://schemas.xmlsoap.org/soap/http"

关于SOAP的维基百科条目一个包含更多细节的传输部分。

This Wikipedia Entry on SOAP has a transport section that carries more detail.

绑定处理XML如何通过网络传输以及它将使用哪种样式。发送SOAP消息的方式有多种,例如document,literal和RPC。这都与如何不在哪里有关。 WSDL中的服务和端口元素处理我可以在哪里找到服务等。这就是为什么你不在绑定部分但在端口和服务部分中指定Web服务地址。

The binding deals with how the XML is transported over the network and which style it will be using. There are various styles of sending SOAP messages such as document, literal and RPC. This is all got to do with how not where. The service and port elements in the WSDL deals with where I can find the service etc. So that is why you dont specify the web service address in the binding section but in the port and service section.

阅读不同的风格也不错。请参阅本文,深入了解RPC,Literal和Document术语。

It would be good to read up about the different styles as well. See this article to get a insight into RPC,Literal and Document terminology.

这篇关于有关WSDL绑定的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆