Problem on getting SOAP response

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Problem on getting SOAP response

Postby prasanjitdeka » Fri Mar 19, 2010 11:31 am

WHat i am doing is that, i have to call webservice method where i have to pass some argument.
Even i did every thing but getting error on logcat " SOAP Exception" server not getting response
Here the code is
public class Main extends Activity {
private static final String SOAP_ACTION = "http://115.108.40.174/hionstockws/service1.asmx/GetHomePageRecos";
private static final String METHOD_NAME = "GetHomePageRecos";
private static final String NAMESPACE = "http://115.108.40.174/hionstockws";
private static final String URL = "http://115.108.40.174/hionstockws/service1.asmx";
private Object resultRequestSOAP = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
setContentView(tv);

Log.i("Comies","im the lay");
try{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
Log.i("Comies88888888",request.getName());
// Add Property
request.addProperty("vcountry", "1");
request.addProperty("vrecorPerPage", "5");
request.addProperty("vrpageNo", "1");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
// .Net
envelope.dotNet = true;

envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);

resultRequestSOAP = envelope.getResponse();
String[] results = (String[]) resultRequestSOAP;
Log.i("Result",results.toString());


tv.setText( results[0]);
// Display Results in log (adb.exe logcat)
}
catch(Exception e){
e.printStackTrace();
}
}
}
Please help me out on this..................
prasanjitdeka
Freshman
Freshman
 
Posts: 2
Joined: Fri Mar 19, 2010 10:32 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 6 guests