Я пытаюсь получить данные из веб-службы, которая возвращает массив строк. Я не мог этого сделать, поэтому даю вам фрагмент кода
, пожалуйста, помогите мне. Я схожу с ума!Ksoap simple array android
public void updateCategories(){
SOAP_ACTION = "http://app.market_helper.com/getCategories";
METHOD_NAME = "getCategories";
Log.i("MESSAGE FROM me", "It's running wtf");
try {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(
URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject)envelope.getResponse();
Log.i("message to me",""+response.getPropertyCount());
}catch (Exception e) {
e.printStackTrace();
}
}
Я могу получить данные из примитивных типов, но это немного сложнее. это ответ от веб-сервиса
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getCategoriesResponse xmlns="http://DefaultNamespace">
<getCategoriesReturn>desktop computers</getCategoriesReturn>
<getCategoriesReturn>laptop computers</getCategoriesReturn>
<getCategoriesReturn>mobile phones</getCategoriesReturn>
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
<getCategoriesReturn xsi:nil="true" />
</getCategoriesResponse>
</soapenv:Body>
</soapenv:Envelope>
заранее спасибо
если и получить сообщение решение его здесь ..... это проверить ссылка может быть полезна для u .. http://ksoap.objectweb.org/project/faq/index.html ... в соответствии с ними отправка и получение должны выполняться с использованием векторов .. но даже я ld реализовать его .. так PLS PLS поделиться решением, если у вас есть. –