// use the use of the service to map doc/lit or rpc/enc
String encodingStyle = mapping.getEncodingStyle();
if (encodingStyle == null) {
encodingStyle = use.getEncoding();
}
TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);
desc.setTypeMappingRegistry(tmr);
desc.setTypeMapping(tm);
SerializerFactory ser = null;
DeserializerFactory deser = null;
// Try to construct a serializerFactory by introspecting for the
// following:
// public static create(Class javaType, QName xmlType)
// public <constructor>(Class javaType, QName xmlType)
// public <constructor>()
//
// The BaseSerializerFactory createFactory() method is a utility
// that does this for us.
if (mapping.getSerializerName() != null &&
!mapping.getSerializerName().equals("")) {
ser = BaseSerializerFactory.createFactory(mapping.getSerializer(),
mapping.getLanguageSpecificType(),
mapping.getQName());
}
if (mapping.getDeserializerName() != null &&
!mapping.getDeserializerName().equals("")) {
deser = BaseDeserializerFactory.createFactory(mapping.getDeserializer(),
mapping.getLanguageSpecificType(),
mapping.getQName());
}
tm.register( mapping.getLanguageSpecificType(), mapping.getQName(), ser, deser);
} catch (ClassNotFoundException e) {
log.error(Messages.getMessage("unabletoDeployTypemapping00", mapping.getQName().toString()), e);
throw new WSDDNonFatalException(e);
} catch (Exception e) {
throw new WSDDException(e);