Hi all,
I am new to android development. I am trying to invoke webservice from
android using Ksoap2- 2.5 version. Below is the snippet of code I'm using.
Getting SOAP-ENV: server faultstring excception. I couldt understand this
error. help me to fix this.
*ERROR*
SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Castor unmarshalling
exception; nested exception is org.exolab.castor.xml.MarshalException: The
namespace associated with the prefix 'c' could not be resolved.'
faultactor: 'null' detail: null
*Code Snippet*
protected void getWsUsingSoap() {
final String NAMESPACE = "http://com/ctdc/service";
final String URL =
"
http://10.0.2.2:8080/mySpringPro/itemservice/services/ServiceImpl.wsdl";
final String SOAP_ACTION = "ServiceImpl";
final String METHOD_NAME = "message";
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
//SoapPrimitive result =
(SoapPrimitive)envelope.getResponse();
//System.out.println("res========"+result.toString());
//Object response= envelope.getResponse();
Object resultsRequestSOAP = envelope.bodyIn;
//SoapObject resultsRequest = (SoapObject) resultsRequestSOAP;
System.out.println("Received ===========:" +resultsRequestSOAP);
} catch (Exception e) {
e.printStackTrace();
}
}
--
Regards,
INDU........
--
Cheers,
INDU........
--
Cheers,
INDU........
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en