我是 android 新手。我有一个 xml,它显示了要通过 SOAP 在服务器上发送的详细信息,所以请告诉我如何在 KSOAP 请求中转换以下 xml。谢谢
<location>
<locationId>132</locationId>
<name>test</name>
<qualifiedCoordinates>
<altitude>10</altitude>
</qualifiedCoordinates>
</location>
SoapObject request = new SoapObject(NAMESPACE, METHOD);
request.addProperty("locationId", 132);
request.addProperty("name", test);
request.addProperty("altitude", 10);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.getResponse();}
catch(Exception e) {
tempText.setText("Error");
e.printStackTrace();
}