private SoapResponse ksoapC(String str, String url1, String url, Vector data, String method)
throws IOException, XmlPullParserException, SecurityException
{
/**
* 接口参数的Class
*/
Class reqClassOne = null;
/**
* 接口参数的Class
*/
Class reqClassTwo = null;
/**
* 接口参数的Class
*/
Class rspClass = null;
/**
* 接口参数的Class
*/
Class reqClassThree = null;
/**
* 接口参数的Class
*/
Class reqClassFour = null;
/**
* 响应参数的Class
*/
SoapObject req = new SoapObject(url, method);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = req;
HttpTransport httpTransport = new HttpTransport(url);
httpTransport.debug = true;
• // 请求的接口是login
if (Resource.MethodType.METHOD[0].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.LOGINOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.LOGINOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1).toString().toLowerCase());
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是logout
else if (Resource.MethodType.METHOD[1].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1).toString().toLowerCase());
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是createConf
else if (Resource.MethodType.METHOD[2].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.OPRCONFINP_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.OPRCONGFOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.OPRCONFINP_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.OPRCONGFOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (OprConfInputPara)data.elementAt(0));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是getConfList
else if (Resource.MethodType.METHOD[3].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.GETCONFLISTOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.GETCONFLISTOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
req.addProperty(Resource.Var.IN2, (Long)data.elementAt(2));
req.addProperty(Resource.Var.IN3, (Long)data.elementAt(3));
Log.out("请求的接口是getConfList----(String)data.elementAt(0)"+(String)data.elementAt(0));
Log.out("请求的接口是getConfList----(String)data.elementAt(1)"+(String)data.elementAt(1));
Log.out("请求的接口是getConfList----(String)data.elementAt(2)"+(Long)data.elementAt(2));
Log.out("请求的接口是getConfList----(String)data.elementAt(3)"+(Long)data.elementAt(3));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
• // 请求的接口是cancelConf
else if (Resource.MethodType.METHOD[4].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是modifyConf
else if (Resource.MethodType.METHOD[5].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.OPRCONFINP_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.OPRCONGFOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.OPRCONFINP_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.OPRCONGFOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (OprConfInputPara)data.elementAt(0));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是prolongConf
else if (Resource.MethodType.METHOD[6].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
req.addProperty(Resource.Var.IN2, (Long)data.elementAt(2));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是queryConfDetail
else if (Resource.MethodType.METHOD[7].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONFDETAIL_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.QUERYCONFOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.QUERYCONFOPP_TYPE, rspClass);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONFDETAIL_TYPE, reqClassOne);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
• // 请求的接口是inviteAttendee
else if (Resource.MethodType.METHOD[8].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
reqClassTwo = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONFMEMLIST_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONFMEMLIST_TYPE, reqClassTwo);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (ConfMemList)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是endConference
else if (Resource.MethodType.METHOD[9].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是setMute
else if (Resource.MethodType.METHOD[10].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
reqClassTwo = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONFMEMLIST_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONFMEMLIST_TYPE, reqClassTwo);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (ConfMemList)data.elementAt(1));
req.addProperty(Resource.Var.IN2, (Boolean)data.elementAt(2));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
• // 请求的接口是setConferenceMute
else if (Resource.MethodType.METHOD[11].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
req.addProperty(Resource.Var.IN2, (Boolean)data.elementAt(2));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是removeAttendee
else if (Resource.MethodType.METHOD[12].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
reqClassTwo = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONFMEMLIST_TYPE);
reqClassThree = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEE_TYPE);
reqClassFour = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.ATTENDEELIST_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONFMEMLIST_TYPE, reqClassTwo);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEE_TYPE, reqClassThree);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.ATTENDEELIST_TYPE, reqClassFour);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (ConfMemList)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
// 请求的接口是getConfStatus
else if (Resource.MethodType.METHOD[13].equals(method))
{
try
{
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.GETUPDATEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.GETUPDATEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (String)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
• // 请求的接口是setConfLock
else if (Resource.MethodType.METHOD[14].equals(method))
{
try
{
reqClassOne = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.CONTROLLER_TYPE);
rspClass = Class.forName(Resource.PACKAGE_NAME + Resource.BeenType.SIMPLEOPP_TYPE);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.CONTROLLER_TYPE, reqClassOne);
envelope.addMapping(Resource.NAME_SPACE, Resource.BeenType.SIMPLEOPP_TYPE, rspClass);
req.addProperty(Resource.Var.IN0, (Controller)data.elementAt(0));
req.addProperty(Resource.Var.IN1, (String)data.elementAt(1));
req.addProperty(Resource.Var.IN2, (Boolean)data.elementAt(2));
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
httpTransport.call(str, url1, this, null, envelope);
if (!isTimeOut)
{
Object obResponse = envelope.getResponse();
SoapResponse response = null;
if (null != obResponse)
{
response = (SoapResponse)obResponse;
Debug.out("--------------响应回来的数据-------------->>>>>"+response);
}
return response;
}
else
{
return null;
}
}