Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot connect locally on android device.

MFadelSep 9 2013 — edited Sep 10 2013

Hello,

I'm using JDeveloper 11.1.2.3. I created a mobile application by which i can access a table from the database. I did this by creating a web service from data controls. I deployed the application to the android emulator. Everything works great and i'm able to query the table using a simple view criteria. I know that in order to be able to connect to the database, i have to change the url in the connections.xml file from

"http://localhost:7101/MobileExample-Model-context-root/AppModuleService?WSDL"


to


"http://10.0.2.2:7101/MobileExample-Model-context-root/AppModuleService?WSDL"

Everything works great after changing to 10.0.2.2. However, this is working only in the emulator environment. Whenever i try deploying to the device i'm getting:

Cannot connect to 10.0.2.2 on port 7101:java.net.ConnectException: Connection timed out.


I read that i should also change the port to 8080. But still it's not working.


I tried entering the URL in the browser of the device to check if its working, but it wasn't!

Any one has an idea about this?


Thank you,

Mohamed.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2013
Added on Sep 9 2013
11 comments
1,702 views