if (mediaType != null) {
DataBindingFactory factory = DataBindingManager.getInstance().getFactory(mediaType);
if(factory == null) {
throw new CougarFrameworkException("Invalid content type " + mediaType);
}
UnMarshaller unMarshaller = factory.getUnMarshaller();
return (RescriptBody)unMarshaller.unmarshall(inputStream,
bindingDescriptor.getBodyClass(),
encoding, false);
}
return null;
}