}
// Webservice
if(type.equals("webservice") || type.equals("wsdl")) {
String user=null;
String pass=null;
ProxyDataImpl proxy=null;
if(context!=null){
Struct args=(serverName!=null)?Caster.toStruct(serverName):Caster.toStruct(context);
// basic security
user=Caster.toString(args.get("username",null));
pass=Caster.toString(args.get("password",null));
// proxy
String proxyServer=Caster.toString(args.get("proxyServer",null));
String proxyPort=Caster.toString(args.get("proxyPort",null));
String proxyUser=Caster.toString(args.get("proxyUser",null));
if(StringUtil.isEmpty(proxyUser)) proxyUser=Caster.toString(args.get("proxyUsername",null));
String proxyPassword=Caster.toString(args.get("proxyPassword",null));
if(!StringUtil.isEmpty(proxyServer)){
proxy=new ProxyDataImpl(proxyServer,Caster.toIntValue(proxyPort,-1),proxyUser,proxyPassword);
}
}
return doWebService(pc,className,user,pass,proxy);
}
if(type.equals("http")) {
String user=null;
String pass=null;
ProxyDataImpl proxy=null;
if(context!=null){
Struct args=(serverName!=null)?Caster.toStruct(serverName):Caster.toStruct(context);
// basic security
user=Caster.toString(args.get("username",null));
pass=Caster.toString(args.get("password",null));
// proxy
String proxyServer=Caster.toString(args.get("proxyServer",null));
String proxyPort=Caster.toString(args.get("proxyPort",null));
String proxyUser=Caster.toString(args.get("proxyUser",null));
if(StringUtil.isEmpty(proxyUser)) proxyUser=Caster.toString(args.get("proxyUsername",null));
String proxyPassword=Caster.toString(args.get("proxyPassword",null));
if(!StringUtil.isEmpty(proxyServer)){
proxy=new ProxyDataImpl(proxyServer,Caster.toIntValue(proxyPort,-1),proxyUser,proxyPassword);
}
}
return doHTTP(pc,className,user,pass,proxy);
}