问题
I am developing an Android app, using Mobile ADF in JDeveloper 11.
I used weblogic server with SOAP service. When I test the webservice, its working fine, but I am getting this error after deployment on Android emulator -
"cannot connect to 127.0.0.1 on port 7101: java.net.ConnectionException:connection refused".
回答1:
use 10.0.2.2
instead of 127.0.0.1
and for SOAP
use port 8080
instead of 7701
回答2:
Use 10.0.2.2 instead of 127.0.0.1
10.0.2.2 Special alias to your host loopback interface (i.e., 127.0.0.1 on your development machine)
Reference: Emulator Networking
回答3:
Use this address: 10.0.2.2
or the real IP address if you have one.
See also the Docs
来源:https://stackoverflow.com/questions/17811172/connection-error-connection-refused