C# 在Android中调用.Net Web服务失败

C# 在Android中调用.Net Web服务失败,c#,java,android,C#,Java,Android,我是Android编程新手 我在这行有一个错误: androidHttpTransport.call(SOAP_ACTION, envelope); exception=“评估期间出现错误” 起初我试图调用我的.NETWeb服务,但失败了。 为了解决这个问题,我尝试调用W3Web服务 我的Android代码 public class Hello_ProjActivity extends Activity { /** Called when the activity is first c

我是Android编程新手

我在这行有一个错误:

androidHttpTransport.call(SOAP_ACTION, envelope);
exception=“评估期间出现错误”

起初我试图调用我的.NETWeb服务,但失败了。 为了解决这个问题,我尝试调用W3Web服务

我的Android代码

public class Hello_ProjActivity extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "http://microsoft.com/webservices/CelsiusToFahrenheit";
    private static final String METHOD_NAME = "CelsiusToFahrenheit";//"AndroidTest";//"GetAppData4";// "HelloWorld";
    private static final String NAMESPACE = "http://microsoft.com/webservices/";//"http://tempuri.org/";

    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx";


    //http://192.168.2.104/SB_Site/WS_Android.asmx/HelloWorld

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);

        //Start my code
        //create layout
        TableLayout layout1 = new TableLayout (this);

        /**Start create textView**/
        TextView tv = new TextView(this);
        tv.setText("Hello, Androiddddd  xxx");
        //setContentView(tv);
        layout1.addView(tv);
        /**End create textView**/

        /**Start Create button Call WebSrvice**/
        Button btn = new Button(this); 
        btn.setText("MyButton"); 
        btn.setWidth(20);
        btn.setHeight(20);

        //set btn event listener
        btn.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {
                 WS_Caller();
                }
        });

        layout1.addView(btn);
        /**End Create button Call WebSrvice**/

        /**Start Create button Create Xml**/
        Button btn2 = new Button(this); 
        btn2.setText("Create Xml"); 
        btn2.setWidth(20);
        btn2.setHeight(20);

        //set btn event listener
        btn2.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {

                 CreateXml();
                }
        });

        layout1.addView( btn2);
        /**End Create button Create Xml**/

         /********Start Create Alert Dialog**************************/
        AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

        alt_bld.setMessage("Do you want to close this window ?");//.setCancelable(false);

        AlertDialog alert = alt_bld.create(); 
        // Title for AlertDialog 
        alert.setTitle("Title");

        alert.setButton("OK", new DialogInterface.OnClickListener() {  
              public void onClick(DialogInterface dialog, int which) {  
                return;  
            } });   

        alert.show();


        super.setContentView(layout1);

        /********End Create Alert Dialog**************************/

        //generateAppObj();
    }


public String WS_Caller()
    {
        //1
        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);

        //2 --set webservice params

        PropertyInfo pi = new PropertyInfo();
        pi.setName("Celsius");
        pi.setValue(2);
        pi.setType(int.class);
        Request.addProperty(pi);

      /*  PropertyInfo pi2 = new PropertyInfo();
        pi2.setName("Operand2");
        pi2.setValue(5);
        pi2.setType(int.class);
        Request.addProperty(pi2);
        */
        //3
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        //4
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        //5  
        try {  

             androidHttpTransport.call(SOAP_ACTION, envelope);
             SoapObject response = (SoapObject)envelope.getResponse();
             int result =  Integer.parseInt(response.getProperty(0).toString()); 

            }
        catch (Exception e) { 
            //tv2.setText(e.getMessage()); 
        }

        return "xxx";
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloandroid"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="14" />

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    -->
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".Hello_ProjActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <!-- David Add -->
                <uses-permission android:name="android.permission.INTERNET" />
            </intent-filter>
        </activity>
    </application>

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sencide"
android:versionCode="1"
android:versionName="1.0"> 
<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".AndroidWebService"
android:label="@string/app_name"> 
<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity> 
</application> 
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 
</manifest>
AndroidManifest.xml:

public class Hello_ProjActivity extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "http://microsoft.com/webservices/CelsiusToFahrenheit";
    private static final String METHOD_NAME = "CelsiusToFahrenheit";//"AndroidTest";//"GetAppData4";// "HelloWorld";
    private static final String NAMESPACE = "http://microsoft.com/webservices/";//"http://tempuri.org/";

    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx";


    //http://192.168.2.104/SB_Site/WS_Android.asmx/HelloWorld

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);

        //Start my code
        //create layout
        TableLayout layout1 = new TableLayout (this);

        /**Start create textView**/
        TextView tv = new TextView(this);
        tv.setText("Hello, Androiddddd  xxx");
        //setContentView(tv);
        layout1.addView(tv);
        /**End create textView**/

        /**Start Create button Call WebSrvice**/
        Button btn = new Button(this); 
        btn.setText("MyButton"); 
        btn.setWidth(20);
        btn.setHeight(20);

        //set btn event listener
        btn.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {
                 WS_Caller();
                }
        });

        layout1.addView(btn);
        /**End Create button Call WebSrvice**/

        /**Start Create button Create Xml**/
        Button btn2 = new Button(this); 
        btn2.setText("Create Xml"); 
        btn2.setWidth(20);
        btn2.setHeight(20);

        //set btn event listener
        btn2.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {

                 CreateXml();
                }
        });

        layout1.addView( btn2);
        /**End Create button Create Xml**/

         /********Start Create Alert Dialog**************************/
        AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

        alt_bld.setMessage("Do you want to close this window ?");//.setCancelable(false);

        AlertDialog alert = alt_bld.create(); 
        // Title for AlertDialog 
        alert.setTitle("Title");

        alert.setButton("OK", new DialogInterface.OnClickListener() {  
              public void onClick(DialogInterface dialog, int which) {  
                return;  
            } });   

        alert.show();


        super.setContentView(layout1);

        /********End Create Alert Dialog**************************/

        //generateAppObj();
    }


public String WS_Caller()
    {
        //1
        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);

        //2 --set webservice params

        PropertyInfo pi = new PropertyInfo();
        pi.setName("Celsius");
        pi.setValue(2);
        pi.setType(int.class);
        Request.addProperty(pi);

      /*  PropertyInfo pi2 = new PropertyInfo();
        pi2.setName("Operand2");
        pi2.setValue(5);
        pi2.setType(int.class);
        Request.addProperty(pi2);
        */
        //3
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        //4
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        //5  
        try {  

             androidHttpTransport.call(SOAP_ACTION, envelope);
             SoapObject response = (SoapObject)envelope.getResponse();
             int result =  Integer.parseInt(response.getProperty(0).toString()); 

            }
        catch (Exception e) { 
            //tv2.setText(e.getMessage()); 
        }

        return "xxx";
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloandroid"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="14" />

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    -->
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".Hello_ProjActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <!-- David Add -->
                <uses-permission android:name="android.permission.INTERNET" />
            </intent-filter>
        </activity>
    </application>

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sencide"
android:versionCode="1"
android:versionName="1.0"> 
<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".AndroidWebService"
android:label="@string/app_name"> 
<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity> 
</application> 
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 
</manifest>

试试这段代码

import org.ksoap2.SoapEnvelope; 
import org.ksoap2.serialization.PropertyInfo; 
import org.ksoap2.serialization.SoapObject; 
import org.ksoap2.serialization.SoapPrimitive; 
import org.ksoap2.serialization.SoapSerializationEnvelope; 
import org.ksoap2.transport.HttpTransportSE; 
import android.app.Activity; 
import android.os.Bundle; 
import android.util.Log; 
import android.widget.TextView; 
public class AndroidWebService extends Activity { 
private final String NAMESPACE = "http://www.webserviceX.NET/"; 
private final String URL = "http://www.webservicex.net/ConvertWeight.asmx"; 
private final String SOAP_ACTION = "http://www.webserviceX.NET/ConvertWeight"; 
private final String METHOD_NAME = "ConvertWeight"; 
/** 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); 
String weight = "3700"; 
String fromUnit = "Grams"; 
String toUnit = "Kilograms"; 
PropertyInfo weightProp =new PropertyInfo(); 
weightProp.setName("Weight"); 
weightProp.setValue(weight); 
weightProp.setType(double.class); 
request.addProperty(weightProp); 
PropertyInfo fromProp =new PropertyInfo(); 
fromProp.setName("FromUnit"); 
fromProp.setValue(fromUnit); 
fromProp.setType(String.class); 
request.addProperty(fromProp); 
PropertyInfo toProp =new PropertyInfo(); 
toProp.setName("ToUnit"); 
toProp.setValue(toUnit); 
toProp.setType(String.class); 
request.addProperty(toProp); 
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); 
envelope.dotNet = true; 
envelope.setOutputSoapObject(request); 
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); 
try { 
androidHttpTransport.call(SOAP_ACTION, envelope); 
SoapPrimitive response = (SoapPrimitive)envelope.getResponse(); 
Log.i("myApp", response.toString()); 
TextView tv = new TextView(this); 
tv.setText(weight+" "+fromUnit+" equal "+response.toString()+ " "+toUnit); 
setContentView(tv); 
} catch (Exception e) { 
e.printStackTrace(); 
} 
} 
}
您必须向AndroidManifest.xml添加INTERNET权限,如下所示

public class Hello_ProjActivity extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "http://microsoft.com/webservices/CelsiusToFahrenheit";
    private static final String METHOD_NAME = "CelsiusToFahrenheit";//"AndroidTest";//"GetAppData4";// "HelloWorld";
    private static final String NAMESPACE = "http://microsoft.com/webservices/";//"http://tempuri.org/";

    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx";


    //http://192.168.2.104/SB_Site/WS_Android.asmx/HelloWorld

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);

        //Start my code
        //create layout
        TableLayout layout1 = new TableLayout (this);

        /**Start create textView**/
        TextView tv = new TextView(this);
        tv.setText("Hello, Androiddddd  xxx");
        //setContentView(tv);
        layout1.addView(tv);
        /**End create textView**/

        /**Start Create button Call WebSrvice**/
        Button btn = new Button(this); 
        btn.setText("MyButton"); 
        btn.setWidth(20);
        btn.setHeight(20);

        //set btn event listener
        btn.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {
                 WS_Caller();
                }
        });

        layout1.addView(btn);
        /**End Create button Call WebSrvice**/

        /**Start Create button Create Xml**/
        Button btn2 = new Button(this); 
        btn2.setText("Create Xml"); 
        btn2.setWidth(20);
        btn2.setHeight(20);

        //set btn event listener
        btn2.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {

                 CreateXml();
                }
        });

        layout1.addView( btn2);
        /**End Create button Create Xml**/

         /********Start Create Alert Dialog**************************/
        AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

        alt_bld.setMessage("Do you want to close this window ?");//.setCancelable(false);

        AlertDialog alert = alt_bld.create(); 
        // Title for AlertDialog 
        alert.setTitle("Title");

        alert.setButton("OK", new DialogInterface.OnClickListener() {  
              public void onClick(DialogInterface dialog, int which) {  
                return;  
            } });   

        alert.show();


        super.setContentView(layout1);

        /********End Create Alert Dialog**************************/

        //generateAppObj();
    }


public String WS_Caller()
    {
        //1
        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);

        //2 --set webservice params

        PropertyInfo pi = new PropertyInfo();
        pi.setName("Celsius");
        pi.setValue(2);
        pi.setType(int.class);
        Request.addProperty(pi);

      /*  PropertyInfo pi2 = new PropertyInfo();
        pi2.setName("Operand2");
        pi2.setValue(5);
        pi2.setType(int.class);
        Request.addProperty(pi2);
        */
        //3
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        //4
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        //5  
        try {  

             androidHttpTransport.call(SOAP_ACTION, envelope);
             SoapObject response = (SoapObject)envelope.getResponse();
             int result =  Integer.parseInt(response.getProperty(0).toString()); 

            }
        catch (Exception e) { 
            //tv2.setText(e.getMessage()); 
        }

        return "xxx";
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloandroid"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="14" />

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    -->
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".Hello_ProjActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <!-- David Add -->
                <uses-permission android:name="android.permission.INTERNET" />
            </intent-filter>
        </activity>
    </application>

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sencide"
android:versionCode="1"
android:versionName="1.0"> 
<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".AndroidWebService"
android:label="@string/app_name"> 
<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity> 
</application> 
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 
</manifest>

试试这段代码

import org.ksoap2.SoapEnvelope; 
import org.ksoap2.serialization.PropertyInfo; 
import org.ksoap2.serialization.SoapObject; 
import org.ksoap2.serialization.SoapPrimitive; 
import org.ksoap2.serialization.SoapSerializationEnvelope; 
import org.ksoap2.transport.HttpTransportSE; 
import android.app.Activity; 
import android.os.Bundle; 
import android.util.Log; 
import android.widget.TextView; 
public class AndroidWebService extends Activity { 
private final String NAMESPACE = "http://www.webserviceX.NET/"; 
private final String URL = "http://www.webservicex.net/ConvertWeight.asmx"; 
private final String SOAP_ACTION = "http://www.webserviceX.NET/ConvertWeight"; 
private final String METHOD_NAME = "ConvertWeight"; 
/** 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); 
String weight = "3700"; 
String fromUnit = "Grams"; 
String toUnit = "Kilograms"; 
PropertyInfo weightProp =new PropertyInfo(); 
weightProp.setName("Weight"); 
weightProp.setValue(weight); 
weightProp.setType(double.class); 
request.addProperty(weightProp); 
PropertyInfo fromProp =new PropertyInfo(); 
fromProp.setName("FromUnit"); 
fromProp.setValue(fromUnit); 
fromProp.setType(String.class); 
request.addProperty(fromProp); 
PropertyInfo toProp =new PropertyInfo(); 
toProp.setName("ToUnit"); 
toProp.setValue(toUnit); 
toProp.setType(String.class); 
request.addProperty(toProp); 
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); 
envelope.dotNet = true; 
envelope.setOutputSoapObject(request); 
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); 
try { 
androidHttpTransport.call(SOAP_ACTION, envelope); 
SoapPrimitive response = (SoapPrimitive)envelope.getResponse(); 
Log.i("myApp", response.toString()); 
TextView tv = new TextView(this); 
tv.setText(weight+" "+fromUnit+" equal "+response.toString()+ " "+toUnit); 
setContentView(tv); 
} catch (Exception e) { 
e.printStackTrace(); 
} 
} 
}
您必须向AndroidManifest.xml添加INTERNET权限,如下所示

public class Hello_ProjActivity extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "http://microsoft.com/webservices/CelsiusToFahrenheit";
    private static final String METHOD_NAME = "CelsiusToFahrenheit";//"AndroidTest";//"GetAppData4";// "HelloWorld";
    private static final String NAMESPACE = "http://microsoft.com/webservices/";//"http://tempuri.org/";

    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx";


    //http://192.168.2.104/SB_Site/WS_Android.asmx/HelloWorld

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);

        //Start my code
        //create layout
        TableLayout layout1 = new TableLayout (this);

        /**Start create textView**/
        TextView tv = new TextView(this);
        tv.setText("Hello, Androiddddd  xxx");
        //setContentView(tv);
        layout1.addView(tv);
        /**End create textView**/

        /**Start Create button Call WebSrvice**/
        Button btn = new Button(this); 
        btn.setText("MyButton"); 
        btn.setWidth(20);
        btn.setHeight(20);

        //set btn event listener
        btn.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {
                 WS_Caller();
                }
        });

        layout1.addView(btn);
        /**End Create button Call WebSrvice**/

        /**Start Create button Create Xml**/
        Button btn2 = new Button(this); 
        btn2.setText("Create Xml"); 
        btn2.setWidth(20);
        btn2.setHeight(20);

        //set btn event listener
        btn2.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {

                 CreateXml();
                }
        });

        layout1.addView( btn2);
        /**End Create button Create Xml**/

         /********Start Create Alert Dialog**************************/
        AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

        alt_bld.setMessage("Do you want to close this window ?");//.setCancelable(false);

        AlertDialog alert = alt_bld.create(); 
        // Title for AlertDialog 
        alert.setTitle("Title");

        alert.setButton("OK", new DialogInterface.OnClickListener() {  
              public void onClick(DialogInterface dialog, int which) {  
                return;  
            } });   

        alert.show();


        super.setContentView(layout1);

        /********End Create Alert Dialog**************************/

        //generateAppObj();
    }


public String WS_Caller()
    {
        //1
        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);

        //2 --set webservice params

        PropertyInfo pi = new PropertyInfo();
        pi.setName("Celsius");
        pi.setValue(2);
        pi.setType(int.class);
        Request.addProperty(pi);

      /*  PropertyInfo pi2 = new PropertyInfo();
        pi2.setName("Operand2");
        pi2.setValue(5);
        pi2.setType(int.class);
        Request.addProperty(pi2);
        */
        //3
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        //4
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        //5  
        try {  

             androidHttpTransport.call(SOAP_ACTION, envelope);
             SoapObject response = (SoapObject)envelope.getResponse();
             int result =  Integer.parseInt(response.getProperty(0).toString()); 

            }
        catch (Exception e) { 
            //tv2.setText(e.getMessage()); 
        }

        return "xxx";
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloandroid"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="14" />

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    -->
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".Hello_ProjActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <!-- David Add -->
                <uses-permission android:name="android.permission.INTERNET" />
            </intent-filter>
        </activity>
    </application>

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sencide"
android:versionCode="1"
android:versionName="1.0"> 
<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".AndroidWebService"
android:label="@string/app_name"> 
<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity> 
</application> 
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 
</manifest>