我想通過代理調用webservice(SOAP)。 假設,代理用戶名:XYZ和密碼:XYZ如何調用SOAP webserivce以及如何設置代理設置?
Webservice的網址:https://xyz.com/pqr
服務名稱:uploadData
我用
System.getProperties().put("http.proxyHost", "some host");
System.getProperties().put("http.proxyPort", "some port");
System.getProperties().put("http.proxyUser", "username");
System.getProperties().put("http.proxyPassword", "password"); // I have also tried base64 password.
但將需要驗證例外。
基本上我需要用一些參數調用這個webservice並從中得到響應。
謝謝。
你使用的是什麼庫或只是簡單的HttpConnection認證者? –
@DhanaKrishnasamy我使用QName,Service,SOAPMessage等調用webservice –
考慮使用純HTTP客戶端來發送創建的SOAP消息或其他具有代理支持的套件,並且可以根據每個連接設置身份驗證。 – vzamanillo