当前位置: 代码迷 >> Web前端 >> android调用webservice 二
  详细解决方案

android调用webservice 二

热度:560   发布时间:2012-09-10 11:02:33.0
android调用webservice 2
try {SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//这里传值的属性也要看wsdl文件来request.addProperty("arg0", "jlins");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
Object result = envelope.getResponse();//   String [] str = (String [])result;Log.d("result",result.toString());edit1.setText(result.toString());//handle result herecatch (Exception e) {e.printStackTrace();}
1 楼 haray 2010-08-31  
androidHttpTransport.call(SOAP_ACTION, envelope);
为什么我的在这个地方会报错呢?
2 楼 haray 2010-09-03  
楼主,能不能提供一份完整的代码?haray@sohu.com,谢谢!!
  相关解决方案