I'm using k2SOAP for Android when dealing with webservices.
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("ProjectID", 1);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(URL);
try {
httpTransport.call(SOAP_ACTION, soapEnvelope);
SoapObject result = (SoapObject) soapEnvelope.getResponse();
String resultString = result.toString();
}
I know there is nothing wrong with the code since it works with the w3 web service. But w3c returns a string as an answer this web service returns an XML. The answer I get back looks like this when I show it in log:
anyType{schema=anyType{element=anyType{complexType=anyType{choice=anyType{element=an yType{complexType=anyType{sequence=anyType{element=anyType{};
element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; }; }; }; }; };
unique=anyType{selector=anyType{}; field=anyType{}; }; }; }; diffgram=anyType{}; }
Which basically is a lot of noise and I'm not sure on how to get the information from this or how I should parse it or. My ultimate goal is to put the information I get in to a local database but since I don't know how to get the information from the String I don't know put the info in the database.
So what I want to do is to somehow parse the information and put it in a local database which I already built the classes for. How do I get the data from the SoapObject result? There is a slight possibility the web service info is empty, but my question is still the same.