JAVA写的WEBSERVICE(是别人的),我用.NET程序访问WS出错。错误如下:
HTTP/1.1 501 Method POST is not defined in RFC 2068 and is not supported by the Servlet API
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)
Content-Type: text/html;charset=utf-8
Content-Length: 1868
Date: Thu, 17 Jun 2010 07:59:18 GMT
Server: Apache-Coyote/1.1
Connection: close
不知道哪位兄弟遇到过没有,非常感谢!
HTTP/1.1 501 Method POST is not defined in RFC 2068 and is not supported by the Servlet API
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)
Content-Type: text/html;charset=utf-8
Content-Length: 1868
Date: Thu, 17 Jun 2010 07:59:18 GMT
Server: Apache-Coyote/1.1
Connection: close
不知道哪位兄弟遇到过没有,非常感谢!
解决方案 »
- jquery liger ui 的问题
- servlet jsp 的问题,困惑!!
- 关于OUT.CLOSE()的一个疑问!!!!求解答
- 软件创业 找合作伙伴
- 关于如何在java中得到当前oracle的一个自增长序列的的值的问题,最好告知代码
- 我装好了j2sdk1.4.2后,编译错误阿!内容如下,帮我看看什么问题!谢谢啦!
- 一个java初学者关于java编译中遇到的问题.
- jive源代码怎么看,怎么研究,我不知该怎么下手,请高手指点?
- 局域网的问题:端口被封,想用局域网内部的机器作server,提供http,ftp,telnet等服务?同时架构网站?
- myeclipse启动服务时,提示错误,求大神指点
- 用c++及javaMail收发邮件遇到的问题
- (急) 求struts分页代码 运行通过立马给100分 需求下面详细说了
另外:我是写的一个SOCKET程序去访问的WS,直接发送的一个字符串,如下:string soap4= @"<?xml version=""1.0"" encoding=""utf-8""?>
<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/""
xmlns:tns=""http://192.168.0.169:8080/testWS/services/HelloServices""
xmlns:types=""http://192.168.0.169:8080/testWS/services/HelloServices/encodedTypes""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<soap:Body soap:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"">
<q1:sayHelloToPerson xmlns:q1=""http://webservice.sinosoft.com"">
<name xsi:type=""xsd:string"">test</name>
</q1:sayHelloToPerson>
</soap:Body>
</soap:Envelope>";
string httpHeader4 = @"POST /testWS/services/HelloServices HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3603)
Content-Type: text/xml; charset=utf-8
SOAPAction: """"
Host: 192.168.0.169:8080
Content-Length: " + soap4.Length + @"
Expect: 100-continue
Connection: Keep-Alive";
在本机上测试都是可以访问到WS的,但是实际环境中,需要过一个网闸,那样的话就返回上面的错误了。
后面我用抓包工具看了一下,WS的机子收到的数据中,实际环境中,只要过了网闸,那么就把里面的回车符换成了"..",也就是换成了两个点,不知道是怎么回事,有没有哪位大侠遇到过!
而不过网闸的情况(这种情况可以访问到WS),接收到的数据包并没有显示十六进制,不知道是怎么回事!
或者有没有办法将这个空格在WS处理接收到数据之前删除掉!!