AxisProperties.setProperty("http.proxyHost","xxxx");
AxisProperties.setProperty("http.proxyPort","8080" );
AxisProperties.setProperty("http.proxyUser","xxxx");
AxisProperties.setProperty("http.proxyPassword","xxxx");
我是这样设置的,但是报501错误:(501)Not Implemented。
PS:用的axis1.4版本的,求解?

解决方案 »

  1.   

    没有人回答。。补充一下:
    采用的是用jetty本身用webservice进程的方式,不是tomcat,代码应该没有错误,连接本地的webservice服务端没有问题,连接外网的才会出错:
    AxisFault
     faultCode: {http://xml.apache.org/axis/}HTTP
     faultSubcode: 
     faultString: (501)Not Implemented
     faultActor: 
     faultNode: 
     faultDetail: 
    {}:return code:  501
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>ERROR: The requested URL could not be retrieved</title>
    <style type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></style>
    </head><body>
    <h1>ERROR</h1>
    <h2>The requested URL could not be retrieved</h2>
    <hr>
    <p>The following error was encountered while trying to retrieve the URL: <a href="http://www1.hicdma.com/ws/ExchangeService?">http://www1.hicdma.com/ws/ExchangeService?</a></p><blockquote>
    <p><b>Unsupported Request Method and Protocol</b></p>
    </blockquote><p>Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request.</p><p>Your cache administrator is <a href="mailto:[email protected]?subject=CacheErrorInfo%20-%20ERR_UNSUP_REQ&body=CacheHost%3A%20Squid_VM2.asiainfo-linkage.com%0D%0AErrPage%3A%20ERR_UNSUP_REQ%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2004%20Dec%202012%2005%3A58%3A21%20GMT%0D%0A%0D%0AClientIP%3A%2010.1.1.24%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fws%2FExchangeService%3Fwsdl%20HTTP%2F1.0%0AContent-Type%3A%20text%2Fxml%3B%20charset%3Dutf-8%0D%0ASOAPAction%3A%20%22%22%0D%0AUser-Agent%3A%20Axis%2F1.4%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0ATransfer-Encoding%3A%20chunked%0D%0AProxy-Authorization%3A%20NTLM%20TlRMTVNTUAABAAAABlIAAAQABAA6AAAAGgAaACAAAABQUk9YWS5BU0lBSU5GTy1MSU5LQUdFLkNPTUFJTEs%3D%0D%0AHost%3A%20www1.hicdma.com%0D%0AX-Forwarded-For%3A%2010.1.32.35%0D%0A%0D%0A%0D%0A">[email protected]</a>.</p><br>   
    <hr> 
    <div id="footer">Generated Tue, 04 Dec 2012 05:58:21 GMT by Squid_VM2.asiainfo-linkage.com (squid/3.0.STABLE25)</div>
    </body></html> {http://xml.apache.org/axis/}HttpErrorCode:501(501)Not Implemented
    at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:218)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2795)
    at org.apache.axis.client.Call.invoke(Call.java:2771)
    at org.apache.axis.client.Call.invoke(Call.java:2447)
    at org.apache.axis.client.Call.invoke(Call.java:2370)
    at org.apache.axis.client.Call.invoke(Call.java:1816)
    at com.asiainfo.cs.inner.hicmda.ExchangeServiceSoapBindingStub.exchange(ExchangeServiceSoapBindingStub.java:107)
    at com.asiainfo.cs.inner.hicmda.HicdmaWsClient.exchange(HicdmaWsClient.java:221)
    at Test.Test02.main(Test02.java:43)