I wrote today my own web service and i want to reach this sever with my android smartphone. I did this by following this tutorial: http://javatutorialspoint.blogspot.nl/2012/02/simple-java-web-service-client-using.html
And it seems to work because i get the right result when i call this page : localhost:8080/WebServiceV2/services/Calculator?wsdl
But when I try to connect with my smartphone the app throws an exception(HTTP request failed, HTTP status: 500)
private static String SOAP_ACTION = "http://apptomap.de/add";
private static String NAMESPACE = "http://apptomap.de";
private static String METHOD_NAME = "add";
private static String URL = "http://192.168.1.34:8080/WebServiceV2/services/Calculator?wsdl";
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE ht = new HttpTransportSE(URL);
ht.call(SOAP_ACTION, envelope);
final SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
final String str = response.toString();
This is my code to connect with the web service and I get the exception at this line -> ht.call(SOAP_ACTION, envelope);
It is exactly the same problem like this: Soap Throws java.io.IOException: HTTP request failed, HTTP status: 500
Has anyone an idea to solve this problem?
Edit: I added the premission to connect with the internet