0
Good Afternoon
Assuming I have the following Java Order and Item classes:
public class Pedido implements KvmSerializable, Serializable {
private String numero;
private ArrayList<Item> itens;
public String getNumero(){
return numero;
}
public void setNumero(String numero){
this.numero = numero;
}
public ArrayList<Item> getItens(){
return itens;
}
public void setItens(ArrayList<Item> itens){
this.itens = itens;
}
public Pedido(){
}
}
public class Item implements KvmSerializable, Serializable {
private String codigo;
private double valor;
public String getCodigo(){
return codigo;
}
public void setCodigo(String codigo){
this.codigo = codigo;
}
public double getValor(){
return valor;
}
public void setValor(double valor){
this.valor = valor;
}
public Item(){
}
}
What is the procedure for sending a Request object with multiple items to a Webservice using SOAP technology, using the KSOAP2 library via Android?
I can make the request normally with objects that do not involve Arrays, but when this happens I get the following error message:
W/System.err: java.lang.Runtimeexception: Cannot serialize:
From now on, thank you.
I’m already implementing the Serializable interface in the classes, I forgot to put in the code here, I’ll update. But I still have the same problem, I can’t serialize an object array.
– Matheus Socoloski Velho
The error remains the same ? or changed ?
– Eduardo Dornel
It remains the same, I can serialize both the Request object and the Item object, provided that separately. My problem is serializing a Request object with one or more Items inside it.
– Matheus Socoloski Velho