调用.net的webservice
4.0.3程序
private String ws(){ String result=""; try{ SoapObject request=new SoapObject(NAMESPACE,MEHTODNAME);//NameSpace request.addProperty("i","5"); request.addProperty("j", "6"); SoapSerializationEnvelope envelope=new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); HttpTransportSE ht=new HttpTransportSE(URL); [color=#FF0000]ht.call(SOAPACTION, envelope);[/color] //到这一步就异常 找不到原因 if(envelope.getResponse()!=null){ SoapPrimitive response=(SoapPrimitive)envelope.getResponse(); result=response.toString(); } }catch(Exception e){ result=e.getMessage(); } return result; }