■ プロキシ認証が実装されていない場合
エラー内容
javax.xml.ws.WebServiceException: ... 略 ... Caused by: java.io.IOException: Server returned HTTP response code: 407 for URL: http://... ... 略 ...
解決策
* プロキシ認証が実装する。詳細は、以下の関連記事を参照のこと。https://blogs.yahoo.co.jp/dk521123/36966230.html
より Authenticator.setDefault(new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("【ユーザ名】", "【パスワード】".toCharArray()); } });
■ 認証情報に誤りがあった場合
エラー内容
javax.xml.ws.WebServiceException: ... 略 ... Caused by: java.net.ProtocolException: Server redirected too many times (20) ... 略 ...
解決策
* プロキシ認証に正しい値を設定する
参考文献
http://x68000.q-e-d.net/~68user/net/java-http-url-connection-2.html■ タイムアウトした場合
エラー内容
com.sun.xml.internal.ws.client.ClientTransportException: ... 略 ... Caused by: java.net.SocketTimeoutException: connect timed out ... 略 ...
解決策
* 接続情報(ホスト名やポート)に正しい値を設定する
■ URLに誤りがある場合
エラー内容
com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException. java.io.FileNotFoundException: http://... 略 ...
解決策
* 正しいURL値を設定する URL url = new URL("【WSDLのURL】");
■ URLのポートに誤りがある場合
エラー内容
javax.xml.ws.WebServiceException: 次の場所でWSDLへのアクセスに失敗しました: ... 略 ... Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://... 略 ...
解決策
* 正しいURLのポート値を設定する