While connecting to web service i am getting an Exception:
SoapFault - faultcode: 'soap:Client' faultstring:
'System.Web.Services.Protocols.SoapException: Server did not recognize the
value of HTTP Header SOAPAction:
http://115.108.40.174/hionstockws/GetHomePageRecos.
Here the code is
Please help me out...
private static final String SOAP_ACTION =
http://115.108.40.174/hionstockws/GetHomePageRecos;;
private static final String METHOD_NAME = GetHomePageRecos;
private static final String NAMESPACE =
http://115.108.40.174/hionstocks/;;
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);
setContentView(R.layout.main);
Log.i(Comies, im the lay);
try {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
Log.i(Comies, request.getName());
// Add Property
request.addProperty(country, 1);
request.addProperty(recordPerPage, 1);
request.addProperty(pageNumber, 5);
/**
* String ip = 193.99.144.80; PropertyInfo ipaddress = new
* PropertyInfo(); ipaddress.setName(IPAddress);
* ipaddress.setValue(ip); request.addProperty(ipaddress);
**/
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(
SoapEnvelope.VER11);
// .Net
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
// XML Version Tag
androidHttpTransport
.setXmlVersionTag(?xml version=\1.0\
encoding=\UTF-8\?);
SoapObject result = (SoapObject) envelope.getResponse();
// Get the Header and Body of the Request and Response
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyOut;
SoapObject resultsResponseSOAP = (SoapObject) envelope.bodyIn;
Log.i(Envelope Request: , resultsRequestSOAP.toString());
Log.i(Envelope Response:, resultsResponseSOAP.toString());
Exception:SoapFault - faultcode: 'soap:Client' faultstring:
'System.Web.Services.Protocols.SoapException: Server did not recognize the
value of HTTP Header SOAPAction:
http://115.108.40.174/hionstockws/GetHomePageRecos.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words REMOVE ME as the subject.