2013-02-08 38 views

回答

1

wsdl2code.com - 它生成所有必需的代碼,從您的wsdl到iphone和android本機代碼!它對我很好

0

首先,你需要下載ksoap2 android jar。然後右鍵點擊Eclipse中的項目文件夾。單擊屬性,那麼Java 構建路徑>庫>添加外部JAR。然後寫代碼..

SoapObject request = new SoapObject(YOUR_CONNECTION_NAMESPACE, methodName); 

    //add parameters to web service method.. 
request.addProperty(parameterName, parameterValue); 

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); 
envelope.dotNet = true; 
envelope.setOutputSoapObject(request); 

HttpTransportSE androidHttpTransport = new HttpTransportSE(YOUR_CONNECTION_URL); 
androidHttpTransport.call(YOUR_ACTION_NAME, envelope); 

result = (Object) envelope.getResponse(); 

一個很好的教程在這個話題..

+0

感謝您幫助我在這.... – Viraj

+0

高興地幫助你.. :) – ridoy