有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

SOAP请求的SoapAction是否可以因之间的互操作性问题而改变。NET和JAVA或网络/基础结构代理

我有一个场景,一个。NET 3.5WebClient正在执行SOAP请求 头文件中发送的SoapAction是这样的

<Host>:<Port>/NotOps/RFMP/portTypeEndPoint?SessionID=<token>

但是在SOAP请求的接收端,即JAVA,在“?”之前接收“/”性格

<Host>:<Port>/NotOps/RFMP/portTypeEndPoint/?SessionID=<token>

网络代理是否可以更改soap请求的任何部分(我所说的网络代理是指企业内部用于访问Web或其他网络的代理)

a之间是否仍存在互操作性问题。Net 3.5客户机,它使用类似于这里提到的Java服务

.NET requires that the HTTP SOAPAction header be used to exactly identify the operation on which service is being invoked. .NET requires the format of the SOAPAction header to be the service namespace, followed by a forward slash, followed by the name of the operation, or urn:Example/sayHello. Notice, though, that SOAP::Lite's default is to use a pound sign (#) to separate the service namespace from the name of the operation. This wasn't an issue when we were invoking Java services with SOAP::Lite because Apache SOAP simply ignores the SOAPAction header altogether.

这是提到的http://oreilly.com/catalog/progwebsoap/chapter/ch03.html 例3-19

除了可能导致这种行为之外,还有其他什么想法吗

在这种情况下,提到附加正斜杠的错误是误导性的,因为该错误是由于在通信端点上缺乏权限造成的


共 (2) 个答案

  1. # 1 楼答案

    正如您所说的,这种行为可能是由代理重写引起的,但这会非常奇怪

    尝试以下测试:

    1. 从。NET代码调用一些模拟(理想情况下是在与原样相同的机器上) 您的程序)并检查SoapAction

    2. 从SoapUI调用java代码时使用的请求与从步骤1得到的请求完全相同。(最好还是从同一台机器上进行)

    如果它仍然添加/之前?这意味着您正在使用的技术正在为您改变这一点(我猜应该是java应用服务器)

    如果/不会出现,那么您必须调查您的网络并找到神奇的代理

  2. # 2 楼答案

    除了jakub提供的答案之外。彼得

    该错误提到了额外的正斜杠,是由于在通信端点上缺乏权限造成的

    请记住,即使是详细的错误也可能误导您尝试修复未损坏的东西

    所以