1. Check out our companion app, Forums for Android! Download from Google Play

unable to access my WSDL file on my android emulator

Discussion in 'Application Development' started by krishnaveni, Nov 19, 2012.

  1. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    Hi.,

    I have developed one android application

    this is my code:

    [HIGH]
    public class RetailerActivity extends Activity {
    private static final String SOAP_ACTION = "http://ws.testprops.com/customerData";
    private static final String METHOD_NAME = "customerData";
    private static final String NAMESPACE = "http://ws.testprops.com";
    private static final String URL = "http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl";


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    HttpTransportSE ht = new HttpTransportSE(URL);
    try {
    ht.call(SOAP_ACTION, envelope);
    SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
    SoapPrimitive s = response;
    String str = s.toString();
    String resultArr[] = str.split("&");//Result string will split & store in an array

    TextView tv = new TextView(this);
    for(int i = 0; i<resultArr.length;i++){
    tv.append(resultArr+"\n\n");
    }
    setContentView(tv);

    } catch (Exception e) {
    e.printStackTrace();
    }
    }
    }
    [/HIGH]This is my local tomcat apache server wsdl file:

    http://localhost:8089/TestPrompts/services/Fetch?wsdl

    means it is successfully worked for my emulator and android device.please see this screenshot:http://screencast.com/t/r4RISmZvL

    The same TestPrompts project only i have exported and created war file and uploaded in my tomcat server.

    This is my tomcat server wsdl file:

    http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl

    But here i have faced one problem:

    I have to put these URL means doesn't getting any result on both emulator and android device.Simply am getting black blank screen only.please refer my screenshot:http://screencast.com/t/o5k1qEfQ0

    My console window shows following error:
    please help me.how can i resolve this error.
     

    Advertisement

  2. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
  3. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    I have tested on my android 2.2 device also.am getting simple blank screen only on my android device.
     
  4. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
    Do you have the internet permission added to your manifest?
     
  5. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    Yes i have added internet permission already.

    This is my manifest file.
    please help me how can i resolve my error.

    The webservice code is given below:
    please give me some solution.how can i resolve this problem.
     
  6. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    Hi.,

    I got the solution for this after i have gave permission globally on my mysql database.so all are allowed to access my mysql database.but i wish to allow to access my mysql database myself(alone) only.others doesn't allow to access my mysql database.so this situation how can i manage security.please give me solution for this.
     

Share This Page

Loading...