如何检索用户在 soap wsdl Java Webservice 中传递的凭据
How do I retrieve credential passed by user in soap wsdl Java Webservice
我正在使用
发送我的凭据
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username", "password".toCharArray());
}
});
我现在的问题是如何在 Soap 网络服务中检索此凭据 Java?
找到解决方案,
ArrayList<String> authList = (ArrayList<String>) http_headers.get("Authorization");
它 returns Base64 中的凭据。
我正在使用
发送我的凭据Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username", "password".toCharArray());
}
});
我现在的问题是如何在 Soap 网络服务中检索此凭据 Java?
找到解决方案,
ArrayList<String> authList = (ArrayList<String>) http_headers.get("Authorization");
它 returns Base64 中的凭据。