private static final TypeMappingImpl JAXRPC_TM = DefaultJAXRPC11TypeMappingImpl.getSingleton();
public static FactoryPair getFactoryPair(QName xmlType) {
Class clazz = SOAP_TM.getClassForQName(xmlType, null, null);
SerializerFactory sf;
DeserializerFactory df;
if (null != clazz) {
sf = SOAP_TM.getSerializer(clazz, xmlType);
df = SOAP_TM.getDeserializer(clazz, xmlType, null);
} else {
clazz = JAXRPC_TM.getClassForQName(xmlType, null, null);
if (null == clazz) {
return null;
}
sf = JAXRPC_TM.getSerializer(clazz, xmlType);
df = JAXRPC_TM.getDeserializer(clazz, xmlType, null);
}
return new FactoryPair(sf.getClass(), df.getClass());
}