This discussion is archived
2 Replies Latest reply: Nov 16, 2012 3:26 PM by Joe Huang RSS

ADF Mobile App integration with webservices, connection refused error

726877 Newbie
Currently Being Moderated
I created an ADF application for department search with business components and exposed this as a webservice. I can access the WSDL locally from a browser. Then created an ADF mobile application and deployed it to android emulator. I am able to deploy the application to emulator and I can see the app on Android emulator. When I try to search for any department, I am getting "cannot connect to localhost on port 7101 : connection refused". My server is started already and the port number is also correct. Did any one came across this issue before? Even the WSDL URL is not accessible from the browser of android emulator.

Edited by: adf_forum on Nov 16, 2012 2:16 PM
  • 1. Re: ADF Mobile App integration with webservices, connection refused error
    Shay Shmeltzer Employee ACE
    Currently Being Moderated
    There were some reports of the android emulator having timeout issues with accessing local server on the same machine. See - https://blogs.oracle.com/shay/entry/developing_with_oracle_adf_mobile#comment-1353087788323
    If you deploy the application to an actual android device does it work?
  • 2. Re: ADF Mobile App integration with webservices, connection refused error
    Joe Huang Journeyer
    Currently Being Moderated
    Hi,

    One more thing to keep in mind is that Android emulator is itself a network host, and localhost will likely loop back into itself, i.e. emulator. Please try to set up the WLS to listen on an actual IP address for your development machine, create your WS DC using this real IP address, and then try to deploy/run the app.

    If you need to retrofit your app with an new IP address, please keep in mind there are several places you would need to manually fix up, including the connections.xml file.

    In general, if the device emulator's browser cannot hit a web service, then the ADF Mobile app will also not be able to hit a web service.

    The most reliable way is to treat the emulator like an actual device, then work out your application's connection accordingly.

    Thanks,

    Joe Huang

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points