【发布时间】:2011-12-03 15:46:36
【问题描述】:
我在 Windows7 上使用 Eclipse Indigo 生成 Axis2(Axis 1.6.1 JDK 合规性 1.5)java 存根,并成功调用了http://www.xmlme.com/WSShakespeare.asmx?WSDL 的公共 Web 服务 对所述服务的 getSpeech 方法得到了完美的响应。然后我使用 tcpmon(插件)来查看正在交换的 xml。添加了监听端口 = 4556、目标主机名 = www.xmlme.com 和目标端口 = 80 这会生成 HTTP 302 Moved 错误。回顾一下,当使用
调用时可以正常工作ShakespeareSoapProxy ssp = new ShakespeareSoapProxy("http://www.xmlme.com:80/WSShakespeare.asmx?WSDL");
但在添加和调用 tcpmon 监听器时失败
ShakespeareSoapProxy ssp = new ShakespeareSoapProxy("http://localhost:4556/WSShakespeare.asmx?WSDL");
tcpmon soap 请求
POST /WSShakespeare.asmx?WSDL HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: www.xmlme.com:4556
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://xmlme.com/WebServices/GetSpeech"
Content-Length: 359
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetSpeech xmlns="http://xmlme.com/WebServices"><Request>To be, or not to be</Request></GetSpeech></soapenv:Body></soapenv:Envelope>
---------tcpmon response below----------------------------
HTTP/1.0 302 Moved
Location: http://172.16.1.6:15871/cgi-bin/blockpage.cgi?ws-session=1096295497
Pragma: no-cache
Cache-Control: no-cache
为什么 tcpmon 会像上面那样失败是我的主要问题。为什么当 SOAP 客户端运行良好时我要 tcpmon?因为我用它生成了一个 jar,它在 Windows7 上运行良好。但是当我在我的 iSeries aka AS400 服务器上运行相同的 jar 时,它给了我 Axis 错误 HTTP 401 未经授权和需要身份验证的消息。我们的 IT 人员确实运行 websense 来阻止内容,但这是我之前运行过 .NET Web 服务的 Windows 客户端上的 localhost。 非常感谢您的想法和回复,谢谢。
编辑 - Windows 发送和服务器不发送的 NTLM 默认凭据的一些研究点?如果是这样的话,有人想发表评论吗?
【问题讨论】: