I have created a small app to access a .Net Web Service
But I get this error from Android
SoapFault - faultcode: 'soap:Client' faultstring: 'System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://webservice.pollsdb.com/Msgs.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)' faultactor: 'null' detail: org.kxml2.kdom.Node@b1ebfe80
does anyone know how to call this service from android?
This is my code
SOAP_ACTION = namespace + MethodName;
request = new SoapObject(namespace, MethodName);
//Adding String value to request object
request.addProperty("Lg", Lg);
request.addProperty("Lt", Lt);
request.addProperty("Cnt", Cnt);
//request.addProperty("ToUnit", "" + toUnit);
SetEnvelope();
//SOAP calling webservice
androidHttpTransport.call(SOAP_ACTION, envelope);
//Got Webservice response
String result = envelope.getResponse().toString();
return result;
0 comments:
Post a Comment