简体   繁体   English

tcpmon Java Axis2客户端Web服务响应被重定向

[英]tcpmon Java Axis2 client web service response being redirected

I used Eclipse Indigo on Windows7 to generate Axis2 (Axis 1.6.1 JDK compliance 1.5) java stubs and successfully called the public web service at http://www.xmlme.com/WSShakespeare.asmx?WSDL Got perfect response to getSpeech method of said service. 我在Windows7上使用Eclipse Indigo生成了Axis2(符合JDK 1.6.1,符合JDK 1.5)的Java存根,并成功在http://www.xmlme.com/WSShakespeare.asmx?WSDL上调用了公共Web服务。说服务。 Then I used tcpmon (plugin) to see xml being exchanged. 然后,我使用tcpmon(插件)查看正在交换的xml。 Added Listen port = 4556, Target Host name = www.xmlme.com and Target port = 80 This generated HTTP 302 Moved error. 添加了侦听端口= 4556,目标主机名= www.xmlme.com,目标端口= 80这将生成HTTP 302移动错误。 To recap works correctly when called with 概括地说,当与

ShakespeareSoapProxy ssp = new ShakespeareSoapProxy("http://www.xmlme.com:80/WSShakespeare.asmx?WSDL");

but fails when tcpmon listener added and called with 但是当添加tcpmon侦听器并使用调用时失败

ShakespeareSoapProxy ssp = new ShakespeareSoapProxy("http://localhost:4556/WSShakespeare.asmx?WSDL"); 

tcpmon soap Request 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

Why is tcpmon failing as above is my primary question. 为什么tcpmon不能如上失败是我的主要问题。 WHY did I tcpmon it when the SOAP client worked perfectly? 为什么当SOAP客户端运行正常时我会tcpmon吗? Because I generated a jar out of it and it worked great on Windows7. 因为我从中生成了一个jar,它在Windows7上运行良好。 But when I ran the same jar on my iSeries aka AS400 server it gave me Axis fault HTTP 401 unauthorized & Authentication required message. 但是,当我在iSeries aka AS400服务器上运行相同的jar时,它给了我Axis错误HTTP 401未经授权和需要身份验证的消息。 Our IT guys do run websense to block stuff but this is localhost on windows client where I have run .NET web services before. 我们的IT人员确实运行websense来阻止内容,但是这是Windows客户端上的localhost,而我之前已经在其中运行过.NET Web服务。 Ideas, responses are greatly appreciated, thanks. 的想法,反应非常感谢,谢谢。

Edit - Some research points at NTLM default credentials that windows sends and server doesnt? 编辑-一些研究指向Windows发送的NTLM默认凭据而服务器没有? Anyone want to comment if that could be it? 任何人都想发表评论吗?

The IP you're being redirected to (172.16.1.6) is local to your network (see "Reserved IP addresses" .) Check with your network administrators whether they're blocking your request to www.xmlme.com and why. 您被重定向到的IP(172.16.1.6)在您的网络本地(请参阅“保留的IP地址” 。)与您的网络管理员联系,以了解他们是否阻止了您对www.xmlme.com的请求,以及原因。

It looks to me like the problem should reproduce without tcpmon as well. 在我看来,该问题也应该在没有tcpmon的情况下重现。 You can use a network sniffer (eg Wireshark ) to compare the traffic with and without tcpmon. 您可以使用网络嗅探器(例如Wireshark )来比较使用和不使用tcpmon的流量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM