inputWrapperDT = AccessController.doPrivileged(new PrivilegedAction<DataType<XMLType>>() {
public DataType<XMLType> run() {
try {
Class<?> wrapperClass = Class.forName(inputWrapperClassName, false, clazz.getClassLoader());
QName qname = new QName(inputNS, inputName);
DataType dt = new DataTypeImpl<XMLType>(wrapperClass, new XMLType(qname, qname));
dataBindingExtensionPoint.introspectType(dt, operation);
// TUSCANY-2505
if (dt.getLogical() instanceof XMLType) {
XMLType xmlType = (XMLType)dt.getLogical();
xmlType.setElementName(qname);
}
return dt;
} catch (ClassNotFoundException e) {
GeneratedClassLoader cl = new GeneratedClassLoader(clazz.getClassLoader());
return new GeneratedDataTypeImpl(xmlAdapterExtensionPoint, method, inputWrapperClassName, inputNS, inputName, true,
cl);
}
}
});
QName inputWrapper = inputWrapperDT.getLogical().getElementName();
ResponseWrapper responseWrapper = method.getAnnotation(ResponseWrapper.class);
ns = responseWrapper == null ? tns : getValue(responseWrapper.targetNamespace(), tns);
name =
responseWrapper == null ? operationName + "Response" : getValue(responseWrapper.localName(),
operationName + "Response");
wrapperBeanName = responseWrapper == null ? "" : responseWrapper.className();
if ("".equals(wrapperBeanName)) {
wrapperBeanName =
CodeGenerationHelper.getPackagePrefix(clazz) + capitalize(method.getName()) + "Response";
}
DataType<XMLType> outputWrapperDT = null;
final String outputWrapperClassName = wrapperBeanName;
final String outputNS = ns;
final String outputName = name;
outputWrapperDT = AccessController.doPrivileged(new PrivilegedAction<DataType<XMLType>>() {
public DataType<XMLType> run() {
try {
Class<?> wrapperClass =
Class.forName(outputWrapperClassName, false, clazz.getClassLoader());
QName qname = new QName(outputNS, outputName);
DataType dt = new DataTypeImpl<XMLType>(wrapperClass, new XMLType(qname, qname));
dataBindingExtensionPoint.introspectType(dt, operation);
// TUSCANY-2505
if (dt.getLogical() instanceof XMLType) {
XMLType xmlType = (XMLType)dt.getLogical();
xmlType.setElementName(qname);
}
return dt;
} catch (ClassNotFoundException e) {
GeneratedClassLoader cl = new GeneratedClassLoader(clazz.getClassLoader());
return new GeneratedDataTypeImpl(xmlAdapterExtensionPoint, method, outputWrapperClassName, outputNS, outputName,