I am having a difficulty to find a solution to my problem. I will not able to figure out or find the real cause of the problem. Basically when I call a java web service I am having an error saying "invalid stream or encoding exception: java.net.SocketTimeoutException caused by : java.net.SocketTimeoutException"
Here is how I call the service:
try
{
final String METHOD_NAME = "METHOD_NAME";
final String SOAP_ACTION = "NAMESPACE" + METHOD_NAME;
final String URL = HTTPURL;
SoapObject request = new SoapObject("NAMESPACE", METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(URL, (int) 10000);
httpTransport.call(SOAP_ACTION, envelope);
resultsObject = (SoapObject) envelope.bodyIn;
httpTransport.getServiceConnection().disconnect();
if (resultsObject != null)
{
ServiceResult serviceResult = new ServiceResult();
int propertyCount = resultsObject.getPropertyCount();
if (propertyCount > 0)
{
//PROCESS
}
}
}
catch(Exception e)
{
String mess = e.getMessage();
}
I appreciate any help.
Aucun commentaire:
Enregistrer un commentaire