Skip to Main Content

DevOps, CI/CD and Automation

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!

how to set Proxy settings in Android Mobile using mobile data

User_64Z34Aug 18 2017 — edited Oct 11 2017

Hi All,

I have created an MAF application . which inturn talks to OFSC .

For that i have created rest connecton . ANd tryird to call the rest service using rest api.

code i have written is

RestServiceAdapterFactory factory = RestServiceAdapterFactory.newFactory();

        RestServiceAdapter rs = factory.createRestServiceAdapter();

        rs.clearRequestProperties();

        rs.setConnectionName("FiledServiceCloud");

        rs.setRequestMethod(RestServiceAdapter.REQUEST_TYPE_GET);

        System.out.println("Completed the setRequestMethod step");

        rs.setRetryLimit(0);

        rs.setRequestURI("rest/ofscCore/v1/resources/"+getLoginUserName()+"/routes/"+date1+"?company=emerson1.test");

        rs.addRequestProperty("Content-Type", "application/json");

        rs.addRequestProperty("Authorization","Basic YWRtaW5AZW1lcnNvbjEudGVzdDp6clpHRUxoT1Vvbnk=");

        rs.addRequestProperty("Accept","*/*");

        rs.addRequestProperty("Host", "api.etadirect.com");

        response=rs.send("");

here i am getting the below exception

DalvikProxySelector.getProxyForURL(): No proxy found

[SEVERE - oracle.adfmf.framework - RestTransportLayer - readResponse] Exception while reading response: java.io.IOException

ERROR [oracle.adfmf.framework.exception.AdfException] - Remote host closed connection during handshake

Plese help me to resolve this issue

1.do i need to set the proxy in android mobile ?

Thanks,

Janardhan,

7396657266.

Comments
Post Details
Added on Aug 18 2017
5 comments
705 views