Request error with complex object

Asked

Viewed 262 times

0

I’m trying to file a requisition for a webservice.

Note that by Soapui it works normallyinserir a descrição da imagem aqui

But by android passing exactly the same datainserir a descrição da imagem aqui

The following error occurs:

        SoapFault - faultcode: 'soap:Client' faultstring: 'System.Web.Services.Protocols.SoapException: O servidor não pôde ler a solicitação. ---> System.InvalidOperationException: Erro no documento XML (1, 297). ---> System.InvalidOperationException: O tipo especificado não foi reconhecido: nome='anyType', espaço para nome='http://www.w3.org/2001/XMLSchema', em <pDenuncia xmlns='http://localhost'>.
        em Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read19_Denuncia_Grid_BD(Boolean isNullable, Boolean checkType)

in Microsoft.xml.Serialization.GeneratedAssembly.Xmlserializationreader1.Read50_solicita_denuncia() in System.xml.Serialization.XmlSerializer.Deserialize(Xmlreader xmlReader, String encodingStyle, Xmldeserializationevents Events) -- End of stack tracking of internal exceptions-- - in System.xml.Serialization.XmlSerializer.Deserialize(Xmlreader xmlReader, String encodingStyle, Xmldeserializationevents Events) in System.Web.Services.Protocols.Soapserverprotocol.Readparameters() -- End of stack tracking of internal exceptions-- - in System.Web.Services.Protocols.Soapserverprotocol.Readparameters() in System.Web.Services.Protocols.Webservicehandler.Coreprocessrequest()' faultactor: 'null' Detail: org.kxml2.kdom.Node@ce 52050

Remembering that the object has the same name and properties, both in the web service project, and in the android project.

1 answer

0

public class SuaClasse implements Serializable

And if your class has other classes, you will also need to add the implements Serializable in them

  • I tried both with Serializable and with Kvmserializable and it didn’t work

Browser other questions tagged

You are not signed in. Login or sign up in order to post.