如何在soap wsdl Java Webservice中检索用户传递的凭据

时间:2016-11-11 05:27:57

标签: java web-services soap wsdl

我正在使用

发送我的凭据
Authenticator.setDefault(new Authenticator() {
                    @Override
                    protected PasswordAuthentication getPasswordAuthentication() {
                        return new PasswordAuthentication("username", "password".toCharArray());
            }
});

我现在的问题是如何在Soap webservice Java中检索此凭据?

1 个答案:

答案 0 :(得分:1)

得到解决方案,

ArrayList<String> authList = (ArrayList<String>) http_headers.get("Authorization");

它返回Base64中的凭据。