我正在使用
发送我的凭据Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username", "password".toCharArray());
}
});
我现在的问题是如何在Soap webservice Java中检索此凭据?
答案 0 :(得分:1)
得到解决方案,
ArrayList<String> authList = (ArrayList<String>) http_headers.get("Authorization");
它返回Base64中的凭据。