on 05-24-2012 11:24 AM
I want Android to connect to SAP network and call the HTTP server that i have crated on one of SAP System to interact with the Android emulator.
Hi Shrinivas,
If your emulator is in the same network, you can directly call the HTTP URL from your app on simulator.
make sure you have added the below permission in the androidmanifest.xml of your app.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
If you are looking for the details on connection to SAP via SUP, you can check out this doc http://scn.sap.com/docs/DOC-23532
Regards
Rohith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohith,
Thanks a lot for your reply.
My emulator is on the same network.
I gave the IP address of the SAP system where my HTTP service is present.
I am giving full path of my HTTP server.
http://IP-address:port//Full_path_to_the server
As the SAP server is have authnetication; i am using "Client Authentication" from the following path
http://hc.apache.org/httpcomponents-client-ga/examples.html for authentication client.
But i am getting HTTP 404 Error.
I dont know why i am getting these error; and where exactly i am going wrong.
Thanks and regards
Shrinivas K.
Hi,
The error is because of HTTP authentication failure. You can try sending the authentication is headers. I could successfully call oData service from SAP NW gateway using the below.
Ex:
HttpGet GetRequest = new HttpGet("HTTP URL");
//GetRequest.setHeader("Authorization","Basic Base64Encoding of UserName;password");
GetRequest.setHeader("Authorization","Basic c3VwdXNlcjM6czNwdXNlcg==");
Regards
Rohith
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.