logo       

Re: Sending GET request: msg#00124

Subject: Re: Sending GET request
Thanks Kyle for help.

Actually I had used the CalendarService and EventFeed class for sending
the URL. This is the code:

class GoogleFirst{
  public static void main(String args[]){
    try{
      URL feedUrl =
        new
URL("http://www.google.com/calendar/feeds/iabhishek@xxxxxxxxx/private-ecdd63d...../full";);
      CalendarService myService = new CalendarService("smp-abhi-1");

// Send the request and receive the response:
      EventFeed myFeed = myService.getFeed(feedUrl, EventFeed.class);

// Print the title of the returned feed:
      System.out.println(myFeed.getTitle().getPlainText());

    }catch(Exception e){
      e.printStackTrace();
    }
  }
}

It gets compiled well but when I run it  I get this error:
ExceptionInInitializerError:
  at GoogleFirst.main(GoogleFirst.java:14)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)

Line 14 is CalendarService myService = new
CalendarService("smp-abhi-1");

I could not understand the reason of the error.What is wrong here?

Abhishek




<Prev in Thread] Current Thread [Next in Thread>