vijayrajput027 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

There is the class 'java.awt.Frame' not found #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Made a example project with Eclipse 3.6 & adt plugin 0.9.9.v201009221407-60953 
for Android 1.5 Platform on a Win XP & SP3

It is right the same as in the example from "Farfale" 
http://vimeo.com/9633556 only just for 1.5

Run it on avd platform 1.5 or on a phone with 1.5

unexpected error: debug says: Could not find class
'java.awt.Frame', referenced from method 

see code and debug below:

*****************
CODE:

package com.linckhvt.soap;

import java.io.IOException;

import android.app.Activity;
import android.os.Bundle;

// import android.app.Activity;
// import android.os.Bundle;
import android.widget.TextView; /** for viewing text */

/** imports for soap */
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;

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

    private static final String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit";  
    private static final String METHOD_NAME = "CelsiusToFahrenheit";  
    private static final String NAMESPACE = "http://tempuri.org/";  // where xmlns=
    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx"; // where the service is

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView txt = new TextView(this);
        txt.setText("Hello World - LIHE is here"); 
        setContentView(txt);

        try {
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);  
        request.addProperty("Celsius", "32");  // ----hier schmiert er ab 

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);

        AndroidHttpTransport aht = new AndroidHttpTransport(URL);  
        aht.call(SOAP_ACTION, envelope);

//        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
//        androidHttpTransport.call(SOAP_ACTION, envelope);

        SoapPrimitive resultString = (SoapPrimitive)envelope.getResponse();  
        txt.setText(resultString.toString());

        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }              
    }
}

Original issue reported on code.google.com by li...@pink-green.de on 28 Sep 2010 at 6:49

Attachments:

GoogleCodeExporter commented 8 years ago
^^ using ksoap2-android-assembly-2.4-jar-with-dependencies.jar 
and also tried 2.3

Original comment by li...@pink-green.de on 28 Sep 2010 at 8:07

GoogleCodeExporter commented 8 years ago
The offending method is not part of ksoap. See 

Could not find class 'java.awt.Frame', referenced from method 
com.trend.iwss.jscan.runtime.Session.getContainingFrame

Original comment by mosa...@gmail.com on 12 Oct 2010 at 5:12

GoogleCodeExporter commented 8 years ago
You may have been behind a corporate proxy with virus scanner from trendmicro, 
when you downloadeded some jar file from the net or updated eclipse. This 
device uses code injection of some class files into jar files. These class 
files assume they are running in an applet and can cause a lot of trouble when 
they make it into an application. See here for more info on the issue: 
http://esupport.trendmicro.com/Pages/IWSx-3x-Some-files-and-folders-are-added-to
-the-Jar-files-after-passin.aspx?print=true
Once your eclipse has been infected by trendmicro, it is almost impossible to 
get the stuff out again. Do a clean install of eclipse from a machine not 
behind this proxy, or get the proxy config fixed by your network admins.

Original comment by miedre...@gmail.com on 22 Oct 2010 at 9:11