use of org.apache.axis.wsdl.symbolTable.DefinedType in project Lucee by lucee.
the class Axis1Client method _mapComplex.
private Class _mapComplex(PageContext pc, SymbolTable symbolTable, Config secondChanceConfig, org.apache.axis.encoding.TypeMapping tm, TypeEntry type) throws PageException {
// extension
Class ex = null;
if (type instanceof DefinedType) {
DefinedType dt = (DefinedType) type;
TypeEntry exType = dt.getComplexTypeExtensionBase(symbolTable);
if (exType != null)
ex = map(pc, symbolTable, secondChanceConfig, tm, exType);
}
Vector children = type.getContainedElements();
ArrayList<ASMPropertyImpl> properties = new ArrayList<ASMPropertyImpl>();
if (children != null) {
Iterator it = children.iterator();
ElementDecl el;
Class clazz;
TypeEntry t;
String name;
while (it.hasNext()) {
clazz = null;
el = (ElementDecl) it.next();
t = el.getType();
Vector els = t.getContainedElements();
// again handle children
if (els != null) {
clazz = mapComplex(pc, symbolTable, secondChanceConfig, tm, t);
}
name = lucee.runtime.type.util.ListUtil.last(el.getQName().getLocalPart(), '>');
if (clazz == null)
clazz = tm.getClassForQName(t.getQName());
if (clazz == null)
clazz = Object.class;
properties.add(new ASMPropertyImpl(clazz, name));
}
}
ASMProperty[] props = properties.toArray(new ASMProperty[properties.size()]);
String clientClassName = getClientClassName(type, props);
Class pojo;
if (pc == null)
pojo = ComponentUtil.getComponentPropertiesClass(secondChanceConfig, clientClassName, props, ex);
else
pojo = ComponentUtil.getClientComponentPropertiesClass(pc, clientClassName, props, ex);
TypeMappingUtil.registerBeanTypeMapping(tm, pojo, type.getQName());
return pojo;
}
use of org.apache.axis.wsdl.symbolTable.DefinedType in project Lucee by lucee.
the class SOAPUtil method toDefinedType.
private static DefinedType toDefinedType(TempType tt) {
if (tt.isArray) {
tt.isArray = false;
DefinedType ref = toDefinedType(tt);
String type = ref.getQName().getLocalPart();
if (type.startsWith("ArrayOf"))
type = "ArrayOf" + type;
else
type = "ArrayOf:" + type;
QName qn = StringUtil.isEmpty(tt.namespace) ? new QName(type) : new QName(tt.namespace, type);
DefinedType dt = new DefinedType(qn, tt.parent);
dt.setRefType(ref);
}
QName qn = StringUtil.isEmpty(tt.namespace) ? new QName(tt.type) : new QName(tt.namespace, tt.type);
DefinedType dt = new DefinedType(qn, tt.parent);
dt.setBaseType(false);
// children
if (tt.children != null && tt.children.size() > 0) {
dt.setContainedElements(toTypes(tt.children, true));
}
return dt;
}
Aggregations