String protocol = url.getProtocol();
int port = url.getPort();
if (port == -1) {
port = "https".equalsIgnoreCase(protocol) ? 443 : 80;
}
PasswordAuthentication auth =
Authenticator.requestPasswordAuthentication(null,
port, protocol, "", method);
if (auth != null) {
user = auth.getUserName();
password = new String(auth.getPassword());
}
} catch (Exception ex) { }
}
Type2Message type2 = (Type2Message) message;
message = new Type3Message(type2, password, domain, user,