It works fine on mine service using java, hope php has similar
implementation. See this may be error due to some semantic mistake.
also check for wsdl with the browser. Those are some mistake I have
done earlier. But I go with the original j2me jar. On that implement
extra classes of ksoap2-android-full-2.1.2(two class in transport
package), add commons-httpclient-3.1.jar.

Thread t = new Thread()
                                {
                                        private static final String SOAP_ACTION 
= "add";
                                        private static final String METHOD_NAME 
= "add";
                                        private static final String NAMESPACE = 
"http://wtp.mycomp.com";;
                                        private static final String URL =
"http://192.168.1.101:8080/Axis2ServiceServer/services/CalculatorService";;
                                        Integer a = null;
                                        Integer b = null;

                                        @Override
                                        public void run()
                                        {
                                                String stA = ((EditText)
findViewById(R.id.EditText01)).getText().toString();
                                                String stB = ((EditText)
findViewById(R.id.EditText02)).getText().toString();
                                                SoapSerializationEnvelope 
envelope = null;
                                                try
                                                {
                                                        a = 
Integer.valueOf(stA);
                                                        b = 
Integer.valueOf(stB);
                                                        SoapObject request = 
new SoapObject(NAMESPACE,METHOD_NAME);
                                                        
request.addProperty("a", a);
                                                        
request.addProperty("b", b);
                                                        envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11);
                                                        
envelope.setOutputSoapObject(request);
                                                        AndroidHttpTransport 
androidHttpTransport = new
AndroidHttpTransport(URL);
                                                        
androidHttpTransport.call(SOAP_ACTION, envelope);
                                                        Object result = 
envelope.getResponse();
                                                        KSoapClient.res = 
result.toString();
                                                }
                                                catch (NumberFormatException 
nfe)
                                                {
                                                        KSoapClient.res = "Only 
Integer numbers ";
                                                        Log.e("Input Error: ", 
nfe.getMessage());
                                                }
                                                catch (SoapFault sf)
                                                {
                                                        Log.e("Service Response 
Error, "+ sf.faultcode+":",
sf.faultstring);
                                                }
                                                catch (IOException ioe)
                                                {
                                                        Log.e("Service Response 
Error: ", ioe.getMessage());
                                                }
                                                catch (XmlPullParserException 
xppe)
                                                {
                                                        Log.e("Service Response 
Error: ", xppe.getMessage());
                                                }
                                        }
                                };
                                t.start();
On Fri, Oct 17, 2008 at 8:57 PM, CJ <[EMAIL PROTECTED]> wrote:
>
> Hi, guys
> finally i gave up on trying it by myself. i am dying for help. plz
> thanks
> CJ
>
> my situation is pretty simple. i have a webservice set up using php
> under apache.
>
> i have ksoap2-android-full-2.1.2.jar imported in eclipse.
>
> on android client,
> i have  <uses-permission android:name="android.permission.INTERNET" /
>>      in the manifest file
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>      package="com.my.application.stupid.android"
>      android:versionCode="1"
>      android:versionName="1.0.0">
>        <uses-permission android:name="android.permission.INTERNET" />
>    <application android:icon="@drawable/icon" android:label="@string/
> app_name">
> ......................................
>
> in the code, i have
> String SOAP_ACTION = "helloWorld";
>        String METHOD_NAME = "sayhi";
>        String NAMESPACE = "http://192.168.0.50:9090/";;
>        String URL = "http://192.168.0.50:9090/server.php";;
>
>    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
>
>    SoapSerializationEnvelope envelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
>    envelope.setOutputSoapObject(request);
>    AndroidHttpTransport androidHttpTransport = new
> AndroidHttpTransport(URL);
>            try {
>                    androidHttpTransport.call(SOAP_ACTION, envelope);
>                    } catch(Exception E) {
>                    }
>
>
> the code always come back with a running error (NOT AN EXCEPTION) and
> the application quits with information on the emulator screen:
> sorry, the application has stopped unexpectedly. plz try again.
>
> in debug mode, i see
> com.sun.jdi.InvocationException occurred invoking method.
> java.lang.reflect.InvocationTargetException
>
> but, they are not caught by my catch statement.
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to