* successfully
*/
public Object convert(Class type, Object value)
{
if (value == null) {
throw new ConversionException("No value specified");
}
if (type.isInstance(value)) {
return value;
}
String qnameString = value.toString();
int i = qnameString.indexOf(":");
String ns = "";
String nsUri = null;
String service = qnameString;
if(i > -1) {
ns = qnameString.substring(0, i);
service = qnameString.substring(i+1);
}
nsUri = digester.findNamespaceURI(ns);
if(nsUri != null) {
return new QName(nsUri, service, ns);
} else {
throw new ConversionException("Failed to create QName. Namespace not found for: '" + ns + "'");
}
}