* @param name - Name of the property
* @param value - Value of the property
*/
public void _setProperty(String name, Object value) {
if (name == null || value == null) {
throw new JAXRPCException(
Messages.getMessage(name == null ?
"badProp03" : "badProp04"));
}
else if (name.equals(Call.USERNAME_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
cachedUsername = (String) value;
}
else if (name.equals(Call.PASSWORD_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
cachedPassword = (String) value;
}
else if (name.equals(Stub.ENDPOINT_ADDRESS_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
try {
cachedEndpoint = new URL ((String) value);
}
catch (MalformedURLException mue) {
throw new JAXRPCException(mue.getMessage());
}
}
else if (name.equals(Call.SESSION_MAINTAIN_PROPERTY)) {
if (!(value instanceof Boolean)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[]
{name,
"java.lang.Boolean",
value.getClass().getName()}));
}
maintainSessionSet = true;
maintainSession = ((Boolean) value).booleanValue();
}
else if (name.startsWith("java.") || name.startsWith("javax.")) {
throw new JAXRPCException(
Messages.getMessage("badProp05", name));
}
else {
cachedProperties.put(name, value);
}