[kaffe] compiling error

Martini Stefano martini at sci.univr.it
Thu Nov 25 06:32:49 PST 2004


Hi all,
By using kaffe 1.1.4 I successfully compiled ksoap2.
I have a simple application using ksoap but
when I try to compile it I get this error
message:

prova.java:33: error:Exception "<gen>" is not catched and does not
appear in throws list [JLS 8.4.4]

Line 32 is the following:
     ht.call("urn:xmethods-Temperature#getTemp", envelope);

The file prova.java is listed below.
"call" method of class HttpTransportSE can thow an IOException.
Does anyone have an idea about the way to fix this error.

Thanks in advance.
Regards
Stefano
------------------------------
import java.io.IOException;
import org.ksoap2.*;
import org.ksoap2.serialization.*;
import org.ksoap2.transport.*;

public class prova {

	String symbolField = new String("94041");
	String result = new String("");

	public prova() {
	  try {
		// build request string
		String symbol = new String("94041");

		SoapObject rpc =
			new SoapObject("urn:xmethods-Temperature", "getTemp");
			//new SoapObject("urn:xmethods-delayed-quotes", "getQuote");

		rpc.addProperty("zipcode", symbol);

		SoapSerializationEnvelope envelope =
			new SoapSerializationEnvelope(SoapEnvelope.VER11);

		envelope.bodyOut = rpc;

		result = symbol;

		HttpTransportSE ht = new
HttpTransportSE("http://services.xmethods.net:80/soap/servlet/rpcrouter");
		//ht.debug = true;

		ht.call("urn:xmethods-Temperature#getTemp", envelope);
		
		result = "" + envelope.getResult();
		System.out.println("call finished = "+result);
		
	  } catch (IOException gen) {
	  } catch (Exception e) {
	    e.printStackTrace();
	    result = "Error:" + e.toString();
	  }
	}
	

    /** for me4se */

    public static void main(String[] argv) {
    	System.out.println("Inizio");
        new prova();
        System.out.println("Fine");
    }
}








More information about the kaffe mailing list