调用webservice返回anyType{}
gzlx 2015-05-30 03:40:01 在网站上直接输入参数,可以返回正确数据,在android中返回值总是anyType{}
public String getwflowlist(){
System.out.println("rpc------");
SoapObject rpc =new SoapObject(NAMESPACE, METHOD_NAME);
System.out.println("rpc "+ rpc);
rpc.addProperty("menuid", "%" );
rpc.addProperty("loginname", "%" );
rpc.addProperty("ai_datatype", 3 );
//AndroidHttpTransport
HttpTransportSE ht =new HttpTransportSE(URL);
ht.debug =true;
SoapSerializationEnvelope envelope =new SoapSerializationEnvelope( SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet =true;
envelope.setOutputSoapObject(rpc);
envelope.bodyOut = rpc;
try {
System.out.println( "star... " );
ht.call(SOAP_ACTION, envelope);
System.out.println("服务器返回的是:"+ envelope.getResponse().toString());
if(envelope.getResponse() != null){
SoapObject result = (SoapObject) envelope.bodyIn;
System.out.println("dataheader:"+ result.getProperty(0).toString() );
System.out.println("getPropertyCount:"+ result.getPropertyCount());
}
} catch (Exception e) {
e.printStackTrace();
System.out.println( "Err Exception" );
}
System.out.println("result "+ rpc.toString() );
System.out.println( "End ..." );
return xmlheader;
};
05-30 15:35:05.250: I/System.out(14598): rpc------
05-30 15:35:05.250: I/System.out(14598): rpc of_getwflowlistheader{}
05-30 15:35:05.270: I/System.out(14598): star...
05-30 15:35:05.790: I/System.out(14598): 服务器返回的是:anyType{}
05-30 15:35:05.790: I/System.out(14598): dataheader:anyType{}
05-30 15:35:05.790: I/System.out(14598): getPropertyCount:1
05-30 15:35:05.790: I/System.out(14598): result of_getwflowlistheader{menuid=%; loginname=%; ai_datatype=3; }
05-30 15:35:05.790: I/System.out(14598): End ...