I have an EC2 instance on AWS configured with Apache tomcat 8 and java. Following some tutorials from here, I can create one .war of my Web Service in eclipse and put it inside webapps folder of tomcat in my EC2 instance. I am able to access this services from the IP address of EC2 with the specific port and .war file name. For example:
And everything seems to work fine, I can open the services and see the wsdl files. My Web Service (in .war file) is configured for make a connection with a RDS instance from amazon. The connection itself is ok, I tested in localhost a direct connection with RDS from Android. But, when I try to connect with services that I put in EC2 (from there
the connection with my RDS is created) from Android, no data returns and I get a Null Pointer. The link that I used to make a connection with EC2 from Android is the Public IP of EC2 and the port (8080), followed by the specific path of wsdl file. For example:
I am using the KSOAP library to consume web service on android side and I have no idea of the reason that I don't get data from EC2 instance.
All methods in the web service and the comsumption in android works fine, I tested all in local host.
Anyone have an idea? Thanks!
Like asked, more information:
I tested all my methods of web service using SOAP UI, and all of them is working
For test the RDS instance that contains my DB, I run the web service in localhost with tomcat 8 and the communication Android -> My PC (localhost) -> RDS instance (My DB) is working.
The problem are when I try to change the communication line from:
*Android -> My PC (localhost) -> RDS instance (My DB)*
*Android -> EC2 instance -> RDS instance (My DB)*
Again, in EC2 I make the deploy of my web service.
- I use the same security group for RDS and EC2: