Visualizzazione dei risultati da 1 a 10 su 19

Visualizzazione discussione

  1. #7
    Utente di HTML.it L'avatar di wegawhite
    Registrato dal
    Aug 2004
    Messaggi
    1,400
    Grazie, la riga 61 è questa:
    codice:
                Log.d("CallWs.class", "Valore restituito: " + val);
    Confermo il LogCat anche se in nessun punto di CallWs.class è previsto System.out.println().
    03-03 18:33:34.284: E/SpannableStringBuilder(14305): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

    03-03 18:33:34.284: E/SpannableStringBuilder(14305): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length


    03-03 18:33:36.866: E/AndroidRuntime(14305): FATAL EXCEPTION: main


    03-03 18:33:36.866: E/AndroidRuntime(14305): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxxx.xxxxx/com.xxxxx.xxxxx.CallWs}: java.lang.NullPointerException: println needs a message


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2110)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2135)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread.access$700(ActivityThre ad.java:140)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1237)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.os.Handler.dispatchMessage(Handler.java:99 )


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.os.Looper.loop(Looper.java:137)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread.main(ActivityThread.jav a:4935)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at java.lang.reflect.Method.invokeNative(Native Method)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at java.lang.reflect.Method.invoke(Method.java:511)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:1038)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:805)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at dalvik.system.NativeStart.main(Native Method)


    03-03 18:33:36.866: E/AndroidRuntime(14305): Caused by: java.lang.NullPointerException: println needs a message


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.util.Log.println_native(Native Method)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.util.Log.e(Log.java:297)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at com.xxxxx.xxxxx.CallWs.onCreate(CallWs.java:66)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.Activity.performCreate(Activity.java:5 206)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1094)


    03-03 18:33:36.866: E/AndroidRuntime(14305): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2074)


    03-03 18:33:36.866: E/AndroidRuntime(14305): ... 11 more


    codice:
    SoapObject Request = new SoapObject(WSDL_TARGET_NAMESPACE,                OPERATION_NAME);
    
    
            Request.addProperty("fname", "Peppino");
            Request.addProperty("lname", "DiCaprio");
            Request.addProperty("email", "Peppino");
            Request.addProperty("num", "Peppino");
            Request.addProperty("locID", 10);
            Request.addProperty("username", "Peppino");
            Request.addProperty("password", "Peppino");
    
    
            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
            envelope.dotNet = true;
            envelope.setOutputSoapObject(Request);
    
    
            HttpTransportSE httptransport = new HttpTransportSE(SOAP_ADDRESS);
    
    
            TextView textView = new TextView(this);
            setContentView(textView);
    
    
            try {
                httptransport.call(SOAP_ACTION, envelope);
                SoapObject response = (SoapObject) envelope.getResponse();
                String val = response.getProperty(0).toString();
                Log.d("CallWs.class", "Valore restituito: " + val);
                int result = Integer.parseInt(val);
                Log.d("CallWs.class", "Valore parsato: " + result);
    
    
            } catch (SocketException ex) {
                ex.printStackTrace();
                Log.e("CallWs.class", "Errore nel metodo...", ex);
            } catch (Exception e) {
                e.printStackTrace();
                Log.e("CallWs.class", "Errore nel metodo...", e);
    
            }

    Ultima modifica di wegawhite; 03-03-2014 a 19:42

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.