Pessoal,
Não estou entendendo o retorno do Web Service está Retornando AnyType{}
Essa é minha classe.
[code]public class ListarCanaisWS {
static final String SOAP_ACTION=“http://tempuri.org/IService1/ListarCanais”;
static final String METHOD_NAME=“ListarCanais”;
static final String NAMESPACE=“http://tempuri.org/”;
static final String URL=“http://192.168.1.172/Service1.svc?wsdl”;
List<Canais> lista = new ArrayList<Canais>();
SoapObject result=null;
public List<Canais>listarCanais(int codCliente, String token){
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("codCliente", codCliente);
request.addProperty("token", token);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
envelope.addMapping(NAMESPACE, Canais.class.getSimpleName(), Canais.class);
try {
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
result = (SoapObject)envelope.getResponse();
if(result != null){
for (int i = 0; i < result.getPropertyCount(); i++) {
// SoapObject objSoap = (SoapObject)result.getProperty(i);
//lista.add(new Canais((SoapObject)result.getProperty(i)));
lista.add(new Canais(result.getProperty(0).toString(), result.getProperty(1).toString(), result.getProperty(2).toString()));
}
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return lista;
}
}[/code]
Alguém sabe me dizer oq está acontecendo???