Methods Summary |
---|
public static org.apache.axis.encoding.DeserializerFactory | createFactory(java.lang.Class factory, java.lang.Class javaType, javax.xml.namespace.QName xmlType)Utility method that intospects on a factory class to decide how to
create the factory. Tries in the following order:
public static create(Class javaType, QName xmlType)
public (Class javaType, QName xmlType)
public ()
if (factory == null) {
return null;
}
try {
if (factory == BeanDeserializerFactory.class) {
return new BeanDeserializerFactory(javaType, xmlType);
} else if (factory == SimpleDeserializerFactory.class) {
return new SimpleDeserializerFactory(javaType, xmlType);
} else if (factory == EnumDeserializerFactory.class) {
return new EnumDeserializerFactory(javaType, xmlType);
} else if (factory == ElementDeserializerFactory.class) {
return new ElementDeserializerFactory();
} else if (factory == SimpleListDeserializerFactory.class) {
return new SimpleListDeserializerFactory(javaType, xmlType);
}
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
return null;
}
DeserializerFactory df = null;
try {
Method method =
factory.getMethod("create", CLASS_QNAME_CLASS);
df = (DeserializerFactory)
method.invoke(null,
new Object[] {javaType, xmlType});
} catch (NoSuchMethodException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (IllegalAccessException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (InvocationTargetException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
}
if (df == null) {
try {
Constructor constructor =
factory.getConstructor(CLASS_QNAME_CLASS);
df = (DeserializerFactory)
constructor.newInstance(
new Object[] {javaType, xmlType});
} catch (NoSuchMethodException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (InstantiationException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (IllegalAccessException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (InvocationTargetException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
}
}
if (df == null) {
try {
df = (DeserializerFactory) factory.newInstance();
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {}
}
return df;
|
private java.lang.reflect.Constructor | getConstructor(java.lang.Class clazz)return constructor for class if any
try {
return clazz.getConstructor(CLASS_QNAME_CLASS);
} catch (NoSuchMethodException e) {}
return null;
|
protected java.lang.reflect.Constructor | getDeserClassConstructor()Returns the deserClassConstructor.
if (deserClassConstructor == null) {
deserClassConstructor = getConstructor(deserClass);
}
return deserClassConstructor;
|
public javax.xml.rpc.encoding.Deserializer | getDeserializerAs(java.lang.String mechanismType)
Deserializer deser = null;
// Need to add code to check against mechanisms vector.
// Try getting a specialized Deserializer
deser = getSpecialized(mechanismType);
// Try getting a general purpose Deserializer via constructor
// invocation
if (deser == null) {
deser = getGeneralPurpose(mechanismType);
}
try {
// If not successfull, try newInstance
if (deser == null) {
deser = (Deserializer) deserClass.newInstance();
}
} catch (Exception e) {
throw new JAXRPCException(e);
}
return deser;
|
protected org.apache.axis.encoding.Deserializer | getGeneralPurpose(java.lang.String mechanismType)Obtains a deserializer by invoking (javaType, xmlType)
on the deserClass.
if (javaType != null && xmlType != null) {
Constructor deserClassConstructor = getDeserClassConstructor();
if (deserClassConstructor != null) {
try {
return (Deserializer)
deserClassConstructor.newInstance(
new Object[] {javaType, xmlType});
} catch (InstantiationException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (IllegalAccessException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (InvocationTargetException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
}
}
}
return null;
|
protected java.lang.reflect.Method | getGetDeserializer()Returns the getDeserializer.
if (getDeserializer == null) {
getDeserializer = getMethod(javaType,"getDeserializer");
}
return getDeserializer;
|
protected org.apache.axis.encoding.Deserializer | getSpecialized(java.lang.String mechanismType)Obtains a deserializer by invoking getDeserializer method in the
javaType class or its Helper class.
if (javaType != null && xmlType != null) {
Method getDeserializer = getGetDeserializer();
if (getDeserializer != null) {
try {
return (Deserializer)
getDeserializer.invoke(
null,
new Object[] {mechanismType,
javaType,
xmlType});
} catch (IllegalAccessException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
} catch (InvocationTargetException e) {
if(log.isDebugEnabled()) {
log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
}
}
}
}
return null;
|
public java.util.Iterator | getSupportedMechanismTypes()Returns a list of all XML processing mechanism types supported by this DeserializerFactory.
if (mechanisms == null) {
mechanisms = new Vector(1);
mechanisms.add(Constants.AXIS_SAX);
}
return mechanisms.iterator();
|