SOAP 服务器如何确定它应该执行哪个操作? [英] How does the SOAP server determine which operation it should perform?

查看:38
本文介绍了SOAP 服务器如何确定它应该执行哪个操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下 SOAP 请求的 Body 元素中到底应该包含什么内容.我认为它应该是一个定义我想要调用的操作名称的元素.我还假设在这个元素内部应该有一个与这个操作的输入参数相对应的结构.

I would like to ask what exactly is supposed to be in the Body element of the SOAP request. I would assume that it should be an element defining the name of the operation which I want to invoke. I would also assume that inside this element there should be a structure corresponding to the input parameter of this operation.

但是,如果我采用以下 WSDL:http://adisrws.mfcr.cz/adistc/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP 并让 SoapUI 生成 getStatusNespolehlivyPlatce 操作的请求,请求的内容将是:

However, if I take the following WSDL: http://adisrws.mfcr.cz/adistc/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP and let SoapUI generate the request for the getStatusNespolehlivyPlatce operation, the contents of the request will be:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:roz="http://adis.mfcr.cz/rozhraniCRPDPH/">
<soapenv:Header/>
<soapenv:Body>
  <roz:StatusNespolehlivyPlatceRequest>
     <roz:dic>00247618</roz:dic>
  </roz:StatusNespolehlivyPlatceRequest>
</soapenv:Body>
</soapenv:Envelope>

中没有操作名称(getStatusNespolehlivyPlatce),而是 getStatusNespolehlivyPlatce 操作对应的输入参数的名称.SOAP 服务器如何发现我正在调用 getStatusNespolehlivyPlatce 操作?

In the <soapenv:Body> there is not the name of the operation (getStatusNespolehlivyPlatce) but the name of the corresponding input parameter of the getStatusNespolehlivyPlatce operation. How does the SOAP server find out that I'm invoking the getStatusNespolehlivyPlatce operation?

  1. 服务器是否使用 HTTP SOAPAction 标头来确定这一点?(在本例中为:SOAPAction:"http://adis.mfcr.cz/rozhraniCRPDPH/getStatusNespolehlivyPlatcea>")

  1. Does the server use the HTTP SOAPAction header to determine this? (which in this case is: SOAPAction: "http://adis.mfcr.cz/rozhraniCRPDPH/getStatusNespolehlivyPlatce")

服务器是否仅从底层 WSDL 和 SOAP 请求(即不查看 HTTP 标头)推断操作?

Does the server infer the operation solely from the underlying WSDL and the SOAP request (i.e. not looking at the HTTP headers)?

如果我(从服务器提供商的角度)决定不使用 SOAPAction HTTP 标头,那么根据 W3C 标准,SOAP 请求应该是什么样的?

How should the SOAP request look like according to the W3C standard if I (from the perspective of the server provider) decided not to use the SOAPAction HTTP header?

SOAPAction 标头的使用是否不是强制性的,它是否只是一种简化防火墙工作的信息,这样他们就不必解析信息关于 XML 请求所请求的操作?

Is it true that the use of the SOAPAction header is not obligatory and that it is only an information that simplifies work for the firewalls so that they don't have to parse the information about the operation requested from the XML request?

感谢您抽出宝贵时间.

推荐答案

如果我给你 Axis2 Framework 的例子,它使用以下步骤来识别服务操作.详细信息见以下网址

If I give you example of Axis2 Framework, It uses following steps to identify the service operation. Details are mentioned on below URL

http://wso2.com/library/176/

  • HTTP 请求 uri
  • SOAPAction
  • SOAP Body 元素的第一个子元素的 QName
  • 如果启用了 WS-Addressing,则 To EPR(端点引用)和 Action 元素的地址

这篇关于SOAP 服务器如何确定它应该执行哪个操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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