use of org.apache.axis.wsdl.symbolTable.ElementDecl in project Lucee by lucee.
the class AxisUtil method getContainedElement.
public static TypeEntry getContainedElement(TypeEntry type, String name, TypeEntry defaultValue) {
if (type == null)
return defaultValue;
Vector v = type.getContainedElements();
if (v != null) {
Iterator it = v.iterator();
ElementDecl ed;
String tmp;
while (it.hasNext()) {
ed = (ElementDecl) it.next();
if (ed.getQName() == null)
continue;
tmp = lucee.runtime.type.util.ListUtil.last(ed.getQName().getLocalPart(), '>');
if (tmp.equalsIgnoreCase(name))
return ed.getType();
}
}
return defaultValue;
}
use of org.apache.axis.wsdl.symbolTable.ElementDecl 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.ElementDecl in project Lucee by lucee.
the class SOAPUtil method toTypes.
private static Vector toTypes(List<TempType> res, boolean contained) {
Iterator<TempType> it = res.iterator();
Vector types = new Vector();
Type t;
TempType tt;
Object o;
while (it.hasNext()) {
tt = it.next();
o = t = toType(tt);
if (contained)
o = new ElementDecl(t, new QName(tt.name));
types.add(o);
}
return types;
}
Aggregations