throw AxisFault.makeFault((Caster.toPageException(t)));
}
}
public static Object _invoke(String name, Object[] args) throws PageException {
Key key = Caster.toKey(name);
Component c=component.get();
PageContext p=pagecontext.get();
if(c==null) throw new ApplicationException("missing component");
if(p==null) throw new ApplicationException("missing pagecontext");
for(int i=0;i<args.length;i++) {
args[i]=AxisCaster.toRailoType(p,args[i]);
}
Object udf = c.get(p,key,null);
String rt="any";
if(udf instanceof UDF) {
rt=((UDF)udf).getReturnTypeAsString();
}
Object rv = c.call(p, key, args);
try {
RPCServer server = RPCServer.getInstance(p.getId(),p.getServletContext());
TypeMapping tm = server.getEngine().getTypeMappingRegistry().getDefaultTypeMapping();
rv=Caster.castTo(p, rt, rv, false);