2012-02-24 124 views
0

我收到以下錯誤,同時試圖連接到網絡中的J2ME項目HTTP/1.1 502代理錯誤在J2ME

Exception java.io.IOException: Error initializing HTTP tunnel connection: 

HTTP/1.1 502 Proxy Error (The specified Secure Sockets Layer (SSL) port is 
not allowed. ISA Server is not configured to allow SSL requests from this port. 
Most Web browsers use port 443 for SSL requests. ) 

我應該在設置或偏好一些變化?
我正在使用eclipse

+1

你可以發佈你的代碼嗎?並連接到網絡手段?你能詳細說明嗎? – 2012-02-24 11:56:53

回答

0

您可以按以下方式使用Proxy with Java ME,這裏是link

HTTPConnection.setProxyServer("my.proxy.dom", 8008); 
HTTPConnection.dontProxyFor("localhost"); 
HTTPConnection.dontProxyFor(".mycompany.com"); 
AuthorizationInfo.addBasicAuthorization("my.proxy.dom", 8008, realm, user, passwd); 
... 
HTTPConnection con = new HTTPConnection(...); 
1

大多數HTTP代理服務器(包括ISA服務器顯然)限制爲他們允許HTTP CONNECT的使用,這是HTTP動詞,允許代理連接是一個HTTP服務器發出的端口。通常允許的唯一端口是443(默認爲https)。

我認爲你在URL中明確地使用了另一個。您需要將服務器移至端口443或更改代理服務器的配置以允許使用該端口。