-1

I added the Username and password as URL parameter the fallowing URL:

private static final String URL ="http://*********:****/sap/bc/srt/wsdl/srvc_14DAE9C8D79F1EE193CF0AB8FEE64345/wsdl11/allino‌​ne/ws_policy/document?sap-client=*****&UserName=*******&password=******";

I got the following Exception:

:02-24 12:37:44.159: WARN/System.err(530): java.net.SocketTimeoutException 02-24 12:37:44.159: WARN/System.err(530): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:130

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Venkat
  • 343
  • 1
  • 7
  • 17

1 Answers1

-1

Please try the same URL in the desktop browser and check that the server is accessible and the URL is correct.

try The following code:

HttpGet request = new HttpGet(...);
request.setHeader("Authorization", "Basic "+Base64.encodeBytes("login:password".getBytes()));

Assuming you are using HttpClient. Following is a example of HttpClient

Praful Bhatnagar
  • 7,425
  • 2
  • 36
  • 44
  • I RUN in the desktop Browser It asking Username and password .when ever i entered Credentials it Shows the WSDL file .How can i give Username and password through program In android . Thanks for ur reply – Venkat Feb 24 '12 at 09:05
  • Thanks For Ur reply I am using the fallowing code for Soap Webservices in Androidpackage com.appule.pack; import org.apache.http.client.methods.HttpGet; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.util.Base64; import android.view.View; import android.widget.Button; import android.widget.Toast; – Venkat Feb 24 '12 at 10:10