Hi,
am new to axis2.I hav created a web servcie n deploy it on tomcat using axis2,n am calling it from my android program using ksoap .
When i call a method which doesnt accept any parameter,am getting the response from web service but wen am calling anothr method which accept a string parameter am facing an error.
My code is ::
//WEB SERVICE...
package Guru;
public class DarshanSays
{
public String getMsg(String h)
{
return h+" ..the power of change is eVolution...";
}
public String getEmpty(String d)throws Exception
{
return "empty string from tomcattttttttttt";
}
}
//AND program is
String soap_action="http://Guru/getEmpty";
String method_nm=
"getEmpty";String nmspc=
"http://Guru/";String url7=
"http://192.168.10.182:8080/axis2/services/Friday";SoapObject request =
new SoapObject(url7,method_nm); /*sending method parameters with SoapObject */request.newInstance();
request.addProperty(
"h","darshan.....");//sending a parameter to a methodSoapSerializationEnvelope envelope =
newSoapSerializationEnvelope(SoapEnvelope.
VER11);envelope.
bodyOut=request;envelope.
dotNet = true;envelope.
encodingStyle = SoapSerializationEnvelope.XSD;Log.d(
"Step","3");envelope.
dotNet=true; /*setting outputsoap object sending request */envelope.setOutputSoapObject(request);
/*HttpTransportSE object creating sending it url */ androidHttpTransport = new HttpTransportSE(url7); //androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");Log.d(
"Step","4"); try{ androidHttpTransport.debug=true; androidHttpTransport.call(nmspc,envelope);}
catch(Exception e){
Log.d(
"Transportcall",""+e); alert=new AlertDialog.Builder(this); alert.setMessage(""+e); alert.show();}
//exception is throw.Log.d(
"Step","5"); try{
Log.d(
"giving...","resp");SoapPrimitive sp=(SoapPrimitive)envelope.getResponse();
String hh=sp.toString();
Log.d("reply from web ser",".."+hh.toString());
//and erorr msg is
SoapFault - faultcode:'soapenv:Server' faultstring: 'namespace mismatch require http://Guru found http://192.168.10.182:8080/axis2/services/Friday'
faultactor: 'null' detail: org.kxml2.kdom.Node@43d31390
I am facing this issue only when am giving a call to parameterized method.
Please Help..
thanks