Boa tarde!
Estou usando ksoap2 no android e tentando enviar um vector de informações para o webservice feito em java so que não funciona
esse paramentro vem NULO
,@WebParam(name = “filhos”) Vector filhos
Segue o webservice
[code]
public class Servicos {
public Servicos() {
}
@WebMethod(operationName = "recebeColeta")
public Boolean recebeColeta(@WebParam(name = "lista") MinEquipamentoColeta lista,@WebParam(name = "filhos") Vector<MinEquipamentoColetaInf> filhos) {
try {
if(lista != null){
//Aqui funciona certo
System.out.println("pai: "+lista.size());
}
if (filhos != null){
System.out.println("tem itens: "+filhos.size());
//System.out.println("val coleta: "+filhos.get(0).getValColeta());
}
return true;
//return new ControleMinEquipamentoColetaImpl().salvar(lista);
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
…[/code]
Metodo enviar dados para o webservice no ANDROID
public void enviaDadosColeta() {
final String SOAP_ACTION = "http://webservices.coopcana.com.br/recebeColeta";
final String METHOD_NAME = "recebeColeta";
final String NAMESPACE = "http://webservices.coopcana.com.br/";
final String URL = "http://192.168.1.110:8083/WebService/ServicosService?wsdl";
try {
List<MinEquipamentoColeta> lista = getControle().getColetas();
MinEquipamentoColeta c = lista.get(0);
SoapObject coleta = new SoapObject(NAMESPACE, METHOD_NAME);
coleta.addProperty("lista", c);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
PropertyInfo infoFilho = new PropertyInfo();
infoFilho.setName("filhos");
infoFilho.setValue(c.getVectorMinEquipamentoColetaIn());
infoFilho.setType(MinEquipamentoColetaInf.class);
//infoFilho.setNamespace(NAMESPACE);
coleta.addProperty(infoFilho);
envelope.dotNet = false;
envelope.setOutputSoapObject(coleta);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive result = (SoapPrimitive) envelope.getResponse();
System.out.println(result.getAttribute(0));
} catch (Exception e) {
e.printStackTrace();
}
}
..........
alguem poderia me ajudar??